Skip to content

Instantly share code, notes, and snippets.

@ixiaohei
Last active November 29, 2018 01:22
Show Gist options
  • Save ixiaohei/9e9ad3af09ae1a9689efb30b5453fcb4 to your computer and use it in GitHub Desktop.
Save ixiaohei/9e9ad3af09ae1a9689efb30b5453fcb4 to your computer and use it in GitHub Desktop.
shell proxy

shell proxy

# alias for set proxy setting
alias setproxy='export all_proxy=socks5://127.0.0.1:1080;export no_proxy=localhost,127.0.0.1/8;echo "HTTP Proxy on";echo "all_proxy=$all_proxy";echo "no_proxy=$no_proxy";'

# alias for unset proxy setting
alias unsetproxy='unset all_proxy;echo "HTTP Proxy off";'

# alias for show proxy setting
alias showproxy='echo "proxy config for http";echo "all_proxy=$https_proxy";'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment