feat: 添加 VLESS-Reality 静态节点解析支持

支持 vless:// URI 解析,覆盖 Reality/TLS/WS/gRPC 传输方式,
自动提取 pbk、sid、sni 等参数生成 Surge 配置行。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-15 13:22:53 +08:00
parent 2df229473a
commit e268ed6d10
3 changed files with 52 additions and 2 deletions

View File

@@ -1,6 +1,7 @@
import { parseSS, type ParsedNode } from './ss.js';
import { parseVMess } from './vmess.js';
import { parseTrojan } from './trojan.js';
import { parseVless } from './vless.js';
export type { ParsedNode };
@@ -9,6 +10,7 @@ export function parseNodeUri(uri: string): ParsedNode | null {
if (uri.startsWith('ss://')) return parseSS(uri);
if (uri.startsWith('vmess://')) return parseVMess(uri);
if (uri.startsWith('trojan://')) return parseTrojan(uri);
if (uri.startsWith('vless://')) return parseVless(uri);
return null;
} catch {
return null;