]>
code.delx.au - osx-proxyconf/blob - proxyconf.sh
3 if [ "$(sysconfig -q "HTTPEnable
")" = "1" ]; then
4 host="$(sysconfig -q "HTTPProxy
")"
5 port
="$(sysconfig -q "HTTPPort
")"
6 echo "export http_proxy=\"http://${host}:${port}\""
8 echo "unset http_proxy"
10 if [ "$(sysconfig -q "HTTPSEnable
")" = "1" ]; then
11 host="$(sysconfig -q "HTTPSProxy
")"
12 port
="$(sysconfig -q "HTTPSPort
")"
13 echo "export https_proxy=\"http://${host}:${port}\""
15 echo "unset https_proxy"
17 if [ "$(sysconfig -q "FTPEnable
")" = "1" ]; then
18 host="$(sysconfig -q "FTPProxy
")"
19 port
="$(sysconfig -q "FTPPort
")"
20 echo "export ftp_proxy=\"http://${host}:${port}\""
22 echo "unset ftp_proxy"
24 if [ -n "${host}" ]; then
25 no_proxy
="$(sysconfig ExceptionsList | tr '\n' ',' | sed 's/,$//g')"
26 echo "export no_proxy=\"${no_proxy}\""