Xray-core icon indicating copy to clipboard operation
Xray-core copied to clipboard

Want xtls to support socks

Open cod-soap opened this issue 3 years ago • 5 comments

I'm testing xray-core performance now. when I want to try socks5 protocol with xtls. Happend the flowing error :

Failed to start: main: failed to load config files: [xxxx.json] > /infra/conf: XTLS doesn't supports socks for now. image

So,Is any plan For xtls to support socks? Or I do it by myself, How to do it, I need some suggestion.

Here is My config.json

{
    "inbounds": [
        {
            "port": 8000,
            "protocol": "socks",
            "settings": {
                "clients": [
                    {
                        "id": "1eb6e917-774b-4a84-aff6-b058577c60a5"
                    }
                ]
            },
            "streamSettings": {
                "network": "tcp",
                "security": "xtls",
                "xtlsSettings": {
                    "minVersion": "1.2",
                    "maxVersion": "1.2",
                    "certificates": [
                        {
                            "certificateFile": "xxx.crt",
                            "keyFile": "xxx.key"
                        }
                    ]
                }
            }
        }
    ],
    "outbounds": [
        {
            "protocol": "freedom",
            "settings": {

            }
        }
    ],
    "log": {
        "access": "access.log",
        "error": "error.log",
        "loglevel": "warning",
        "dnsLog": false
    }
}

cod-soap avatar Oct 18 '22 00:10 cod-soap

Aslo I want to know. What protocols does xtls support? I found example which shows support trojan and vless

cod-soap avatar Oct 18 '22 01:10 cod-soap

https://xtls.github.io/en/config/inbounds/socks.html

zxbiao avatar Oct 19 '22 14:10 zxbiao

only support vless or trojan. xtls implementation is quite complex. I think it is hard to port to support other protocols

yuhan6665 avatar Oct 20 '22 02:10 yuhan6665

only support vless or trojan. xtls implementation is quite complex. I think it is hard to port to support other protocols

只是v2ray/xray的架构 以及 实现的位置单独放在了每个protocol里 导致的而已。只要解耦合即可。比如 在verysimple中 同类的 tls lazy encrypt 可以支持 所有明文传输的协议,如 socks,trojan 和 vless。

在vs中,不仅tls的识别 是在tls包外的,而且也是在任何proxy包之外的,完全不碰代理。这是一种通用的识别。

e1732a364fed avatar Nov 02 '22 00:11 e1732a364fed

解耦和是一个问题,目前写法把过滤,padding,裸奔都放在一起了。确实,过滤和padding 将来可以看怎么改成通用的

yuhan6665 avatar Nov 02 '22 01:11 yuhan6665