Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
ftp: Allow PSV mode on IPv6 connections if a proxy is being used #2432
In the situation of a client connecting to an FTP server using an
I've tested this privately, using a CONNECT IPv6 proxy to connect to an IPv4 host. I'm not sure if there is a better way to test if the connection is using a proxy (I stole this conditional from the control_address function below this one).
In the situation of a client connecting to an FTP server using an IPv6 tunnel proxy, the connection info will indicate that the connection is IPv6. However, because the server behing the proxy is IPv4, it is permissable to attempt PSV mode. In the case of the FTP server being IPv4 only, EPSV will always fail, and with the current logic curl will be unable to connect to the server, as the IPv6 fwdproxy causes curl to think that EPSV is impossible.