开启代理

ssh 开启 socks 代理

1
nohup ssh -N -D 127.0.0.1:65500 node1 &>> /dev/null &

GoProxy 代理工具

GitHub - snail007/goproxy
GOPROXY anual

1
2
3
4
curl -L https://mirrors.host900.com/https://raw.githubusercontent.com/snail007/goproxy/master/install_auto.sh | bash

# start proxy in background
proxy http -t tcp -p "0.0.0.0:65500" --forever --log proxy.log --daemon

设置代理

1
2
3
4
5
6
7
export http_proxy=http://your_ip_proxy:port/
export https_proxy=$http_proxy
export ftp_proxy=$http_proxy
export dns_proxy=$http_proxy
export rsync_proxy=$http_proxy
export no_proxy="localhost,127.0.0.1,localaddress,.localdomain.com"
export ALL_PROXY="socks5h://localhost:port"

wget 代理

How to set proxy for wget?

设置 wget 的配置文件

For all users of the system via the /etc/wgetrc or for the user only with the ~/.wgetrc file:

use_proxy=on
http_proxy=127.0.0.1:8080
https_proxy=127.0.0.1:8080
or via -e options placed after the URL:

wget … -e use_proxy=on -e http_proxy=127.0.0.1:8080 …