自建缓存代理服务器
企业开发
2019-05-30 17:11:38
阅读次数: 0
工具及软件
- vps
一台有公网ip能上google的虚拟机
- Squid
Squid is a fully-featured HTTP/1.0 proxy which is almost a fully-featured HTTP/1.1 proxy.
官方网址:http://www.squid-cache.org/
- Stunnel
Stunnel is a proxy designed to add TLS encryption functionality to existing clients and servers without any changes in the programs' code.
官方地址 :https://www.stunnel.org/
VPS配置
- 安装软件squid ,stunnel
sudo apt-get –y install squid stunnel4
- squid服务配置 参考官方网页
- stunnel 服务端配置文件 /etc/stunnel/stunnel.conf
debug = 3
cert = /etc/stunnel/stunnel.pem
key = /etc/stunnel/stunnel.pem
[https]
accept = 0.0.0.0:8787
connect = 127.0.0.1:3128
客户端安装配置
- Windows客户端官网下载安装
- Linux/Macos通过apt-get、homebrew安装
- stunnel 客户端配置文件 /etc/stunnel/stunnel.conf
debug = 3
cert = /etc/stunnel/stunnel.pem
key = /etc/stunnel/stunnel.pem
[https]
client = yes
accept = 0.0.0.0:8888
connect = VPSIP:8787
开启关闭代理上网
转载自blog.51cto.com/14367725/2402748