Skip to content

Xray(M+F+H+K+G+B+A)+Nginx | 2025/2/08的最新更新, 发现无法使用XHTTP #237

Closed Answered by lxhao61
1trapbox asked this question in Q&A
Discussion options

You must be logged in to vote

使用通配符证书、合并后的正确配置如下:
1、Nginx

stream {
    map $ssl_preread_server_name $tcpsni_name {
        h3.xx.yy            vless;
        zt.xx.yy           trojan;
        zh.xx.yy            http3;
    }
    upstream vless {
        server unix:/dev/shm/uds5443.sock;
    }
    upstream trojan {
        server unix:/dev/shm/uds6443.sock;
    }
    upstream http3 {
        server unix:/dev/shm/uds8443.sock;
    }
    server {
        listen 443;
        #listen [::]:443;
        ssl_preread on;
        proxy_protocol on;
        proxy_pass $tcpsni_name;
    }
}

http {
    # 其他配置和日志这里省略掉

    server {
        listen 80;
        #listen [::]:80;
        return 301 https://$host$request_uri;
    }

 …

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@1trapbox
Comment options

@1trapbox
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by lxhao61
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants