Use Squid+Stunnel+SwitchyOmega to Setup a Safe Proxy

====== Use Squid+Stunnel+SwitchyOmega to Setup a Safe Proxy =========
1. install 
  a. yum: 
yum install openssl openssl-devel squid
  b. or 编译安装 ./configure --enable-ssl --with-openssl && make && make install
2. configure
 a. 添加安全认证和开启https端口
vim  squid.conf
# auth
auth_param basic program /usr/lib64/squid/ncsa_auth /etc/squid/passwd
auth_param basic children 5
auth_param basic credentialsttl 2 hours
auth_param basic realm Example.com's Squid proxy-caching
acl auth_user proxy_auth REQUIRED
http_access allow auth_user


# And finally deny all other access to this proxy
http_access deny all


# Squid normally listens to port 3128
#http_port 3128
https_port 4430 cert=/etc/squid/dbquan.com.crt key=/etc/squid/dbquan.com.key
3. 其中 
 a. dbquan.com.crt dbquan.com.key 文件使用下面的命令来生成
openssl req -new > dbquan.com.csr
openssl rsa -in privkey.pem -out dbquan.com.key
openssl x509 -in dbquan.com.csr -out dbquan.com.crt -req -signkey dbquan.com.key -days 3650
 b. passwd 文件使用 htpasswd 生成,如在装有apache的机器上执行
 htpasswd -c /etc/squid/passwd auth_user  
4. Download stunnel in client: https://www.stunnel.org/downloads.html
 a. edit stunnel.conf file, and left the text below
client = yes
[https]
accept = 127.0.0.1:8088
connect = 你的代理服务IP:4430
 b. reload stunnel.conf
5. Donwnload SwitchyOmega
 a. 根据下面wiki的提示设置
   * https://github.com/FelisCatus/SwitchyOmega/wiki/GFWList
6. Done
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值