Skip to content

Commit

Permalink
feat: add all proxy env variable
Browse files Browse the repository at this point in the history
  • Loading branch information
escalate committed Feb 7, 2021
1 parent b387951 commit 997d73e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions proxy.plugin.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ _HTTP_PROXY=$(cat "${HOME}/.proxy/http_proxy")
_HTTPS_PROXY=$(cat "${HOME}/.proxy/https_proxy")
_FTP_PROXY=$(cat "${HOME}/.proxy/ftp_proxy")
_RSYNC_PROXY=$(cat "${HOME}/.proxy/rsync_proxy")
_ALL_PROXY=$(cat "${HOME}/.proxy/all_proxy")
_NO_PROXY=$(cat "${HOME}/.proxy/no_proxy")

enable_proxy() {
Expand All @@ -13,6 +14,8 @@ enable_proxy() {
export FTP_PROXY="${_FTP_PROXY}"
export rsync_proxy="${_RSYNC_PROXY}"
export RSYNC_PROXY="${_RSYNC_PROXY}"
export all_proxy="${_ALL_PROXY}"
export ALL_PROXY="${_ALL_PROXY}"
export no_proxy="${_NO_PROXY}"
export NO_PROXY="${_NO_PROXY}"
}
Expand All @@ -26,6 +29,8 @@ disable_proxy() {
unset FTP_PROXY
unset rsync_proxy
unset RSYNC_PROXY
unset all_proxy
unset ALL_PROXY
unset no_proxy
unset NO_PROXY
}
Expand All @@ -35,6 +40,7 @@ list_proxy() {
echo "HTTPS_PROXY=\"${_HTTPS_PROXY}\""
echo "FTP_PROXY=\"${_FTP_PROXY}\""
echo "RSYNC_PROXY=\"${_RSYNC_PROXY}\""
echo "ALL_PROXY=\"${_ALL_PROXY}\""
echo "NO_PROXY=\"${_NO_PROXY}\""
}

Expand Down

0 comments on commit 997d73e

Please sign in to comment.