1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
# Automate Proxy Server Settings In Linux
# create Bash functions as follows (add to your ~/.bashrc file):
$ vim ~/.bashrc
# Set Proxy
function proxyset() {
export {http,https,ftp}_proxy="http://PROXY_SERVER:PORT"
}
# Unset Proxy
function proxyunset() {
unset {http,https,ftp}_proxy
}
$ source ~/.bashrc
# Use
$ proxyset
$ proxyunset
|