Skip to content

feat: support pasv mode port mapping #521

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

KirCute
Copy link

@KirCute KirCute commented Feb 27, 2025

Modify the type of PassiveTransferPortRange in the driver settings to the interface PasvPortGetter, which is essentially a function that can return the exposed port and the listened port. The listened port will be listened by the local host, while the exposed port will be returned as the result of the PASV or EPSV command. This design ensures that the library can adapt to cases where port mapping exists between the client and server, such as deployment within Docker.

PortRange implemented PasvPortGetter, so the modified version will remain compatible with previous versions.

@fclairamb fclairamb enabled auto-merge (squash) May 4, 2025 21:44
@fclairamb
Copy link
Owner

I like how you implemented it !

@fclairamb fclairamb disabled auto-merge May 4, 2025 21:44
@fclairamb fclairamb enabled auto-merge (squash) May 4, 2025 21:44
Copy link

codecov bot commented May 4, 2025

Codecov Report

Attention: Patch coverage is 64.28571% with 10 lines in your changes missing coverage. Please review.

Project coverage is 86.54%. Comparing base (6e2547d) to head (136f60a).

Files with missing lines Patch % Lines
driver.go 50.00% 5 Missing ⚠️
transfer_pasv.go 72.22% 4 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #521      +/-   ##
==========================================
- Coverage   86.68%   86.54%   -0.14%     
==========================================
  Files          11       12       +1     
  Lines        2328     2342      +14     
==========================================
+ Hits         2018     2027       +9     
- Misses        236      240       +4     
- Partials       74       75       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@fclairamb
Copy link
Owner

Hum, reducing coverage is not cool.

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.

2 participants