feat: 合并边缘节点运维并完善 Surge 配置安全
迁入通用节点部署工具、离线交付页生成器和共用技能,隔离真实配置与交付产物。统一 Codex 与 Claude Code 开发约定,补充节点迁移与运维文档。 完善 FINAL、策略组引用、输入校验、Surge 字段编码与 AI DNS 例外保护,增加隔离测试和订阅验证工具。 验证:全量类型检查、44 项单测、前端构建、脚本语法、技能入口与凭据隔离检查均通过。
This commit is contained in:
@@ -25,6 +25,8 @@ export function normalizeSsCipher(method: string): string {
|
||||
export interface NodeCapabilityInput {
|
||||
protocol: Protocol;
|
||||
network: 'tcp' | 'ws';
|
||||
alterId?: number;
|
||||
security?: string;
|
||||
}
|
||||
|
||||
export interface CapabilityVerdict {
|
||||
@@ -40,5 +42,11 @@ export function clientSupports(client: ClientType, node: NodeCapabilityInput): C
|
||||
if (client === 'surge' && node.protocol === 'shadowsocks' && node.network === 'ws') {
|
||||
return { ok: false, reason: 'Surge 不支持 Shadowsocks over WebSocket' };
|
||||
}
|
||||
if (client === 'surge' && node.protocol === 'vmess') {
|
||||
if ((node.alterId ?? 0) !== 0) return { ok: false, reason: 'Surge 下发仅支持 alterId=0 的 VMess AEAD 节点' };
|
||||
if (!['auto', 'aes-128-gcm', 'chacha20-poly1305', 'chacha20-ietf-poly1305'].includes(node.security ?? 'auto')) {
|
||||
return { ok: false, reason: `Surge 不支持该 VMess 加密方式:${node.security}` };
|
||||
}
|
||||
}
|
||||
return { ok: true };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user