linux上配置代理服务器
方式一:
1. 安装代理软件
apt-get install tinyproxy 或 yum install tinyproxy
2. 修改代理配置
vim /etc/tinyproxy/tinyproxy.conf
打开之后修改下面两个重要配置: (1)找到“Allow 127.0.0.1”行,前面加上#号将其注释掉,表示所有的ip都可以连接上来使用代理。 (2)找到“Port 8888”:默认开放的端口为8888(可自行更改)
3. 重启服务
systemctl restart tinyproxy.service
4. 终端设置http代理
export http_proxy=http://ip:port
5. 测试
wget http://xxx.xxx.xxx.xxx/sxh/file/app-crash-test-signed.apk
6 清理代理
unset http_proxy
7 关闭代理服务
systemctl stop tinyproxy
8 查看代理状态
systemctl status tinyproxy.service
默认分类 2023-03-14 20:05:18 通过 网页 浏览(492)
共有0条评论!