File created: howto/use-sockets-via-http-proxy [Diff]
-- /dev/null++ b/howto/use-sockets-via-http-proxy
@@ -1 +1,31 @@
h1. How to use HTTP proxy to access normal Internet
# Shell account with normal internet access and listening to port 443 (if only 80 and 443 ports are permitted)
# ssh on localhost
# GNU compiler toolchain on localhost to build corkscrew and tsocks.
# HTTP proxy access
# "tsocks":http://tsocks.sourceforge.net/ (optional)
1. Download "corkscrew":http://www.agroman.net/corkscrew/corkscrew-2.0.tar.gz and compile it (./configure && make)
2. If you don't have .ssh/config, create it and set up permissions (chmod a-rw,g-rw,u+rw)
3. Add following code to .ssh/config:
bc. ProxyCommand /home/user/corkscrew-2.0/corkscrew proxy.example.com 8080 %h %p
where @proxy.example.com@ and @8080@ are your proxy's host and port, and @/home/user/corkscrew-2.0/corkscrew@ is path to corkscrew executable. If proxy needs authentication, create a file with username and password separated by ":" and use its path as last argument to corkscrew.
bc. % ssh -D 8081 -p 443 myhost
where @8081@ is local port on which SOCKS-proxy to normal internet will be listening, @443@ is remote ssh port and @myhost@ is your SSH server.
5. Use localhost:8081 as SOCKS-proxy to access the internet. If program does not support it, you can use tsocks to wrap it.