feat: 支持 AnyTLS URI 订阅解析与生成 - #416
Open
luodaoyi wants to merge 1 commit into
Open
Conversation
Register an AnyTLS URI parser so plain, remote, and Base64 subscription lists no longer drop anytls:// nodes before they reach the configuration builders. Follow the official AnyTLS URI fields for encoded passwords, default port 443, SNI, insecure mode, IPv6, and display fragments while accepting common client extensions for fingerprint, ALPN, UDP, and idle-session options. Normalize idle-session option names for Mihomo and sing-box outputs and add end-to-end regression coverage for parser dispatch, remote subscriptions, Base64 input, and both generated formats.
|
@myassistantChatGPT is attempting to deploy a commit to the 7sageer's projects Team on Vercel. A member of the Team first needs to authorize it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
项目已经能从 Clash YAML / sing-box JSON 中读取
type: anytls,Clash builder 也已有 AnyTLS 输出分支,但ProxyParser没有注册anytls://URI parser。因此普通 URI 列表、远程 URI 订阅和 Base64 URI 订阅中的 AnyTLS 节点会在进入 builder 前返回undefined并被静默丢弃。本 PR 参考了 #374 与 #405 的正确方向,但将改动收敛为 AnyTLS 所需的 5 个文件,排除 README、Loon、规则 URL 等无关变更,并补齐协议边界和端到端测试。
实现
anytls://parser。443;sni、insecure=0/1;AnyTLS host:port名称,避免节点因空 tag 再次被过滤。fp/ fingerprint、ALPN、UDP、idle-session 参数及常见别名。idle-session-check-interval↔idle_session_check_intervalidle-session-timeout↔idle_session_timeoutmin-idle-session↔min_idle_sessionudp字段;Clash 输出默认保留 UDP 能力。覆盖场景
新增 7 个 AnyTLS 回归场景:
ProxyParser注册及大小写 scheme;验证
AnyTLS/YAML/UDP 定向测试:22/22 通过。
全量 Vitest:229/229 通过。
npm run build:Vercel 构建通过。git diff --check、UTF-8/CRLF 检查通过。官方 PR
Test Worker通过:run 30545291444。官方 PR Docker 双架构构建通过:run 30545291087。
Vercel 在构建前返回
Authorization required to deploy,属于 fork 作者缺少上游 Vercel 团队授权;本地npm run build已通过。合并建议
建议合并这一聚焦版本:它修复了 AnyTLS 节点丢失的实际根因,同时覆盖官方 URI 边界、远程/Base64 订阅和两个目标格式,不携带 #374/#405 中缺测或无关的大范围改动。