debian11_sniproxy

apt reinstall libev4

apt install sniproxy

find / -name sniproxy

nano /etc/sniproxy.conf

user nobody
resolver {
nameserver 1.1.1.1 #指定NDS
#mode ipv4_only #只解析IPV4
}
listen 80 {
proto http
table http_hosts
access_log {
  filename /var/log/http_access.log
  priority notice
     }
}
table http_hosts {
(.*.|)cloudflare.com$ *#只允许自己的域名,改成自己的
}
listen 443 {
proto tls
table https_hosts
access_log {
  filename /var/log/https_access.log
  priority notice
     }
}
table https_hosts {
(.*.|)cloudflare.com$ *#只允许自己的域名,改成自己的
}

/usr/sbin/sniproxy -c /etc/sniproxy.conf

service sniproxy restart

好了

Last modification:November 1st, 2025 at 11:23 am

Leave a Comment