A less than a week and I will be away from the university and hence away from proxy server of computer centre, but still I am looking for solutions to bypass proxy and to tunnel ports blocked by proxy.
I found an amazing library named ProxyChains which can establish chain of proxy for your communication and bypass all the communication and tunnel the required port to avoid filterning. I already published proxy tunneling throug transconnect library, so what’s difference between them. Well the difference is that transconnect does not support SOCKS proxy (which is the main proxy used to tunnel through ssh) whereas ProxyChains allow it. Also there are several other features in ProxyChain but the only reason for me to use it is SOCKS support.
So the beginner’s question, How to bypass proxy and tunnel proxy?
Step 1. Get an ssh shell account on free shell provider. List of free shell providers are http://www.red-pill.eu/freeunix.shtml andhttp://www.bylur.net/free/.
Step 2: Check whether free shell provider allows port forwarding. Also check where http ports are allowed or any port is allowed. To check first ssh login in shell using
ssh username@host -D 1080 -v
and then use the socks proxy in firefox to localhost and port 1080 and try to browse the web. If you are successful, atleast http ports are forwarded. Now try to connect to some random port in the firefox like something:2354 and see what type of message appears on the verbose ssh shell. If it tries to connect, then you have found the right shell and proceed further otherwise try to find another shell. Also keep note down which shell give http port access. You may use it to browse net when proxy is down or something.
Step3: Install ProxyChains (http://proxychains.sourceforge.net/) and set SOCKS proxy in the proxychains.conf file usualled located in /etc and start using it.For more information read Readme file or http://proxychains.sourceforge.net/howto.html.
You can also use this SOCKS proxy in every application which support SOCKS proxy like firefox etc. and use ProxyChains in every other case like which does not have SOCKS support or no proxy support at all.
In my institute (i think usually in all institutes), ssh port is automatically forwarded and hence does not require any proxy. Hence this is a very reliable method.and even works when proxy is down due to power down or restart.
In case you feel some difficulty and any of steps is not clear, please leave comment. i will try to explain and elaborate.