Smack Connection with PROXY Server

Hi! I need to implement the connection from a Client who has a Proxy Server to access Intenet. Any ideas???

Thanks…

Andrés

well, it´s not possible to be done??? how SPARK do that???

Hi Andrés,

afaik Spark does not use a configured http proxy for XMPP connections.

LG

well, when I view advance preferences of SPARK there is a TAB named “Proxy”… i´m my office doesn´t work, but I thought it works…

thanks…

Java has built-in support for proxies. Check out the following article for tips on setting this up:

http://www.devx.com/tips/Tip/14754

Regards,

Matt

Hi All,

I tried the method suggested in that link. Here’'s the code:


System.out.println(“Configuring proxy”);

System.getProperties().setProperty(“http.proxySet”, “true”);

System.getProperties().setProperty(“http.proxyHost”, "@gmail.com");

myChat.sendMessage(“Howdy!”);

}

}

catch (XMPPException exp)

{

System.out.println(“ERROR”);

System.out.println(exp+exp.getCause().getMessage());

}

_________________________________________________________________[/b]

I dont actually need to do this from home so can connect with no hassles whatsoever. We have to use a proxy in work though so it’‘s not so simple. We also use aventail connect which further complicates matters. In fact, originally I couldn’'t get the googletalk application to connect and had to use GAIM.

What happens when I run this is that it times out and enters the catch block. The exception is null though as there was no XMPP exception thrown. As you can see, I also tried connecting using port 443 (not too sure which is the server and which is the service though).

Can someone please try this code? I’‘d be very interested to see if it works. At least then I’‘ll know it’‘s Aventail that’'s acting the eejit!

Cheers,

Ciaran.

I tried to set proxyHost, proxyPort and proxySet and its all in vain. I think that Smack does not consider these properties to pass through the proxy… unless there is something I am missing out.

I have logged a separate question a few days ago but no answer so far from anyone, which is starting to giving me the impression that its not possible:

http://www.jivesoftware.org/community/thread.jspa?messageID=122669&#122669

Just a thought. If you were to write an applet version to run in a browser, would it use the browser proxy?

Ciarán.