系统代理 #
vi ~/.profile
export http_proxy='http://myproxy.example.com:1080/'
export https_proxy='https://myproxy.example.com:1080/'
export ftp_proxy='http://myproxy.example.com:1080/'
export ALL_PROXY='socks://myproxy.example.com:1080/'
export all_proxy='socks://myproxy.example.com:1080/'
export no_proxy='example.com'
$ sudo apt-get install socat
$ wget http://git.yoctoproject.org/cgit/cgit.cgi/poky/plain/scripts/oe-git-proxy
$ cp oe-git-proxy ~/bin
$ chmod +x ~/bin/oe-git-proxy
export GIT_PROXY_COMMAND="oe-git-proxy"
export NO_PROXY=$no_proxy
vi ~/.wgetrc
https_proxy = http://socks.example.com:1080
http_proxy = http://socks.example.com:1080
ftp_proxy = http://socks.example.com:1080
no_proxy = example.com:1080;127.0.0.1
use_proxy = on
https://wiki.yoctoproject.org/wiki/Working_Behind_a_Network_Proxy
透明代理 #
https://blog.a1253247.info/2020/01/shadowsocks.html
代理转换 #
/etc/polipo/config
/etc/polipo/config
systemctl status polipo
www.codevoila.com/post/16/convert-socks-proxy-to-http-proxy-using-polipo
测试网速 #
# Server
tankywoo@gentoo-local::~/ » iperf -s
------------------------------------------------------------
Server listening on TCP port 5001
TCP window size: 85.3 KByte (default)
------------------------------------------------------------
[ 4] local 127.0.0.1 port 5001 connected with 127.0.0.1 port 56071
[ ID] Interval Transfer Bandwidth
[ 4] 0.0-10.0 sec 27.0 GBytes 23.2 Gbits/sec
# Client
tankywoo@gentoo-local::~/ » iperf -c localhost
------------------------------------------------------------
Client connecting to localhost, TCP port 5001
TCP window size: 647 KByte (default)
------------------------------------------------------------
[ 3] local 127.0.0.1 port 56071 connected with 127.0.0.1 port 5001
[ ID] Interval Transfer Bandwidth
[ 3] 0.0-10.0 sec 27.0 GBytes 23.2 Gbits/sec
由于没有公钥,无法验证下列签名: #
apt updtate 时提示错误 NO_PUBKEY 648ACFD622F3D138 NO_PUBKEY 0E98404D386FA1D9
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0E98404D386FA1D9
server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none #
touch /etc/apt/apt.conf.d/99verify-peer.conf && echo >>/etc/apt/apt.conf.d/99verify-peer.conf "Acquire { https::Verify-Peer false }"