Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add flag to force use of local control host address #259

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

julianosk
Copy link

@julianosk julianosk commented Nov 12, 2024

The assumption in the enterPassiveModeIPv4 function (in src/transfer.ts:48) is that NAT is only used if the "control connection" uses a public IP address and the "data connection" uses a private IP address.

However, in our particular scenario this is not the case. Both the control connection and the data connection use an private IP address but we are using NAT. The correct behaviour in this case would be to ignore the IP address mentioned in the PASV-response and instead use the control IP address.

To ensure we don't change current behaviour, we would like to introduce a configuration option that always uses the IP address of the control connection, regardless of whether the IP address is public or private. This configuration flag, called alwaysUseControlHost, is passed in the contructor and defaults to false.

@julianosk julianosk changed the title feat: Add flag to use local control host address feat: Add flag to forse use of local control host address Nov 13, 2024
@julianosk julianosk changed the title feat: Add flag to forse use of local control host address feat: Add flag to force use of local control host address Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant