Forums Register Login

Proxy and FTP Socket

+Pie Number of slices to send: Send
Hi All,
I have a Socket open on port 21 for FTP service. But I need to go through a proxy. When I try to connect, it throws an IOException as "Permission denied".
Please let me know how I can tell the Socket to pass through the proxy.
Thanks
Amit Lonkar
+Pie Number of slices to send: Send
 

Originally posted by Amit Lonkar:
Please let me know how I can tell the Socket to pass through the proxy.

You don't. You should just open the socket to the proxy.
+Pie Number of slices to send: Send
Moving to the Sockets forum.
+Pie Number of slices to send: Send
Could you please elaborate on how to contact the proxy:
1. how do I autodetect it?
2. how do I 'talk' with it: http://myProxy:888/myUrl ?
10x
Azriel
+Pie Number of slices to send: Send
This article might be helpful.
+Pie Number of slices to send: Send
10x!!! Reading...
+Pie Number of slices to send: Send
If you are going thru a SOCKS proxy then you can use the following code:
Properties props = System.getProperties();
props.put("socksProxyHost", proxyHostname);
props.put("socksProxyPort", Integer.toString(proxyPort));
System.setProperties(props);
where proxyHostname is your proxy ip address or hostname and proxyPort is your SOCKS proxyPort (default is typically 1080)
Don't touch me. And dont' touch this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 1450 times.
Similar Threads
FTP over Http Proxy
FTP Upload
Convert SSLSocket back to decrypted Socket
Need a simple Java LDAP client
FTP client not working behind proxy
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 06:10:18.