Last active
July 3, 2016 06:03
Revisions
-
happypeter revised this gist
Sep 8, 2013 . 1 changed file with 4 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -16,6 +16,9 @@ networksetup -setsocksfirewallproxy "Ethernet 2" 127.0.0.1 7070 off sshpass -pvT45kde5Y9r ssh -N -D 7070 [email protected] #s1....s9, all available # ssh -N -D 7070 root@linode_us # 注意:有时候 linode_us 的 ssh 口如果被墙了,那么这个脚本执行的时候,看起来也是正常的,只不过 # 到浏览器中是不能看墙外的景色的。解决方法就是更换主机 IP the below to commands equals to click the proxy GUI # peter:~/bin$ networksetup -setsocksfirewallproxystate "Ethernet 2" off # peter:~/bin$ networksetup -setsocksfirewallproxystate "Ethernet 2" on -
happypeter revised this gist
Oct 26, 2012 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -13,7 +13,7 @@ trap "on_die" SIGINT trap "on_die" SIGHUP networksetup -setsocksfirewallproxy "Ethernet 2" 127.0.0.1 7070 off sshpass -pvT45kde5Y9r 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 -
happypeter revised this gist
Aug 24, 2012 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -5,7 +5,7 @@ on_die() { 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 -
happypeter revised this gist
Aug 24, 2012 . 1 changed file with 4 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,4 @@ #!/user/bin/env bash on_die() { echo @@ -15,8 +14,8 @@ 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 -
happypeter renamed this gist
Aug 24, 2012 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
happypeter revised this gist
Aug 24, 2012 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,11 +1,12 @@ #!/bin/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 what you see in "network preference" } trap "on_die" SIGTERM -
happypeter created this gist
Aug 24, 2012 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,21 @@ #!/usr/bin/env bash on_die() { echo echo byebye proxy echo networksetup -setsocksfirewallproxystate "Ethernet 2" off #close the proxy } 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