Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- PATH=/bin:/usr/bin:/sbin:/usr/sbin
- IP=`ifconfig |grep -Eo '([1-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\.([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])){3}'|head -1`
- echo $IP
- NET=`awk -F. '{print $1"."$2"."$3}' <<< $IP`
- echo $NET
- if [ "$NET" == "10.10.0" ]; then
- export http_proxy=http://10.10.0.14:8080
- export https_proxy=http://10.10.0.14:8080
- export ftp_proxy=http://10.10.0.14:8080
- else
- export http_proxy=http://10.1.1.101:8080
- export https_proxy=http://10.1.1.101:8080
- export ftp_proxy=http://10.1.1.101:8080
- fi
- export no_proxy="10.10.0.150,localhost"
- echo $http_proxy $https_proxy $ftp_proxy $no_proxy
- exit 0;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement