FTP connection to a Proxy
My application requires get, put and rename operations to be performed through Java.
I am using commons-net API by jakarta. The code is able to connect to most of the servers, but in case of a specific proxy server, the connection fails. The IP address of the said server keeps on changing between two values. When the request is routed to one of these IP's the code completes successfully, but fails for the other IP.
Interestingly, if I try FTP through command prompt, or PERL, it always completes. Only Java is not able to connect.
Another thing is that this application also requires SFTP support, so I tried JSch API from JCraft. This also is able to connect to all the servers except the above mentioned proxy server. But in this case, the connection always fails, irrespective of the IP of the proxy.
Please help me out as I've been stuck at this problem for weeks now, also I couldn't find a similar problem anywhere else.
|