stunnel

stunnel

客户端

client = yes
cert=D:\Soft\stunnel\config\stunnel.pem
[squid]
accept = 9002
connect = 10.0.0.3:8000

服务端

cert = /etc/stunnel/stunnel.pem
client = no
[squid]
accept = 8000
connect = 127.0.0.1:9000

证书

openssl genrsa -out key.pem 2048
openssl req -new -x509 -key key.pem -out cert.pem -days 36500
cat key.pem cert.pem >> /etc/stunnel/stunnel.pem