Skip to content

Instantly share code, notes, and snippets.

@lovejavaee
Created September 7, 2018 16:43
Show Gist options
  • Save lovejavaee/ced99a2752f73ab36ee34dfdca115731 to your computer and use it in GitHub Desktop.
Save lovejavaee/ced99a2752f73ab36ee34dfdca115731 to your computer and use it in GitHub Desktop.
command line proxy switch
#############################################################
# For Proxy
# export http_proxy="127.0.0.1:1080"
# export http_proxy="socks5://127.0.0.1:1080"
# export ALL_PROXY=socks5://127.0.0.1:1080
# alias setproxy="export ALL_PROXY=socks5://127.0.0.1:1080"
# alias unsetproxy="unset ALL_PROXY"
# alias ip="curl -i http://ip.cn"
# export http_proxy="127.0.0.1:1080"
# export http_proxy="socks5://127.0.0.1:1080"
# export https_proxy="socks5://127.0.0.1:1080"
# export ALL_PROXY=socks5://127.0.0.1:1080
#
# For Socket5-Proxy
alias proxy-socks5-on="export ALL_PROXY=socks5://127.0.0.1:1086"
alias proso="export ALL_PROXY=socks5://127.0.0.1:1086"
alias proxy-socks5-off="unset ALL_PROXY"
#
# For Http-Proxy
alias proxy-http-on='export http_proxy=127.0.0.1:1087;export https_proxy=$http_proxy'
alias proxy-http-off='unset http_proxy;unset https_proxy'
alias proxy-off='proxy-socks5-off && proxy-http-off'
# alias proxy-test='env | ag proxy'
alias proxy-test='env | ag proxy && curl ipinfo.io '
alias proxy-show='env | ag proxy'
#############################################################
@lovejavaee
Copy link
Author

lovejavaee commented Sep 7, 2018

# costom
# For alias ssh to oracle & hadoop
alias rm='rmtrash'
alias al='alias'
alias a='ag'
alias f='gfind'
alias c='cat'
alias v='vi'
alias p='pass'
alias t='tig'
alias viz='vim ~/.zshrc'
alias e='emacs'
alias b='brew'
alias l='ls -lahH --color=auto'
alias le='less'
alias ll='ls -la'
alias ds='du -sh'
alias o='open'
alias net='netstat'
alias https='http --default-scheme=https'
# alias .='source ~/.zshrc'
alias f.='open .'

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