powered by Jive Software

Connect client to server through proxy (again)

anyone can give me a sample code to connect my jabber client (using SMACK) to server through proxy ?

cause, in my place, if i want to connect outside, must be through proxy

is the variable SocketFactory in the method XMPPConnection’'s parameter solve this problem ?

i know that this question has been asked in previous thread, but the answer still make me confused. and the thread had been archived, so i can not reply it now.

i’‘m sorry guys, i’‘m a newbie in a Java programming, i’'m especially confused in socket programming

thanks for any help !

IMHO, to avoid code changes , you can try some commandline features that java provided, like this:

java -DsocksProxyHost= -DsocksProxyPort= -Dhttp.proxySet=true -jar

- your socks proxy, - port, - your client

also, see “Java Network Programming” 3rd or 2nd edition book, very helpful