-
-
Save dgoguerra/66d496345ee7e53169ad to your computer and use it in GitHub Desktop.
Revisions
-
dgoguerra revised this gist
Jan 18, 2016 . 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 @@ -8,11 +8,12 @@ PROXY_PORT=1080 # authentication. SOCKS_PROC_USER="username" SOCKS_PROC_HOST="example.com" SOCKS_PROC_IDENTITY="~/.ssh/id_rsa" SOCKS_PROC_LOG=/tmp/ssh-socks-proxy-log.txt SOCKS_PROC_PIDFILE=/tmp/ssh-socks-proxy-pid.txt SOCKS_PROC_CMD="ssh -i $SOCKS_PROC_IDENTITY -t -t -D $PROXY_HOST:$PROXY_PORT $SOCKS_PROC_USER@$SOCKS_PROC_HOST" if [[ $1 == "on" ]]; then nohup $SOCKS_PROC_CMD > "$SOCKS_PROC_LOG" 2>&1 & -
dgoguerra revised this gist
Sep 25, 2015 . 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 @@ -6,12 +6,13 @@ PROXY_PORT=1080 # A host where ssh can login without interaction, with a key-based # authentication. SOCKS_PROC_USER="username" SOCKS_PROC_HOST="example.com" SOCKS_PROC_LOG=/tmp/ssh-socks-proxy-log.txt SOCKS_PROC_PIDFILE=/tmp/ssh-socks-proxy-pid.txt SOCKS_PROC_CMD="ssh -t -t -D $PROXY_HOST:$PROXY_PORT $SOCKS_PROC_USER@$SOCKS_PROC_HOST" if [[ $1 == "on" ]]; then nohup $SOCKS_PROC_CMD > "$SOCKS_PROC_LOG" 2>&1 & -
dgoguerra revised this gist
Sep 7, 2015 . No changes.There are no files selected for viewing
-
dgoguerra revised this gist
Sep 7, 2015 . 1 changed file with 17 additions and 2 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,14 +1,29 @@ #!/bin/sh PROXY_INTERFACE="Wi-Fi" PROXY_HOST=127.0.0.1 PROXY_PORT=1080 # A host where ssh can login without interaction, with a key-based # authentication. SOCKS_PROC_HOST="example.com" SOCKS_PROC_LOG=/tmp/ssh-socks-proxy-log.txt SOCKS_PROC_PIDFILE=/tmp/ssh-socks-proxy-pid.txt SOCKS_PROC_CMD="ssh -t -t -D $PROXY_HOST:$PROXY_PORT $SOCKS_PROC_HOST" if [[ $1 == "on" ]]; then nohup $SOCKS_PROC_CMD > "$SOCKS_PROC_LOG" 2>&1 & echo $! > "$SOCKS_PROC_PIDFILE" sudo networksetup -setsocksfirewallproxy "$PROXY_INTERFACE" $PROXY_HOST $PROXY_PORT echo "SOCKS proxy enabled" elif [[ $1 == "off" ]]; then sudo kill -9 $(cat "$SOCKS_PROC_PIDFILE") rm "$SOCKS_PROC_PIDFILE" sudo networksetup -setsocksfirewallproxystate "$PROXY_INTERFACE" off echo "SOCKS proxy disabled" -
mnewt revised this gist
Sep 13, 2012 . 1 changed file with 0 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 @@ -25,7 +25,6 @@ elif [[ $1 == "status" ]]; then echo else echo "`basename $0` toggles SOCKS proxy settings on OS X" echo echo "Usage: " -
mnewt revised this gist
Sep 13, 2012 . 1 changed file with 13 additions and 0 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 @@ -12,13 +12,26 @@ elif [[ $1 == "off" ]]; then sudo networksetup -setsocksfirewallproxystate "$PROXY_INTERFACE" off echo "SOCKS proxy disabled" elif [[ $1 == "status" ]]; then echo "======================================================" echo "Network Services:" echo "======================================================" networksetup -listallnetworkservices echo echo "======================================================" echo "Current SOCKS Proxy Settings:" echo "======================================================" networksetup -getsocksfirewallproxy "$PROXY_INTERFACE" echo else echo $1 echo "`basename $0` toggles SOCKS proxy settings on OS X" echo echo "Usage: " echo " $ proxy on # turns SOCKS proxy on" echo " $ proxy off # turns SOCKS proxy off" echo " $ proxy status # prints status of proxy settings" echo echo "proxy interface: " $PROXY_INTERFACE echo "proxy host: " $PROXY_HOST -
mnewt renamed this gist
Sep 13, 2012 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
mnewt created this gist
Sep 13, 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,28 @@ #!/bin/sh PROXY_INTERFACE="USB Ethernet" PROXY_HOST=localhost PROXY_PORT=1080 if [[ $1 == "on" ]]; then sudo networksetup -setsocksfirewallproxy "$PROXY_INTERFACE" $PROXY_HOST $PROXY_PORT echo "SOCKS proxy enabled" elif [[ $1 == "off" ]]; then sudo networksetup -setsocksfirewallproxystate "$PROXY_INTERFACE" off echo "SOCKS proxy disabled" else echo $1 echo "`basename $0` toggles SOCKS proxy settings on OS X" echo echo "Usage: " echo " $ proxy on # turns SOCKS proxy on" echo " $ proxy off # turns SOCKS proxy off" echo echo "proxy interface: " $PROXY_INTERFACE echo "proxy host: " $PROXY_HOST echo "proxy port: " $PROXY_PORT echo exit 65 # end process with error to indicate incorrect arguments fi