[jdev] SOCKS5 Bytestream File Transfer problem
Justin Karneges
justin-keyword-jabber.093179 at affinix.com
Fri Feb 25 14:38:30 CST 2005
On Friday 25 February 2005 04:45 am, Anthony Ortiz wrote:
> // using libidn/java/gnu/inet/encoding/Stringprep.java -- too boring
> to implement, thk god I found this!
> String SocksHost = SHA1(sid + Stringprep.nameprep(from + to)); // HASH
> OUTPUT=9134A1B74EB358B866C604B1E1B0DDEE0D664967
> host = 192.168.1.100
> port = 8010
> // using http://lightning.prohosting.com/~kirillka/SOCKS/SOCKSLib.html
> SOCKS5 library. thk god for this too!
> Proxy.setDefaultProxy(host, port);
> Socket ss = new SocksSocket(SocksHost, 0); // <-- Unknown Host Exception
I don't understand this code. What is Proxy?
It looks to me like you're creating a Socket that is trying to physically
connect to that hash value (SocksHost) as a host, which is not going to work
at all. What you want to do is physically connect to 192.168.1.100, and then
send the hash value in a packet over this connection.
-Justin
More information about the JDev
mailing list