------------------------------------------------------------ revno: 13528 [merge] revision-id: rousskov@measurement-factory.com-20140811160906-ddpvzkk9yoci20mc parent: squid3@treenet.co.nz-20140808115258-xazeqbpcs71bw8hh parent: rousskov@measurement-factory.com-20140810231833-ix9i0vaum2eycdqe committer: Alex Rousskov branch nick: trunk timestamp: Mon 2014-08-11 10:09:06 -0600 message: Initial native FTP Relay support. * Added ftp_port directive telling Squid to relay native FTP commands. * Active and passive FTP support on the user-facing side; require passive connections to come from the control connection src IP. * IPv6 support (EPSV and, on the user-facing side, EPRT). * Intelligent adaptation of relayed FTP FEAT responses. * Relaying of multi-line FTP control responses using various formats. * Support relaying of FTP MLSD and MLST commands (RFC 3659). * Several Microsoft FTP server compatibility features. * ICAP/eCAP support (at individual FTP command/response level). * Optional "current FTP directory" tracking (cannot be 100% reliable due to symbolic links and such, but is helpful in some common use cases). * FTP origin control connection is pinned to the FTP user connection. * No caching support -- no reliable Request URIs for that (see above). * Significant FTP code restructuring on the server-facing side. * Initial steps towards HTTP code restructuring on the client-facing side. See merged revisions commit log for details. ------------------------------------------------------------ Use --include-merges or -n0 to see merged revisions. ------------------------------------------------------------ # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: rousskov@measurement-factory.com-20140811160906-\ # ddpvzkk9yoci20mc # target_branch: http://bzr.squid-cache.org/bzr/squid3/trunk/ # testament_sha1: 7d801438887d76d5a7895c6998454edb52194c19 # timestamp: 2014-08-11 16:54:28 +0000 # source_branch: http://bzr.squid-cache.org/bzr/squid3/trunk/ # base_revision_id: squid3@treenet.co.nz-20140808115258-\ # xazeqbpcs71bw8hh # # Begin patch === modified file 'configure.ac' --- configure.ac 2014-07-13 08:49:42 +0000 +++ configure.ac 2014-08-04 21:44:31 +0000 @@ -3457,8 +3457,11 @@ scripts/Makefile src/Makefile src/anyp/Makefile + src/ftp/Makefile src/base/Makefile src/acl/Makefile + src/clients/Makefile + src/servers/Makefile src/fs/Makefile src/repl/Makefile src/auth/Makefile === modified file 'doc/release-notes/release-3.5.sgml' --- doc/release-notes/release-3.5.sgml 2014-08-02 14:03:21 +0000 +++ doc/release-notes/release-3.5.sgml 2014-08-11 16:09:06 +0000 @@ -43,6 +43,7 @@ Support named services Upgraded squidclient tool Helper support for concurrency channels + Native FTP Relay Most user-facing changes are reflected in squid.conf (see below). @@ -163,6 +164,48 @@ With these helpers concurrency may now be set to 0 or any higher number as desired. +Native FTP Relay +

Details at . + +

Squid is now capable of accepting native FTP commands and relaying native + FTP messages between FTP clients and FTP servers. Native FTP commands + accepted at ftp_port are internally converted or wrapped into HTTP-like + messages. The same happens to Native FTP responses received from FTP origin + servers. Those HTTP-like messages are shoveled through regular access + control and adaptation layers between the FTP client and the FTP origin + server. This allows Squid to examine, adapt, block, and log FTP exchanges. + Squid reuses most HTTP mechanisms when shoveling wrapped FTP messages. For + example, http_access and adaptation_access directives are used. + +

FTP Relay is a new, experimental, complex feature that has seen limited + production exposure. Some Squid modules (e.g., caching) do not currently + work with native FTP proxying, and many features have not even been tested + for compatibility. Test well before deploying! + +

Native FTP proxying differs substantially from proxying HTTP requests with + ftp:// URIs because Squid works as an FTP server and receives + actual FTP commands (rather than HTTP requests with FTP URLs). + +

FTP Relay highlights:

+ + + Added ftp_port directive telling Squid to relay native FTP commands. + Active and passive FTP support on the user-facing side; require + passive connections to come from the control connection source IP + address. + IPv6 support (EPSV and, on the user-facing side, EPRT). + Intelligent adaptation of relayed FTP FEAT responses. + Relaying of multi-line FTP control responses using various formats. + Support relaying of FTP MLSD and MLST commands (RFC 3659). + Several Microsoft FTP server compatibility features. + ICAP/eCAP support (at individual FTP command/response level). + Optional "current FTP directory" tracking with the assistance of + injected (by Squid) PWD commands (cannot be 100% reliable due to + symbolic links and such, but is helpful in some common use cases). + No caching support -- no reliable Request URIs for that (see above). + + + Changes to squid.conf since Squid-3.4

There have been changes to Squid's configuration file since Squid-3.4. @@ -228,6 +271,22 @@

The default value for extras is: "%>a/%>A %un %>rm myip=%la myport=%lp" + ftp_port + +

New configuration directive to accept and relay native FTP + commands. Typically used for port 21 traffic. By default, native + FTP commands are not accepted. + + ftp_client_idle_timeout + +

This new configuration directive controls how long Squid should + wait for an FTP request on a connection to an ftp_port. Many FTP + clients do not deal with idle connection closures well, + necessitating a longer default timeout (30 minutes) than + client_idle_pconn_timeout used for incoming HTTP requests (2 + minutes). The current default may be changed as we get more + experience with FTP relaying. + Changes to existing tags