proxy in linux
proxy for linux(centos/rhel)
Define the environment variables in /etc/environment file if you want to add a permanent proxy in the CentOS/RHEL 7.
1 | echo "all_proxy=http://proxy.example.com:3128/" > /etc/environment |
For bash and sh users, add the export line given above into a new file called /etc/profile.d/http_proxy.sh file:
1 | echo "export all_proxy=http://proxy.example.com:3128/" > /etc/profile.d/http_proxy.sh |
PS
Env Variable | Desc | e.g. |
---|---|---|
http_proxy | 10.0.0.51:8080 http://10.0.0.51:8080 user:[email protected]:8080 socks4://10.0.0.51:1080 socks5://192.168.1.1:1080 |
|
https_proxy | ditto | |
ftp_proxy | ditto | |
all_proxy | if this variable is set, there is no need to set the above variables | ditto |
no_proxy | .aiezu.com,10...,192.168..,*.local,localhost,127.0.0.1 |