This article explains how you can use the GTalk connectivity of the Eclipse Communication Framework (ECF) via a HTTP tunnel (e.g. proxytunnel). This might come in handy in case you are behind a proxy that does not allow connections to talk.google.com, port 5222. Furthermore, ECF uses the Smack API, which does not support the use of a network proxy (yet). The article is targeted at a Unix audience.
Let us assume that our remote host to which we will connect using ssh on port 443 in order to setup the tunnel is called tunneltarget (e.g. IP address 184.108.40.206) and that the network proxy is called yourproxy and runs on port 80. Now our ~/.ssh/config would look like this:
ProxyCommand /location/of/proxytunnel -p yourproxy:80 -d 220.127.116.11:443
LocalForward 5222 talk.google.com:5222
Obviously you will have to replace tunneltarget with whatever alias you would like, /location/of with the true location where you have installed proxytunnel and yourproxy:80 with the true hostname/ IP address and port number of you HTTP proxy. The LocalForward directive opens a socket on localhost that listens on port 5222 and forwards to talk.google.com, port 5222, via the tunneltarget (your ssh server). You can now start the tunnel (where userid is your user on your ssh server):
Unfortunately this is not enough to be able to sign in to GTalk with ECF. ECF requires you to enter your GMail ID (e.g. firstname.lastname@example.org) and I think it uses this single string for both authentication and the GTalk server's hostname to connect to. This means that if you enter email@example.com, you will not be able to connect, and if you use youruser@localhost, you will not be able to sign in to GTalk. I could not get any combination (@localhost, @gmail.com, @talk.google.com) to work.
The only way I got it to work was by pointing talk.google.com to 127.0.0.1 in /etc/hosts. One could setup a "Location" (as it is called in Ubuntu) with specific network settings such as specific hosts file contents for that location. Once talk.google.com is rerouted to localhost, you can use the following connect string to connect ECF with GTalk:
This is a bit of a kludge, so lets hope the Smack API will have proxy support very soon.