自建缓存代理服务器

工具及软件

  1. vps
    一台有公网ip能上google的虚拟机
  2. 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/
  3. 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配置

  1. 安装软件squid ,stunnel
    sudo apt-get –y install squid stunnel4
  2. squid服务配置 参考官方网页
  3. 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

客户端安装配置

  1. Windows客户端官网下载安装
  2. Linux/Macos通过apt-get、homebrew安装
  3. 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

开启关闭代理上网

  • windows

自建缓存代理服务器

  • mac osx

自建缓存代理服务器

  • iphone

自建缓存代理服务器

猜你喜欢

转载自blog.51cto.com/14367725/2402748