linux 代理

env

1
2
export http_proxy=http://192.168.1.20:7890
export https_proxy=http://192.168.1.20:7890

profile

~/.profile 持久化当前用户的代理,全局在 /etc/profile

1
2
export http_proxy=http://192.168.1.20:7890
export https_proxy=http://192.168.1.20:7890

wget

修改 ~/.wgetrc 创建 wget 代理

1
2
3
4
5
6
7
8
#You can set the default proxies for Wget to use for http, https, and ftp.
# They will override the value in the environment.
https_proxy = http://192.168.1.20:7890
http_proxy = http://192.168.1.20:7890
ftp_proxy = http://192.168.1.20:7890

# If you do not want to use proxy at all, set this to off.
use_proxy = on