commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex HO" <>
Subject connect to ftp server via proxy..
Date Wed, 16 Aug 2006 04:52:51 GMT
hi all,
i am developing a using commons-net-1.4.1.jar library.

it works fine if not via proxy server. it can login the ftp account
and list files. But my target is to connect the ftp server via proxy

by following the Paul Buchana
i add the following two lines before the connect line
System.getProperties().put( "socksProxyPort", "7200");
System.getProperties().put( "socksProxyHost" ,""); // is proxy server with port 7200

prv_cls_ftpclient.connect("",21); <-- target ftp server to
connect, it can connect to ftp server if comment the above
System.getProperties lines
reply = prv_cls_ftpclient.getReplyCode();
System.out.print("Print log reply code"+reply);
if(!FTPReply.isPositiveCompletion(reply)) {
        System.err.println("FTP server refused connection.");
System.out.print("Print log Connection");
prv_cls_ftpclient.login("user", "pass");

but it stop at the .connect line without further proceed, what's wrong
with my code. any miss setting i should did?? or is it possible to a
ftp server via a proxy server?

I am using a lite proxy server called Binary Proxy Server BPSLite.exe on windows

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message