]> git.ipfire.org Git - thirdparty/squid.git/commit
Initial support for active FTP downloads via the FTP PORT command.
authorAlex Rousskov <rousskov@measurement-factory.com>
Fri, 23 Aug 2013 01:20:21 +0000 (19:20 -0600)
committerAlex Rousskov <rousskov@measurement-factory.com>
Fri, 23 Aug 2013 01:20:21 +0000 (19:20 -0600)
commitcff221eee04e679b0aff9b7455a0a3cc7fb08166
treed247fcf6750e30e71ac2421dc2124b6c93ce58bd
parent0b78ec188b4d789fec697150e326b655bd0e3d69
Initial support for active FTP downloads via the FTP PORT command.

Squid accepts PORT command on the client side, but still uses passive transfer
on the server side. The PORT command response is not sent to the client until
the server-side PASV command succeeds. The data connection to the client is
not opened until Squid receives the RETR command from the client.

Squid requires either PORT or PASV command before data transfers. RFC 959 says
PORT is optional because default ports can be used.

RFC 959 also seems to imply that Squid should originate active connections to
client from port 20.  The code to do that is commented out for now because it
would prevent support for concurrent data connections. The code configuring
this outgoing (but to-client) connection may need more work as we do a lot
more for outgoing to-server connections.

Active data upload has not been tested.
src/FtpGatewayServer.cc
src/FtpServer.cc
src/FtpServer.h
src/client_side.cc
src/client_side.h