forked from Oscad/Oscad-installer-linux-v1
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setProxy.sh
31 lines (24 loc) · 794 Bytes
/
setProxy.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/bash
echo -n 'Proxy Hostname :'
read proxyHostname
echo -n 'Proxy Port :'
read proxyPort
echo -n username@$proxyHostname:$proxyPort :
read username
echo -n 'Password :'
read -s passwd
unset http_proxy
unset https_proxy
unset HTTP_PROXY
unset HTTPS_PROXY
unset ftp_proxy
unset FTP_PROXY
export http_proxy=http://$username:$passwd@$proxyHostname:$proxyPort
export https_proxy=http://$username:$passwd@$proxyHostname:$proxyPort
export https_proxy=http://$username:$passwd@$proxyHostname:$proxyPort
export HTTP_PROXY=http://$username:$passwd@$proxyHostname:$proxyPort
export HTTPS_PROXY=http://$username:$passwd@$proxyHostname:$proxyPort
export ftp_proxy=http://$username:$passwd@$proxyHostname:$proxyPort
export FTP_PROXY=http://$username:$passwd@$proxyHostname:$proxyPort
"$@"
echo