aio-libs / aioftp

ftp client/server for asyncio (http://aioftp.readthedocs.org)
Apache License 2.0
185 stars 54 forks source link

server: support PASV response with custom address #150

Closed janneronkko closed 2 years ago

janneronkko commented 2 years ago

This allows old FTP client to connect to AIOFtp server located behind NAT.

What do these changes do?

The change adds support for clients using passive connections (PASV command) to a server located behind NAT

Are there changes in behavior for the user?

Passive connections can be opened with PASV command to server behind (IPv4) NAT

Related issue number

N/A

Checklist

janneronkko commented 2 years ago

I faced this issue with a service I've implemented; all the clients connecting to our service do not use EPSV command (using EPSV would have worked)

codecov[bot] commented 2 years ago

Codecov Report

Merging #150 (0a92e16) into master (ad28ae9) will increase coverage by 0.00%. The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #150   +/-   ##
=======================================
  Coverage   99.15%   99.15%           
=======================================
  Files           6        6           
  Lines        1888     1891    +3     
=======================================
+ Hits         1872     1875    +3     
  Misses         16       16           
Impacted Files Coverage Δ
aioftp/server.py 98.38% <100.00%> (+<0.01%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update ad28ae9...0a92e16. Read the comment docs.

pohmelie commented 2 years ago

Thank you for the PR, released as 0.21.0.