Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env bash
- #set -x
- echo Please input your domain account and password
- read -p"account:" username
- read -p"password:" -s password
- echo
- echo Please choose a proxy server
- select proxy in proxy.huawei.com proxyuk.huawei.com proxyse-rd.huawei.com;
- do
- escape_pass=`echo -ne $password| xxd -plain | tr -d '\n' | sed 's/\(..\)/%\1/g'`
- break
- done
- export http_proxy="http://$username:$escape_pass@${proxy:-proxy}:8080/"
- export ftp_proxy=$http_proxy
- export https_proxy=$http_proxy
- my_ips=`ip -f inet addr | grep global | awk '{print $2}' | awk -F/ '{print $1}' | tr '\n' ','`
- host_names=`hostname -a | tr ' ' ','`
- export no_proxy=127.0.0.1,.huawei.com,localhost,local,.local,$my_ips$host_names
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement