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