Skip to content

Instantly share code, notes, and snippets.

@matthijn
Created February 22, 2016 02:59
Show Gist options
  • Save matthijn/10d0ab46c1710b97f6ac to your computer and use it in GitHub Desktop.
Save matthijn/10d0ab46c1710b97f6ac to your computer and use it in GitHub Desktop.
Socks Proxy OSX easy terminal script
#!/bin/bash
#Change OSX Wifi settings to use socks proxy
sudo networksetup -setsocksfirewallproxy "Wi-Fi" localhost 2000
#Setup a socks proxy over ssh to a server (will ask for password and block further execution untill connection is closed)
ssh -N -g -D 2000 [email protected]
#Stop using OSX Wifi proxy
sudo networksetup -setsocksfirewallproxystate "Wi-Fi" off
@matthijn
Copy link
Author

For when you want some more privacy on a public wifi. Or when some pages are blocked on your current wifi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment