❧ Clash Verge 使用指南
一、Clash Verge 简介
Clash Verge 是一款基于 Clash 核心的网络代理工具,提供了强大的功能和灵活的配置选项,适用于各种网络环境和需求。它支持多平台运行,包括 Windows、macOS 和 Linux,能够帮助用户实现科学上网、网络加速和隐私保护等功能。
二、配置代理规则
1、编辑代理组
打开代理组编辑页面

填写信息并保存

2、编辑规则
先在订阅文件配置规则集合
rule-providers: openai-rules: type: http behavior: classical url: "https://fastly.jsdelivr.net/gh/blackmatrix7/ios_rule_script@master/rule/Clash/OpenAI/OpenAI.yaml" # 替换为实际规则集链接 interval: 86400 # 每天更新一次 path: "./ruleset/blackmatrix7/openai.yaml" # 本地缓存路径 format: yaml # 规则集格式 anthropic: type: http behavior: classical url: "https://raw.githubusercontent.com/SkywalkerJi/Clash-Rules/refs/heads/master/AI/Anthropic.yaml" interval: 86400 path: "./ruleset/SkywalkerJi/anthropic.yaml" format: yaml
github规则集参考
三、全局扩展脚本
使用该脚本实现自定义规则合并到订阅配置中
function main(config, profileName) { // 合并 proxy-groups const existingProxyGroups = config["proxy-groups"] || []; const newProxyGroups = [ { name: "chatgpt", type: "select", interval: 300, timeout: 5000, "max-failed-times": 5, lazy: true, // 这里添加订阅中已有的代理名称,确保它们存在于订阅的 proxy-groups 中 proxies: ["🇸🇬 天天新加坡", "🇯🇵 天天日本"], } ]; config["proxy-groups"] = [...newProxyGroups, ...existingProxyGroups];
// 合并 rule-providers const existingRuleProviders = config["rule-providers"] || {}; const newRuleProviders = { "openai-rules": { type: "http", behavior: "classical", url: "https://fastly.jsdelivr.net/gh/blackmatrix7/ios_rule_script@master/rule/Clash/OpenAI/OpenAI.yaml", interval: 86400, path: "./ruleset/blackmatrix7/openai.yaml", format: "yaml" }, "anthropic": { type: "http", behavior: "classical", url: "https://raw.githubusercontent.com/MetaCubeX/meta-rules-dat/meta/geo/geosite/anthropic.yaml", interval: 86400, path: "./ruleset/MetaCubeX/anthropic.yaml", format: "yaml" } }; config["rule-providers"] = { ...existingRuleProviders, ...newRuleProviders };
// 合并 rules const existingRules = config["rules"] || []; const newRules = [ "RULE-SET,anthropic,chatgpt", "RULE-SET,openai-rules,chatgpt" ]; config["rules"] = [...newRules, ...existingRules];
// 保持 profile 配置 if (!config.profile) { config.profile = {}; } config.profile["store-selected"] = true;
return config;}