Skip to content

Instantly share code, notes, and snippets.

@corvofeng
Last active January 7, 2018 11:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save corvofeng/5d3c33f51baf364ead9d7154194bd638 to your computer and use it in GitHub Desktop.
Save corvofeng/5d3c33f51baf364ead9d7154194bd638 to your computer and use it in GitHub Desktop.
fish_proxy_setting
# When i use fish shell, I need export proxy and unset proxy like in bash
# No Proxy
function noproxy
#/usr/local/sbin/noproxy #turn off proxy server
#unset http_proxy https_proxy HTTP_PROXY HTTPS_PROXY
set -g -e http_proxy
set -g -e https_proxy
set -g -e HTTP_PROXY
set -g -e HTTPS_PROXY
end
# Proxy
function setproxy
# export http_proxy=http://*.*.*.*:8080
# export https_proxy=http://*.*.*.*:8080
# sh /usr/local/sbin/proxyon #turn on proxy server
set -g -x http_proxy http://127.0.0.1:18118
set -g -x HTTP_PROXY $http_proxy
set -g -x https_proxy $http_proxy
set -g -x HTTPS_PROXY $https_proxy
# export http_proxy https_proxy HTTP_PROXY HTTPS_PROXY
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment