Skip to content

Commit 997d73e

Browse files
committed
feat: add all proxy env variable
1 parent b387951 commit 997d73e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

proxy.plugin.zsh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ _HTTP_PROXY=$(cat "${HOME}/.proxy/http_proxy")
22
_HTTPS_PROXY=$(cat "${HOME}/.proxy/https_proxy")
33
_FTP_PROXY=$(cat "${HOME}/.proxy/ftp_proxy")
44
_RSYNC_PROXY=$(cat "${HOME}/.proxy/rsync_proxy")
5+
_ALL_PROXY=$(cat "${HOME}/.proxy/all_proxy")
56
_NO_PROXY=$(cat "${HOME}/.proxy/no_proxy")
67

78
enable_proxy() {
@@ -13,6 +14,8 @@ enable_proxy() {
1314
export FTP_PROXY="${_FTP_PROXY}"
1415
export rsync_proxy="${_RSYNC_PROXY}"
1516
export RSYNC_PROXY="${_RSYNC_PROXY}"
17+
export all_proxy="${_ALL_PROXY}"
18+
export ALL_PROXY="${_ALL_PROXY}"
1619
export no_proxy="${_NO_PROXY}"
1720
export NO_PROXY="${_NO_PROXY}"
1821
}
@@ -26,6 +29,8 @@ disable_proxy() {
2629
unset FTP_PROXY
2730
unset rsync_proxy
2831
unset RSYNC_PROXY
32+
unset all_proxy
33+
unset ALL_PROXY
2934
unset no_proxy
3035
unset NO_PROXY
3136
}
@@ -35,6 +40,7 @@ list_proxy() {
3540
echo "HTTPS_PROXY=\"${_HTTPS_PROXY}\""
3641
echo "FTP_PROXY=\"${_FTP_PROXY}\""
3742
echo "RSYNC_PROXY=\"${_RSYNC_PROXY}\""
43+
echo "ALL_PROXY=\"${_ALL_PROXY}\""
3844
echo "NO_PROXY=\"${_NO_PROXY}\""
3945
}
4046

0 commit comments

Comments
 (0)