Created
May 7, 2018 02:19
-
-
Save huang-xiao-jian/fd766a77878a88e429d2fab8f2a09cca to your computer and use it in GitHub Desktop.
OSX socks 系统级代理
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 获取所有网络 | |
# 替换下列 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