diff --git a/src/utils/__tests__/singbox.test.ts b/src/utils/__tests__/singbox.test.ts index 570e45158..a5d7d785d 100644 --- a/src/utils/__tests__/singbox.test.ts +++ b/src/utils/__tests__/singbox.test.ts @@ -123,7 +123,7 @@ const nodeList: ReadonlyArray = [ mux: true, }, { - nodeName: 'vmess.tcpNotSupported', + nodeName: 'vmess.tcp', type: NodeTypeEnum.Vmess, hostname: 'example.com', port: 443, @@ -261,7 +261,7 @@ const nodeList: ReadonlyArray = [ }, }, { - nodeName: 'vless.tcpNotSupported', + nodeName: 'vless.tcp', type: NodeTypeEnum.Vless, hostname: 'example.com', port: 443, @@ -668,6 +668,15 @@ const expectedNodes: Record[] = [ plugin: 'v2ray-plugin', plugin_opts: 'host=example.com;mode=quic;path=/obfs;tls=true', }, + { + type: 'vmess', + tag: 'vmess.tcp', + server: 'example.com', + server_port: 443, + security: 'auto', + uuid: '1386f85e-657b-4d6e-9d56-78badb75e1fd', + alter_id: 0, + }, { type: 'vmess', tag: 'vmess.complex', @@ -759,6 +768,19 @@ const expectedNodes: Record[] = [ headers: { Host: ['example.com'] }, }, }, + { + type: 'vless', + tag: 'vless.tcp', + server: 'example.com', + server_port: 443, + uuid: '1386f85e-657b-4d6e-9d56-78badb75e1fd', + flow: 'xtls-rprx-vision', + tls: { + enabled: true, + utls: { enabled: true, fingerprint: 'chrome2' }, + reality: { enabled: true, public_key: 'publicKey', short_id: 'shortId' }, + }, + }, { type: 'vless', tag: 'vless.complex', diff --git a/src/utils/singbox.ts b/src/utils/singbox.ts index f5848c298..c6bfb2254 100644 --- a/src/utils/singbox.ts +++ b/src/utils/singbox.ts @@ -187,6 +187,9 @@ function nodeListMapper(nodeConfig: PossibleNodeConfigType) { } break + case 'tcp': + break + default: logger.warn( `sing-box 的 ${nodeConfig.type} 节点不支持 network=${nodeConfig.network},节点 ${nodeConfig.nodeName} 会被忽略`,