Using a SOCKS proxy over SSH - Trustmania/PGO-mapscan-opt GitHub Wiki

If your IP gets banned or you'd like to spread out your workers over an IP range and have SSH access to other computers (or convince friends and relatives to let you hook up a Raspberry Pi at their house) you can use a SOCKS proxy over SSH to filter your traffic through that remote box.

##Create the SOCKS proxy ###From a Mac or Linux machine: Open your command line and start the connection by running ssh -fN -D <port number> <remote computer> For example, you may enter something like ssh -fN -D 55000 [email protected]

###From Windows (Using PuTTY): Open PuTTY and in the left-hand panel, navigate through Connection > SSH > Tunnels (see below). Enter a port number in the Source Port box and select the Dynamic radio button. Click Add and “D” will appear in the Forwarded Ports list.

Now head back to Session at the top of the left-hand panel, type a name in the Saved Sessions box (“tunnel”), and click Save. Click Open at the bottom of the PuTTY and a new window will pop up asking for your login name; type it in and press Enter. Type your password in and press Enter.

##Add the proxy to usersettings.json Edit your res/usersettings.json file and under the profiles section, add the proxy as socks5://localhost:<port number>.

If you used port 55000 as in the example above, your profile may end up looking as follows:

"id": 0,
    "type": "ptc",
    "username": "agent0",
    "password": "pass",
    "proxy": "socks5://localhost:55000",
    "coordinates":
    {
        "lat": 0,
        "lng": 0
    },
    "learn_file": "INSERT_NAME"

Note that you will always use socks5://localhost regardless of the machine you connected to because you are tunneling all the traffic from the port you selected on your local machine.