Skip to content

Instantly share code, notes, and snippets.

@huang-xiao-jian
Created May 7, 2018 02:19
Show Gist options
  • Save huang-xiao-jian/fd766a77878a88e429d2fab8f2a09cca to your computer and use it in GitHub Desktop.
Save huang-xiao-jian/fd766a77878a88e429d2fab8f2a09cca to your computer and use it in GitHub Desktop.
OSX socks 系统级代理
# 获取所有网络
# 替换下列 Ethernet
networksetup -listnetworkserviceorder;
# Set the SOCKS proxy to local SSH tunnel
networksetup -setsocksfirewallproxy "Ethernet" 127.0.0.1 1086
#To clear the domain and port
networksetup -setsocksfirewallproxy "Ethernet" 127.0.0.1 1086
#To turn the SOCKS proxy off
networksetup -setsocksfirewallproxystate "Ethernet" off
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment