Advertisement
Guest User

Untitled

a guest
Sep 21st, 2018
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. #!/usr/bin/env bash
  2. #set -x
  3. echo Please input your domain account and password
  4. read -p"account:" username
  5. read -p"password:" -s password
  6. echo
  7. echo Please choose a proxy server
  8. select proxy in proxy.huawei.com proxyuk.huawei.com proxyse-rd.huawei.com;
  9. do
  10. escape_pass=`echo -ne $password| xxd -plain | tr -d '\n' | sed 's/\(..\)/%\1/g'`
  11. break
  12. done
  13. export http_proxy="http://$username:$escape_pass@${proxy:-proxy}:8080/"
  14. export ftp_proxy=$http_proxy
  15. export https_proxy=$http_proxy
  16. my_ips=`ip -f inet addr | grep global | awk '{print $2}' | awk -F/ '{print $1}' | tr '\n' ','`
  17. host_names=`hostname -a | tr ' ' ','`
  18. 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