TinyProxy是一个HTTP代理服务端,使用比较简单。
在国外机(Github无阻的机)上安装TinyProxy(以下CentOS7):
1 2 3 |
wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm rpm -Uvh epel-release-latest-7*.rpm yum install tinyproxy |
配置tinyproxy
修改/etc/tinyproxy/tinyproxy.conf文件
1 2 |
#Allow 127.0.0.1 (127.0.0.1修改为客户端IP或者直接#注释不限制IP) Port 是 TinyProxy 的监听端口,修改成自定义 |
启动Tinyproxy服务
1 2 |
systemctl restart tinyproxy.service systemctl enable tinyproxy.service |
客户端设置(127.0.0.1为服务端IP):
1 2 3 |
export http_proxy=127.0.0.1:8888 export https_proxy=127.0.0.1:8888 export ftp_proxy=127.0.0.1:8888 |
客户端取消代理:
1 2 |
unset http_proxy unset https_proxy |
原创文章,作者:discovery,如若转载,请注明出处:https://www.pingzz.com/jiaocheng/xitong/356.html