Toperlock / sing-box-subscribe

https://sing-box-subscribe-doraemon.vercel.app
1.84k stars 1.83k forks source link

vmess协议节点转换后出现非预期行为 #6

Closed zacred0rryn closed 1 year ago

zacred0rryn commented 1 year ago

使用背景

vmess协议机场。之前使用clash,现更换为sing-box后,出现udp不能正常使用的问题,例如,teamspeak语音服务器不能正常连接成功。

问题定位

该机场clash格式的订阅中,某节点的格式为:

{name: "xxxxxxxx", server: xxxxxxxx.xxx, port: 12345, client-fingerprint: chrome, type: vmess, uuid: ********, alterId: 0, cipher: auto, tls: false, tfo: false, skip-cert-verify: true, udp: true}

经过转换后,对应的出站为:

{
    "tag": "xxxxxxxx",
    "type": "vmess",
    "server": "xxxxxxxx.xxx",
    "server_port": 12345,
    "uuid": "********",
    "security": "auto",
    "alter_Id": 0,
    "packet_encoding": "xudp",
    "network": "tcp"
}

经过简单测试,"network": "tcp"导致该节点的udp无法使用,删除该字段以后恢复正常,ts服务器能够成功连接。

根据sing-box文档,该字段只能指定tcp/udp,而不写则默认同时开启。

network

Enabled network

One of tcp udp.

Both is enabled by default.

而如上文所示的节点大量存在,经过转换以后全部被指定使用tcp,需要全部手动修改,对使用体验有较大影响,希望能够修复。感谢!

Toperlock commented 1 year ago

commit 914ae1c

zacred0rryn commented 1 year ago

解决了。Thanks.