I want to set up an FTP connection using a proxy server with Apache's commons-net.
But looking at this Does FTPClient support FTP connections through an FTP proxy server? has me worried.
I have to meddle with the system properties and the Sun docs state that "If socksProxyHost is specified then all TCP sockets will use the SOCKS proxy server to establish a connection or accept one."
WTH? All TCP sockets? What about my database connections? Or other FTP connections i might want to open at the same time not using a proxy? Will they all be affected?
Is there some other way to do it that doesn't mess with the rest of my application?
SocketFactory
is the way to go -- quoting Commons-Net 3.3 documentation commons.apache.org/proper/commons-net/apidocs/org/apache/… "Of special note is the setSocketFactory method ... This is especially useful for adding SSL or proxy support " – Preposterous