-
-
Save zdway10/1b77892b3a3ca871a3f54fa82005aa86 to your computer and use it in GitHub Desktop.
FUCK GWF apple script
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
#!/user/bin/env bash | |
on_die() { | |
echo | |
echo byebye proxy | |
echo | |
networksetup -setsocksfirewallproxystate "Ethernet 2" off #close the proxy | |
# the name can be "wifi" or "Ethernet 1", just see what is listed in "network preference" | |
} | |
trap "on_die" SIGTERM | |
trap "on_die" SIGINT | |
trap "on_die" SIGHUP | |
networksetup -setsocksfirewallproxy "Ethernet 2" 127.0.0.1 7070 off | |
sshpass -pvT45ku5Y9r ssh -N -D 7070 [email protected] #s1....s9, all available | |
# ssh -N -D 7070 root@linode_us | |
# the below to commands equals to click the proxy GUI | |
# peter:~/bin$ networksetup -setsocksfirewallproxystate "Ethernet 2" off | |
# peter:~/bin$ networksetup -setsocksfirewallproxystate "Ethernet 2" on |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment