]>
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 if [ "$(sysconfig -q "HTTPSEnable
")" = "1" ]; then
9 host="$(sysconfig -q "HTTPSProxy
")"
10 port
="$(sysconfig -q "HTTPSPort
")"
11 echo "export https_proxy=\"http://${host}:${port}\""
13 if [ "$(sysconfig -q "FTPEnable
")" = "1" ]; then
14 host="$(sysconfig -q "FTPProxy
")"
15 port
="$(sysconfig -q "FTPPort
")"
16 echo "export ftp_proxy=\"http://${host}:${port}\""
18 if [ -n "${host}" ]; then
19 no_proxy
="$(sysconfig ExceptionsList | tr '\n' ',' | sed 's/,$//g')"
20 echo "export no_proxy=\"${no_proxy}\""