主要是为了根据不同域名将流量转发到不同的 trojan 和 vless 落地鸡.
几个人说可以优化,优化了半天又都说不行,完了又有几个人跑出来说可以优化~~~
直接 upstream 显然是不行的啊.
我也知道略显复杂,但是测试去除 SSL 这一段是不行的啊,想问一下大神还可以优化吗? 先感谢了
stream {
map $ssl_preread_server_name $name {
99web.domain.com localweb;
99tj.domain.com localtrojan;
99vs.domain.com 127.0.0.1:10443;
99ifog.domain.com 127.0.0.1:10444;
default web;
}
upstream dns_upstreams {
server 83.138.53.22x:446;
}
upstream localweb {
server 127.0.0.1:444;
}
upstream localtrojan {
server 127.0.0.1:441;
}
upstream localtrojan2 {
server 127.0.0.1:442;
}
server{
listen 10446 udp;
proxy_pass dns_upstreams;
}
server {
listen 443;
listen [::]:443;
proxy_pass $name;
ssl_preread on;
proxy_protocol on;
}
server {
listen 127.0.0.1:441 proxy_protocol;
proxy_pass localtrojan2;
}
server {
listen 127.0.0.1:10443 proxy_protocol ssl;
ssl_certificate /www/server/panel/vhost/cert/99.domain.com/fullchain.pem;
ssl_certificate_key /www/server/panel/vhost/cert/99.domain.com/privkey.pem;
proxy_ssl on;
proxy_ssl_server_name on;
proxy_pass gia.domain.com:443;
}
server {
listen 127.0.0.1:10444 proxy_protocol ssl;
ssl_certificate /www/server/panel/vhost/cert/99.domain.com/fullchain.pem;
ssl_certificate_key /www/server/panel/vhost/cert/99.domain.com/privkey.pem;
proxy_ssl on;
proxy_ssl_server_name on;
proxy_pass ifog.domain.com:443;
}
}
1
loveqianool 2022-03-19 15:14:45 +08:00 1
能优化到体感的程度吗,有时间优化这个不如买个专线转发,五块钱一个月。
|
2
jsjcjsjc OP @loveqianool 别这样啊,哈哈
专线也要落地解锁啊 |
3
yumusb 2022-03-19 16:55:00 +08:00
直接 vmess tls 套在 nginx 层 就不用考虑了
|
4
wangritian 2022-03-20 17:36:45 +08:00
clash
|