I am desperate (well, that may be a bit exagerated...). I have been trying different solutions to get a Java program to implement an FTP client that works behind a proxy (HTTP connect).
My first idea was to use apache.org.commons.net. FTPClient in a similar way to what I had done for SFTP. However I cannot find a single reference to a proxy in the configuration. My second idea was to create a custom SocketFactory and create a socket using the createSocket(proxy) constructor. It fails however with an IllegalProxy exception. I had to look at the source code of java.net.socket to discover that Proxy.Type.HTTP is simply not supported ! The code has changed between JDK 1.5 and 1.6 but the bottom line remains unchanged : Proxy.Type.HTTP will cause an IllegalProxy exception. I am not satisfied by the System.getProperties().put solution. I would be glad to find someone who has managed to get soemthing similar to work. Cheers, Marc
