Last active
January 7, 2018 11:06
-
-
Save corvofeng/5d3c33f51baf364ead9d7154194bd638 to your computer and use it in GitHub Desktop.
fish_proxy_setting
This file contains 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 characters
# 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