Open
Conversation
|
@ZhengYuHangOvO 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.
为项目添加了 AnyTLS 协议的支持,使用户能够通过 anytls:// 格式的订阅链接导入 AnyTLS 节点到 Clash 配置中。
🐛 问题描述
在添加此功能之前,项目存在以下问题:
ClashConfigBuilder.js 中已有 AnyTLS 的转换逻辑(第 281-296 行)
但 ProxyParser.js 中缺少 anytls:// 协议的解析器注册
导致 anytls:// 格式的订阅链接无法被解析,节点在转换过程中被过滤掉
最终生成的 Clash 配置中不包含 AnyTLS 节点
✨ 变更内容
src/parsers/protocols/anytlsParser.js
实现 AnyTLS URL 解析器
支持解析格式:anytls://password@server:port?params#name
支持的参数:
sni - Server Name Indication
fp - TLS Fingerprint (utls)
insecure - 是否跳过证书验证
alpn - ALPN 协议列表
idle_session_check_interval - 空闲会话检查间隔
idle_session_timeout - 空闲会话超时
min_idle_session - 最小空闲会话数
2. 修改文件
src/parsers/ProxyParser.js
添加导入:import { parseAnytls } from './protocols/anytlsParser.js';
在 protocolParsers 对象中注册:anytls: parseAnytls
🧪 兼容性说明
Clash Verge Rev: ✅ 支持 (基于 mihomo/Clash Meta)
Clash Meta / mihomo: ✅ 支持
其他 Clash Meta 内核客户端: ✅ 支持
📋 测试建议
将 anytls:// 格式的订阅链接添加到输入框
生成 Clash 配置
验证输出配置中包含 AnyTLS 节点
在 Clash Verge Rev 或其他支持 AnyTLS 的客户端中导入测试