Skip to content

Instantly share code, notes, and snippets.

@shau-lok
Created October 23, 2017 02:52
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save shau-lok/9254dce83ca8da5727e1c308be5d7ae7 to your computer and use it in GitHub Desktop.
Save shau-lok/9254dce83ca8da5727e1c308be5d7ae7 to your computer and use it in GitHub Desktop.
terminal set proxy

add to ~/.zshrc

alias setproxy="export ALL_PROXY=socks5://127.0.0.1:1080"
alias unsetproxy="unset ALL_PROXY"
alias ip="curl -i http://httpbin.org/ip"

then restart termainl

if you want to set proxy, run

$ setproxy

if you want to test proxy, run

$ ip
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment