powered by Jive Software

Http tunnel?

Does smack support HTTP tunneling so that this library can be used behind firewalls?


As of today Smack does not provide a servlet that could be used to solve your request. However you have two options, you can build one or you can join to this thread http://www.jivesoftware.com/jive/thread.jspa?threadID=10495[/url] and ask for it.


– Gato


I think i wasnt able to communicate my requirement properly.

What i am looking for is a client interface to an existing http tuneling supporting server(it couldbe a servlet or asp) so that I can build my own client that can talk over http tuneling.

ie, the communication between the server and the smack library should happen over http tunnel instead of port 5222.




If all you want to do is use XMPP over port 80, you can do that pretty simply. Most XMPP servers should allow you to use nonstandard ports and Smack allows you to connect on these ports when you create the connection object.


You could probably adapt code from the following URL to form a new subclass of XMPPConnection which can support polling.

http://www.jabberstudio.org/cgi-bin/viewcvs.cgi/JabberApplet/org/jabber/applet/c onnection/PollingConnection.java?rev=1.2&content-type=text/vnd.viewcvs-markup

(Okay it looks like this forum is going to break the long URL, so you might have to copy the bits into the URL field yourself.)

It’‘s generally bad to assume that simply using XMPP over port 80 will work. Many transparent web proxies will prevent this from working because they can’'t understand the ‘‘headers’’ (or rather, the lack thereof), and many users seem to be unknowingly behind these (cable companies like to use them so they can pretend their connection is faster than it really is. I guess it saves money too. )