Check for available proxies instead of relying on the host name.

This commit is contained in:
hjp 2007-10-01 15:06:50 +00:00
parent fc9df1789f
commit d9f46033ce
2 changed files with 11 additions and 13 deletions

View File

@ -1,5 +1,5 @@
# #
# $Id: .zprofile,v 1.17 2006-12-18 16:22:26 hjp Exp $ # $Id: .zprofile,v 1.18 2007-10-01 15:06:50 hjp Exp $
# #
# this is sourced for login shells after .zshenv but before .zshrc # this is sourced for login shells after .zshenv but before .zshrc
# #
@ -24,3 +24,13 @@ if [ -f /etc/X11/rgb.txt ]
then then
export RGBDEF=/etc/X11/rgb.txt export RGBDEF=/etc/X11/rgb.txt
fi fi
unset http_proxy
for i in http://zeno.hjp.at:3128/ http://squid.wsr.ac.at:3128/
do
if http_proxy=$i wget -q -O /dev/null http://www.hjp.at
then
http_proxy=$i
break
fi
done

12
.zshenv
View File

@ -205,18 +205,6 @@ case "$FQDN" in
;; ;;
esac esac
case "$FQDN" in
*.hjp.at)
export http_proxy=http://zeno.hjp.at:3128/
;;
samkar.wsr.ac.at|wsrgeh.wsr.ac.at|laire.wsr.ac.at|spiridon*.wsr.ac.at|habanero.wsr.ac.at|haldir.wsr.ac.at|tanstaafl.wsr.ac.at|shalmaneser.wsr.ac.at)
unset http_proxy
;;
*.wsr.ac.at)
export http_proxy=http://squid.wsr.ac.at:3128/
;;
esac
case "$FQDN" in case "$FQDN" in