zhuyuan-ice-gl-zy001/TRAE-DEV-20260820/agent-training/tasks/20260823-gz-relay/verge-script-current.js

76 lines
2.5 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// 铸渊专线 · Clash Verge 订阅增强脚本
// 功能:注入冰朔的两个新加坡 VLESS+Reality 专线节点 + 智能接管组
// - 🛡️ 专线接管(fallback):订阅节点全挂时自动切专线,恢复后自动切回
// - 手动模式:在「🚀节点选择」里直接点「铸渊-大脑(SG)」或「铸渊-面孔(SG)」
// 节点参数来自铸渊专线服务端实测(2026-08-21)
function main(config, profileName) {
const zyProxies = [
{
name: "铸渊-大脑(SG)",
type: "vless",
server: "43.156.237.110",
port: 8443,
uuid: "6f0516d4-8650-4fba-b041-dfb4f11a7490",
network: "tcp",
udp: true,
tls: true,
flow: "xtls-rprx-vision",
servername: "gateway.icloud.com",
"reality-opts": {
"public-key": "BUxM5T3BgRewhAJ1HkM5k42dPCvFNFc_gJskQO9IqUY",
"short-id": "15f1c09526e79290",
},
"client-fingerprint": "chrome",
},
{
name: "铸渊-面孔(SG)",
type: "vless",
server: "43.134.16.246",
port: 8443,
uuid: "66f255bc-7c81-4114-992c-5b965962f90f",
network: "tcp",
udp: true,
tls: true,
flow: "xtls-rprx-vision",
servername: "gateway.icloud.com",
"reality-opts": {
"public-key": "-UjfjrYKOoqN_vjGwaCxJFdI_7NjdnR5jU8znIO0UzI",
"short-id": "058ed04d88e47734",
},
"client-fingerprint": "chrome",
},
];
// 1. 注入节点(幂等,防重复)
config.proxies = config.proxies || [];
const existing = new Set(config.proxies.map((p) => p.name));
for (const p of zyProxies) {
if (!existing.has(p.name)) config.proxies.push(p);
}
// 2. 加智能接管组:订阅的♻️自动选择挂了 → 自动切铸渊专线
const groups = config["proxy-groups"] || [];
const takeOver = "🛡️ 专线接管";
if (!groups.some((g) => g.name === takeOver)) {
groups.unshift({
name: takeOver,
type: "fallback",
proxies: ["♻️自动选择", "铸渊-大脑(SG)", "铸渊-面孔(SG)"],
url: "http://www.gstatic.com/generate_204",
interval: 60,
});
}
// 3. 插入主选择组最前面:接管组在前(全自动),两个专线节点紧随(手动固定用)
const mainGroup = groups.find((g) => g.name === "🚀节点选择");
if (mainGroup) {
const insert = [takeOver, "铸渊-大脑(SG)", "铸渊-面孔(SG)"].filter(
(n) => !mainGroup.proxies.includes(n)
);
mainGroup.proxies.unshift(...insert);
}
config["proxy-groups"] = groups;
return config;
}