Diff: [root] @ 0aacea553ea | faq | css


File created: 33188 howto/use-sockets-via-http-proxy [Diff]

diff --git a/howto/use-sockets-via-http-proxy b/howto/use-sockets-via-http-proxy
new file mode 100644
index 0000000..8bc1a39
-- /dev/null
++ b/howto/use-sockets-via-http-proxy
@@ -0,0 +1,30 @@
h1. How to use HTTP proxy to access normal Internet

h2. Prerequisites

# Shell account with normal internet access and listening to port 443 (if only 80 and 443 ports are permitted)
# ssh on localhost
# "corkscrew":http://www.agroman.net/corkscrew/
# GNU compiler toolchain on localhost to build corkscrew and tsocks.
# HTTP proxy access
# "tsocks":http://tsocks.sourceforge.net/ (optional)

h2. So.

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.

4. Run:

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.
\ No newline at end of file

By Voker57 on 2010-10-16 12:48:19 +0400 Powered by bitcheese wiki engine