XTLS / Xray-examples

Some examples of uses for Xray-core.
https://t.me/projectXray
2.04k stars 745 forks source link

萌新求助:dokodemo->trojan TLS无法生效是明文的问题 #163

Closed zhongsx closed 5 months ago

zhongsx commented 12 months ago

环境:openwrt 版本22.03.5,做主路由, 流量使用nftables透明代理接入xray,出口使用trojan协议。 注:因为需要代理所有流量,所以没有配置dns什么的。都通过代理转发出去。 问题:无法建立链接,openwrt出口抓包,发现明文数据,明显TLS隧道配置不正确,各位大佬帮忙看看什么问题? 配置: [ { "log": {
"access": "/var/log/access",
"error": "/var/log/error",

    // Log level, one of "debug", "info", "warning", "error", "none"
    "loglevel": "debug"
},
"inbounds":[
    {
        "tag": "user_in",
        "protocol": "dokodemo-door", 
        "port": 18082, 
        "settings":{ 
            "network": "tcp,udp",
            "followRedirect": true
        },
        "streamSettings":{ 
            "sockopt":{
                "tproxy": "tproxy", 
                "mark":255
            }
        }
    }
],
"outbounds":[
    {
        "tag": "user_out", 
        "protocol": "trojan",
        "settings":{
            "servers":[ 
                {
                    "address": "110.242.68.4",
                    "port": 443,                        
                    "password": "111111111111111111111111",
                    "email": "username"                        
                }
            ]
        },
        "streamSettings":{
            "secruity": "tls",
            "network": "tcp",
            "tlsSettings":{
                "serveName": "www.baidu.com",                     
                "alpn":[      
                    "h2",              
                    "http/1.1"
                ]
            },
            "sockopt":{
                "mark":255
            }
        }
    }
]

} ]

Fangliding commented 5 months ago

请提供抓包数据和服务端配置