微慑信息网

nginx 中转配置

nginx 中转配置

 

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;
    }

}

 

本文标题:nginx 中转配置
本文链接:
(转载请附上本文链接)
https://vulsee.com/archives/vulsee_2022/0311_16213.html
转载请附本站链接,未经允许不得转载,,谢谢:微慑信息网-VulSee.com » nginx 中转配置
分享到: 更多 (0)

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

微慑信息网 专注工匠精神

访问我们联系我们