Distributed transfer commands
From DrFTPD
Contents |
Proposal: Rewriting ALL transfer commands
This would be the solution for the future but requires big change to all FTP clients.
It also supports sending PORT command without IP in which case the ftp server will use the source ip of the control connection.
It involves deprecating ALL transfer comands (LIST/NLST/RETR/STOR/STOU/APPE) ALL transfer mode commands (PORT/PASV/EPRT/EPSV).
Then add new commands such as DLST/DNLS/DRTR/DSTR/DSTU/DAPE that include the ip:port specification, using EPSV/EPRT syntax from RFC 2428 - FTP Extensions for IPv6 and NATs.
RFC 2428 says EPSV command MUST NOT specify an IP which breaks distributed transfers. It must be changed to MAY specify an IP for distributed passive transfers to work.
Example: DRET in active transfer mode without IP specification
C: DRET |1||[ipv4 port]| file.zip S: 150 File status okay; about to open data connection. S: 226 Closing data connection
TODO: is omitting IP supported in the EPRT command specification?
Example: DRET in active transfer mode
C: DRET |1|[ipv4 ip]|[ipv4 port]| S: 150 File status okay; about to open data connection. S: 226 Closing data connection
Example: DRET in passive transfer mode
C: DRET |1|0| file.zip S: 227 Entering Passive Mode (|1|[ipv4 ip]|[ipv4 port]|) S: 226 Closing data connection
A definition of all the new commands is not provided as this solution is turned down for now in preference for PRET_Specifications#Solution: PRET (PRE Transfer) command.
