In close collaboration with Seoul National University's Structural Complexity Laboratory



This shows you the differences between two versions of the page.

Link to this comparison view

resource:sc_lab_info:fedora:socks [2016/03/27 11:18] (current)
rim created
Line 1: Line 1:
 +====== Using a SOCKS Proxy to Speed up SC Lab Browsing ======
 +Browsing of some pages on sc (especially,​ our wiki and the moodle pages) seems to be very slow from outside SNU. We are uncertain of the cause, but there is very strong suspicion that the root cause is the computer centre'​s filtering software, causing packets to be lost. Whatever the cause, it seems fairly easy to fix: use SOCKS proxying tunneled over ssh, which we believe should completely avoid the problem. SOCKS proxying can also help if you are overseas and getting timeouts from Korean servers (depending on the OSI layer the timeout is occurring on; it probably won't help with application layer timeouts). These instructions are set up for using as your SOCKS proxy; if you want to use a different linux server, just change the server name. Most linux/OSX systems have SOCKS proxying turned on by default.
 +===== Stage 1, Setting up the Tunnel: Unix (Linux, OSX, Cygwin/​Windows) =====
 +In a command shell or cygwin command window, create a tunnel to using port 1080:
 +ssh -C -D 1080 <​user>​
 +<​user>​ is your sc username. The port number can be pretty much anything you choose (preferably greater than 1028 for your convenience). Then see below.
 +== Why use Cygwin on Windows? ==
 +[[http://​​|Cygwin]] is an application that provides
 +a unix-style environment. I haven'​t actually tried SOCKS proxying with cygwin, ​
 +but it should work. Cygwin is worth installing anyway, for  a lot of reasons, including:
 +  - It provides a simple way of working compatibly with linux/MacOS users
 +  - It provides, for free, a lot of capabilities that otherwise cost for windows
 +===== Stage 1, Setting up the Tunnel: Windows using PuTTY =====
 +The exact details will vary according
 +to your version of PuTTY, but it will be something like:
 +  - Click on Session, set the Host Name to
 +  - Click on Connection/​Proxy,​ set
 +    - Proxy type to SOCKS5
 +    - Proxy hostname to
 +    - Port to 1080 (or your other choice)
 +  - Click on SSH/​Tunnels,​ set
 +    - Source port to 1080 (or your other choice) and click on Add (you should see D1080 appear)
 +    - In the second-bottom line, click on Dynamic
 +    - In the bottom line, click on Auto
 +  - Save your configuration! ​
 +    - Then click '​Open'​ and log in.
 +===== Stage 2: Using the Tunnel (all OSs) ===== 
 +I generally find it convenient to use a different browser for SOCKS proxying than I usually use (so I use firefox for normal browsing, mostly opera as the SOCKS proxy). That way, I can have one browser running with a proxy, and the other for websites that don't need the proxy. ​
 +In your browser, go to the proxying preferences pane (in linux firefox, it is under Preferences/​Advanced/​Settings;​ in windows, under Tools/​Options/​Advanced/​Settings). Choose manual proxying, and set your SOCKS proxy to localhost, port 1080. For most recent ssh installations,​ you should choose SOCKS5 protocol (if it doesn'​t work, please try SOCKS4). Don't set any other proxying (i.e. leave them as no host, port zero). Now use your browser as normal.
 +When you are finished browsing,​ //please// remember to set your proxy back to your normal defaults (proxying creates an extra load on sc, and it actually costs you slightly because wrapping your browsing in ssh protocol will require more/larger packets). ​
 +PS it definitely works - this page was created using an ssh SOCKS tunnel, first from linux, then using PuTTY from windows.
 +===== Stage 3: Closing the Tunnel (all OSs) ===== 
 +  - Turn off proxying in your browser (if you only use the browser for proxying, you probably don't need to do this)
 +  - Finish your tunnel session (if using ssh, just logout from the server; if using putty, terminate the session)