commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cjacob...@qantas.com.au
Subject commons-net ftp with proxy
Date Tue, 19 Apr 2005 02:00:52 GMT
Hi,

I'm using the commons-net library (FTPClient) to do some ftping. However,
being stuck behind a big firewall is making it difficult to connect to
external servers. Having searched around I've discovered that you can use
the socks proxy settings:

      System.getProperties().put( "socksProxyPort", "XXXX");
      System.getProperties().put( "socksProxyHost" ,"XXXX");

      System.getProperties().put("java.net.socks.username", "XXXX");
      System.getProperties().put("java.net.socks.password", "XXXX");

However, having tried this, I'm now getting the following error when I try
to connect (  ftclient.connect(server)   ):

      java.net.SocketException: Reply from SOCKS server has bad version

I've also tried using the usual proxy settings, ie:

      System.getProperties().put( "http.proxyPort", "XXXX");
      System.getProperties().put( "http.proxyHost" ,"XXXX");
      System.getProperties().put( "http.proxyUser", "XXXX");
      System.getProperties().put( "http.proxyPassword" ,"XXXX");

which give me the following:

      java.net.ConnectException: Connection timed out: connect


Am I right in thinking that my proxy is not a SOCKS (4 or 5??) proxy and
this is why it's not working?

And does anyone know any way around this?


much appreciated.

Charles Jacobson




******************* Confidentiality and Privilege Notice *******************

This e-mail is intended only to be read or used by the addressee. It is
confidential and may contain legally privileged information. If you are not
the addressee indicated in this message (or responsible for delivery of the
message to such person), you may not copy or deliver this message to anyone,
and you should destroy this message and kindly notify the sender by reply
e-mail. Confidentiality and legal privilege are not waived or lost by reason
of mistaken delivery to you.

Qantas Airways Limited
ABN 16 009 661 901

Visit Qantas online at http://qantas.com

****************************************************************************


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message