├── NodeList.ini └── README.md /NodeList.ini: -------------------------------------------------------------------------------- 1 | [custom] 2 | 3 | ruleset=🐟 漏网之鱼,[]FINAL 4 | 5 | custom_proxy_group=🚀 节点选择`select`[]♻️ 自动选择`[]DIRECT 6 | custom_proxy_group=♻️ 自动选择`url-test`[]DIRECT`http://www.gstatic.com/generate_204`300,,50 7 | custom_proxy_group=🌍 国外媒体`select`[]🚀 节点选择`[]♻️ 自动选择`[]🎯 全球直连 8 | custom_proxy_group=📲 电报信息`select`[]🚀 节点选择`[]🎯 全球直连 9 | custom_proxy_group=Ⓜ️ 微软服务`select`[]🎯 全球直连`[]🚀 节点选择 10 | custom_proxy_group=🍎 苹果服务`select`[]🚀 节点选择`[]🎯 全球直连 11 | custom_proxy_group=🎯 全球直连`select`[]DIRECT`[]🚀 节点选择`[]♻️ 自动选择 12 | custom_proxy_group=🛑 全球拦截`select`[]REJECT`[]DIRECT 13 | custom_proxy_group=🍃 应用净化`select`[]REJECT`[]DIRECT 14 | custom_proxy_group=🐟 漏网之鱼`select`[]🚀 节点选择`[]🎯 全球直连`[]♻️ 自动选择 15 | 16 | enable_rule_generator=true 17 | overwrite_original_rules=true 18 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ```javascript 2 | // Define main function (script entry) 3 | // 作为一个小白,为了方便小白写verge-rev脚本,在此提供一个全局Script脚本模板,方便小白Ctrl+C&V 4 | // 使用:复制全部内容到verge-rev的全局扩展脚本中,然后跟据需要修改 5 | // 此脚本模板适用于verge-rev的1.7.3以上版本,适用于多需求、多设备、多人切换使用 6 | // 包含功能:针对使用需求筛选订阅,进行分组、规则等字段内容的覆盖以及对其rules、proxies、rule-providers进行prepend/append 7 | // 以下的addConfig函数、prepend函数、append函数,小白请勿修改,否则会导致脚本无法正常运行,大佬请自便 8 | const addConfig = (name, usage, config, filename) => { 9 | if (name.test(filename)) { 10 | for (let key in Sub[usage]) config[key] = Sub[usage][key]; 11 | for (let i in Extra[usage].preExtra) prepend(config, ...Extra[usage].preExtra[i]); 12 | for (let j in Extra[usage].appExtra) append(config, ...Extra[usage].appExtra[j]); 13 | } 14 | } 15 | 16 | const prepend = (config, type, content) => { 17 | if (Array.isArray(content) && content.length > 0) { 18 | if (type == 'proxies') config.proxies.unshift(...content); 19 | if (type == 'proxy-groups') config['proxy-groups'].unshift(...content); 20 | if (type == 'rules') config.rules.unshift(...content); 21 | } 22 | } 23 | 24 | const append = (config, type, content) => { 25 | if (Array.isArray(content) && content.length > 0) { 26 | if (type == 'proxies') config.proxies.push(...content); 27 | if (type == 'proxy-groups') config['proxy-groups'].push(...content); 28 | if (type == 'rules') config.rules.push(...content); 29 | } 30 | } 31 | 32 | // 国内DNS服务器 33 | const domesticNameservers = [ 34 | "https://dns.alidns.com/dns-query", // 阿里云公共DNS 35 | "https://doh.pub/dns-query", // 腾讯DNSPod 36 | "https://doh.360.cn/dns-query" // 360安全DNS 37 | ]; 38 | // 国外DNS服务器 39 | const foreignNameservers = [ 40 | "https://1.1.1.1/dns-query", // Cloudflare(主) 41 | "https://1.0.0.1/dns-query", // Cloudflare(备) 42 | "https://208.67.222.222/dns-query", // OpenDNS(主) 43 | "https://208.67.220.220/dns-query", // OpenDNS(备) 44 | "https://194.242.2.2/dns-query", // Mullvad(主) 45 | "https://194.242.2.3/dns-query" // Mullvad(备) 46 | ]; 47 | // Sub部分是实现对dns, proxy-groups, rules等订阅配置文件中所规定字段的内容进行覆盖,其他规定字段也适用 48 | const Sub = { 49 | // 在此处填入'使用需求': {},用于匹配相应的配置 50 | // 注意:别丢引号!防止出错!多个配置之间用<英文的逗号>隔开 51 | '家用': {}, 52 | // 以下配置为一个示例,可以自行参考 53 | '公司用': {// 此处正则表达式意为:匹配所有名不为meta.yaml的文件,有需要可以自行学习 54 | // 以下是需要覆盖的dns配置,有需求的话可以自行参考官方文档修改,不需要的把这一项全部删除即可 55 | 'dns': { 56 | // 这里留空会清空dns配置,以下内容为示例 57 | "enable": true, 58 | "listen": "0.0.0.0:1053", 59 | "ipv6": true, 60 | "use-system-hosts": false, 61 | "cache-algorithm": "arc", 62 | "enhanced-mode": "fake-ip", 63 | "fake-ip-range": "198.18.0.1/16", 64 | "fake-ip-filter": [ 65 | // 本地主机/设备 66 | "+.lan", 67 | "+.local", 68 | // Windows网络出现小地球图标 69 | "+.msftconnecttest.com", 70 | "+.msftncsi.com", 71 | // QQ快速登录检测失败 72 | "localhost.ptlogin2.qq.com", 73 | "localhost.sec.qq.com", 74 | // 微信快速登录检测失败 75 | "localhost.work.weixin.qq.com" 76 | ], 77 | "default-nameserver": ["223.5.5.5", "119.29.29.29", "1.1.1.1", "8.8.8.8"], 78 | "nameserver": [...domesticNameservers, ...foreignNameservers], 79 | "proxy-server-nameserver": [...domesticNameservers, ...foreignNameservers], 80 | "nameserver-policy": { 81 | "geosite:private,cn,geolocation-cn": domesticNameservers, 82 | "geosite:google,youtube,telegram,gfw,geolocation-!cn": foreignNameservers 83 | } 84 | }, 85 | // 以下是需要覆盖的分组配置,有需求的可以自行参考官方文档修改,不需要的把这一项全部删除即可 86 | 'proxy-groups': [ 87 | { 88 | "name": "🚀 节点选择", 89 | "type": "select", 90 | "include-all-proxies": true, 91 | "proxies": [ 92 | "♻️ 自动选择", 93 | "DIRECT" 94 | ] 95 | }, 96 | { 97 | "name": "♻️ 自动选择", 98 | "type": "url-test", 99 | "url": "http://www.gstatic.com/generate_204", 100 | "interval": 300, 101 | "tolerance": 50, 102 | "include-all-proxies": true, 103 | "proxies": [] 104 | }, 105 | { 106 | "name": "🌍 国外媒体", 107 | "type": "select", 108 | "proxies": [ 109 | "🚀 节点选择", 110 | "♻️ 自动选择", 111 | "🎯 全球直连" 112 | ] 113 | }, 114 | { 115 | "name": "📲 电报信息", 116 | "type": "select", 117 | "proxies": [ 118 | "🚀 节点选择", 119 | "🎯 全球直连" 120 | ] 121 | }, 122 | { 123 | "name": "Ⓜ️ 微软服务", 124 | "type": "select", 125 | "proxies": [ 126 | "🎯 全球直连", 127 | "🚀 节点选择" 128 | ] 129 | }, 130 | { 131 | "name": "🍎 苹果服务", 132 | "type": "select", 133 | "proxies": [ 134 | "🎯 全球直连", 135 | "🚀 节点选择" 136 | ] 137 | }, 138 | { 139 | "name": "📢 谷歌FCM", 140 | "type": "select", 141 | "proxies": [ 142 | "🚀 节点选择", 143 | "🎯 全球直连", 144 | "♻️ 自动选择" 145 | ] 146 | }, 147 | { 148 | "name": "🎯 全球直连", 149 | "type": "select", 150 | "proxies": [ 151 | "DIRECT", 152 | "🚀 节点选择", 153 | "♻️ 自动选择" 154 | ] 155 | }, 156 | { 157 | "name": "🛑 全球拦截", 158 | "type": "select", 159 | "proxies": [ 160 | "REJECT", 161 | "DIRECT" 162 | ] 163 | }, 164 | { 165 | "name": "🍃 应用净化", 166 | "type": "select", 167 | "proxies": [ 168 | "REJECT", 169 | "DIRECT" 170 | ] 171 | }, 172 | { 173 | "name": "🐟 漏网之鱼", 174 | "type": "select", 175 | "proxies": [ 176 | "🚀 节点选择", 177 | "🎯 全球直连", 178 | "♻️ 自动选择" 179 | ] 180 | } 181 | ], 182 | // 以下是需要覆盖的规则配置,有需求的可以自行参考官方文档修改,不需要的把这一项全部删除即可 183 | // 注意规则、分组、规则集的对应 184 | 'rules': [ 185 | "RULE-SET,PersonalDirect,🎯 全球直连", 186 | "RULE-SET,PersonalProxy,🚀 节点选择", 187 | "RULE-SET,LocalAreaNetwork,🎯 全球直连", 188 | "RULE-SET,UnBan,🎯 全球直连", 189 | "RULE-SET,GoogleCN,🎯 全球直连", 190 | "RULE-SET,SteamCN,🎯 全球直连", 191 | "RULE-SET,ChinaDomain,🎯 全球直连", 192 | "RULE-SET,ChinaCompanyIp,🎯 全球直连", 193 | "RULE-SET,BanAD,🛑 全球拦截", 194 | "RULE-SET,BanProgramAD,🍃 应用净化", 195 | "RULE-SET,GoogleFCM,📢 谷歌FCM", 196 | "RULE-SET,Microsoft,Ⓜ️ 微软服务", 197 | "RULE-SET,Apple,🍎 苹果服务", 198 | "RULE-SET,Telegram,📲 电报信息", 199 | "RULE-SET,ProxyMedia,🌍 国外媒体", 200 | "RULE-SET,ProxyLite,🚀 节点选择", 201 | "GEOIP,CN,🎯 全球直连", 202 | "MATCH,🐟 漏网之鱼" 203 | ], 204 | // 以下是需要覆盖的规则集配置,有需求的可以自行参考官方文档修改,不需要的把这一项全部删除即可 205 | 'rule-providers': { 206 | "LocalAreaNetwork": { 207 | "type": "http", 208 | "behavior": "classical", 209 | "url": "https://raw.gitmirror.com/ACL4SSR/ACL4SSR/master/Clash/Providers/LocalAreaNetwork.yaml", 210 | "interval": 86400, 211 | "path": "./profiles/ACL4SSR/LocalAreaNetwork.yaml" 212 | }, 213 | "UnBan": { 214 | "type": "http", 215 | "behavior": "classical", 216 | "url": "https://raw.gitmirror.com/ACL4SSR/ACL4SSR/master/Clash/Providers/UnBan.yaml", 217 | "interval": 86400, 218 | "path": "./profiles/ACL4SSR/UnBan.yaml" 219 | }, 220 | "GoogleCN": { 221 | "type": "http", 222 | "behavior": "classical", 223 | "url": "https://raw.gitmirror.com/ACL4SSR/ACL4SSR/master/Clash/Providers/Ruleset/GoogleCN.yaml", 224 | "interval": 86400, 225 | "path": "./profiles/ACL4SSR/GoogleCN.yaml" 226 | }, 227 | "SteamCN": { 228 | "type": "http", 229 | "behavior": "classical", 230 | "url": "https://raw.gitmirror.com/ACL4SSR/ACL4SSR/master/Clash/Providers/Ruleset/SteamCN.yaml", 231 | "interval": 86400, 232 | "path": "./profiles/ACL4SSR/SteamCN.yaml" 233 | }, 234 | "ChinaDomain": { 235 | "type": "http", 236 | "behavior": "classical", 237 | "url": "https://raw.gitmirror.com/ACL4SSR/ACL4SSR/master/Clash/Providers/ChinaDomain.yaml", 238 | "interval": 86400, 239 | "path": "./profiles/ACL4SSR/ChinaDomain.yaml" 240 | }, 241 | "ChinaCompanyIp": { 242 | "type": "http", 243 | "behavior": "ipcidr", 244 | "url": "https://raw.gitmirror.com/ACL4SSR/ACL4SSR/master/Clash/Providers/ChinaCompanyIp.yaml", 245 | "interval": 86400, 246 | "path": "./profiles/ACL4SSR/ChinaCompanyIp.yaml" 247 | }, 248 | "BanAD": { 249 | "type": "http", 250 | "behavior": "classical", 251 | "url": "https://raw.gitmirror.com/ACL4SSR/ACL4SSR/master/Clash/Providers/BanAD.yaml", 252 | "interval": 86400, 253 | "path": "./profiles/ACL4SSR/BanAD.yaml" 254 | }, 255 | "BanProgramAD": { 256 | "type": "http", 257 | "behavior": "classical", 258 | "url": "https://raw.gitmirror.com/ACL4SSR/ACL4SSR/master/Clash/Providers/BanProgramAD.yaml", 259 | "interval": 86400, 260 | "path": "./profiles/ACL4SSR/BanProgramAD.yaml" 261 | }, 262 | "GoogleFCM": { 263 | "type": "http", 264 | "behavior": "classical", 265 | "url": "https://raw.gitmirror.com/ACL4SSR/ACL4SSR/master/Clash/Providers/Ruleset/GoogleFCM.yaml", 266 | "interval": 86400, 267 | "path": "./profiles/ACL4SSR/GoogleFCM.yaml" 268 | }, 269 | "Microsoft": { 270 | "type": "http", 271 | "behavior": "classical", 272 | "url": "https://raw.gitmirror.com/ACL4SSR/ACL4SSR/master/Clash/Providers/Ruleset/Microsoft.yaml", 273 | "interval": 86400, 274 | "path": "./profiles/ACL4SSR/Microsoft.yaml" 275 | }, 276 | "Apple": { 277 | "type": "http", 278 | "behavior": "classical", 279 | "url": "https://raw.gitmirror.com/ACL4SSR/ACL4SSR/master/Clash/Providers/Apple.yaml", 280 | "interval": 86400, 281 | "path": "./profiles/ACL4SSR/Apple.yaml" 282 | }, 283 | "Telegram": { 284 | "type": "http", 285 | "behavior": "classical", 286 | "url": "https://raw.gitmirror.com/ACL4SSR/ACL4SSR/master/Clash/Providers/Ruleset/Telegram.yaml", 287 | "interval": 86400, 288 | "path": "./profiles/ACL4SSR/Telegram.yaml" 289 | }, 290 | "ProxyMedia": { 291 | "type": "http", 292 | "behavior": "classical", 293 | "url": "https://raw.gitmirror.com/ACL4SSR/ACL4SSR/master/Clash/Providers/ProxyMedia.yaml", 294 | "interval": 86400, 295 | "path": "./profiles/ACL4SSR/ProxyMedia.yaml" 296 | }, 297 | "ProxyLite": { 298 | "type": "http", 299 | "behavior": "classical", 300 | "url": "https://raw.gitmirror.com/ACL4SSR/ACL4SSR/master/Clash/Providers/ProxyLite.yaml", 301 | "interval": 86400, 302 | "path": "./profiles/ACL4SSR/ProxyLite.yaml" 303 | } 304 | } 305 | } 306 | }; 307 | 308 | // Extra部分是对rules、proxies、rule-providers规定字段实现prepend/append功能,不适用其他规定字段 309 | const Extra = { 310 | '家用': {}, 311 | '公司用': { 312 | preExtra: [ 313 | ['rules', 314 | [ 315 | // 此处填写添加的规则,直接写字符串,多个规则用英文逗号隔开,不需要可以留空 316 | // "RULE-SET,ProxyLite,🚀 节点选择", 317 | // "GEOIP,CN,🎯 全球直连", "MATCH,🐟 漏网之鱼", 318 | ] 319 | ], 320 | ['proxies', 321 | [ 322 | // 此处填写添加的节点,注意是每个节点都是{...}格式,不是[]格式,多个节点用英文逗号隔开,不需要可以留空 323 | // { 324 | // "name": "真的是你呀", 325 | // "type": "trojan", 326 | // "server": "0.0.0.0", 327 | // "port": 443, 328 | // "password": "00000000000", 329 | // "network": "ws", 330 | // "udp": true, 331 | // "sni": "0.0.0.0", 332 | // "skip-cert-verify": true 333 | // }, 334 | ] 335 | ], 336 | ['rule-providers', 337 | { 338 | // 此处填写添加的规则集,注意是每个规则集格式:名字:{...},多个规则集用英文逗号隔开,不需要可以留空 339 | // "LocalAreaNetwork": { 340 | // "type": "http", 341 | // "behavior": "classical", 342 | // "interval": 86400, 343 | // "url": "https://raw.gitmirror.com/ACL4SSR/ACL4SSR/master/Clash/Providers/LocalAreaNetwork.yaml", 344 | // "path": "./profiles/ACL4SSR/LocalAreaNetwork.yaml" 345 | // }, 346 | // "UnBan": { 347 | // "type": "http", 348 | // "behavior": "classical", 349 | // "interval": 86400, 350 | // "url": "https://raw.gitmirror.com/ACL4SSR/ACL4SSR/master/Clash/Providers/UnBan.yaml", 351 | // "path": "./profiles/ACL4SSR/UnBan.yaml" 352 | // } 353 | } 354 | ] 355 | ], 356 | // 此处内容与上面相同,不做多余表述 357 | appExtra: [ 358 | ['rules', 359 | [ 360 | // 此处填写添加的规则,直接写字符串,多个规则用英文逗号隔开,不需要可以留空 361 | ] 362 | ], 363 | ['proxies', 364 | [ 365 | // 此处填写添加的节点,注意是每个节点都是{...}格式,不是[]格式,多个节点用英文逗号隔开,不需要可以留空 366 | ] 367 | ], 368 | ['rule-providers', 369 | { 370 | // 此处填写添加的规则集,注意是每个规则集格式:名字:{...},多个规则集用英文逗号隔开,不需要可以留空 371 | } 372 | ] 373 | ] 374 | } 375 | }; 376 | 377 | function main(config, filename) { 378 | // 在上面配置完毕,就可以在此处调用addConfig函数添加节点、规则、规则集等 379 | // 格式为 addConfig(正则表达式, 使用需求, config, filename); 380 | // 只需要修改正则表达式和使用需求的内容,config和filename不需要修改 381 | // 注意正则表达式的2个斜杠不能丢,具体使用方法可以自行学习 382 | addConfig(/^.*$/, '家用', config, filename); // /^.*$/表示筛选所有订阅,'家用'表示使用需求对应上文的配置,config和filename保持原样 383 | 384 | // 如果有多个使用需求,可以继续添加 385 | return config; 386 | } 387 | ``` 388 | --------------------------------------------------------------------------------