-小狗饼干- / 洛12
770 字
4 分钟
Clash Verge Rev 合并订阅源
使用代理客户端 Clash Verge Rev 将多个订阅源合并,最大化利用上所有订阅,并且可以免去来回切换订阅源的麻烦。
新建本地配置
点击客户端左侧的订阅 选项,然后点击 新建。在弹出的新建配置界面进行配置,类型选择 Local,名称填写 Merge,时间填写 3600,不需要选择本地文件,点击保存。

编辑本地配置
右键刚才创建的配置,选择编辑文件,在打开的窗口中替换为以下内容,记得修改订阅源地址,以及你想使用的的顺序,完成以后保存。
23 collapsed lines
mixed-port: 7890ipv6: trueudp: trueallow-lan: falsebind-address: '127.0.0.1'mode: rulelog-level: infounified-delay: trueexperimental: ignore-resolve-fail: falsecfw-latency-timeout: 5000cfw-latency-url: 'http:/www.gstatic.com/generate_204'cfw-conn-break-strategy: truedns: enable: true listen: '127.0.0.1:1053' ipv6: true default-nameserver: [114.114.114.114, 223.5.5.5, 119.29.29.29] enhanced-mode: fake-ip fake-ip-range: 28.0.0.1/8 use-hosts: true fake-ip-filter: ['*.lan', '*.localdomain', '*.example', '*.invalid', '*.localhost', '*.test', '*.local', '*.home.arpa', 'time.*.com', 'time.*.gov', 'time.*.edu.cn', 'time.*.apple.com', 'time1.*.com', 'time2.*.com', 'time3.*.com', 'time4.*.com', 'time5.*.com', 'time6.*.com', 'time7.*.com', 'ntp.*.com', 'ntp1.*.com', 'ntp2.*.com', 'ntp3.*.com', 'ntp4.*.com', 'ntp5.*.com', 'ntp6.*.com', 'ntp7.*.com', '*.time.edu.cn', '*.ntp.org.cn', +.pool.ntp.org, time1.cloud.tencent.com, music.163.com, '*.music.163.com', '*.126.net', musicapi.taihe.com, music.taihe.com, songsearch.kugou.com, trackercdn.kugou.com, '*.kuwo.cn', api-jooxtt.sanook.com, api.joox.com, joox.com, y.qq.com, '*.y.qq.com', streamoc.music.tc.qq.com, mobileoc.music.tc.qq.com, isure.stream.qqmusic.qq.com, dl.stream.qqmusic.qq.com, aqqmusic.tc.qq.com, amobile.music.tc.qq.com, '*.xiami.com', '*.music.migu.cn', music.migu.cn, +.msftconnecttest.com, +.msftncsi.com, msftconnecttest.com, msftncsi.com, localhost.ptlogin2.qq.com, localhost.sec.qq.com, +.srv.nintendo.net, +.stun.playstation.net, 'xbox.*.microsoft.com', xnotify.xboxlive.com, +.ipv6.microsoft.com, +.battlenet.com.cn, +.wotgame.cn, +.wggames.cn, +.wowsgame.cn, +.wargaming.net, proxy.golang.org, 'stun.*.*', 'stun.*.*.*', '+.stun.*.*', '+.stun.*.*.*', '+.stun.*.*.*.*', heartbeat.belkin.com, '*.linksys.com', '*.linksyssmartwifi.com', '*.router.asus.com', mesu.apple.com, swscan.apple.com, swquery.apple.com, swdownload.apple.com, swcdn.apple.com, swdist.apple.com, lens.l.google.com, stun.l.google.com, '*.square-enix.com', '*.finalfantasyxiv.com', '*.ffxiv.com', '*.ff14.sdo.com', ff.dorado.sdo.com, '*.mcdn.bilivideo.cn', +.media.dssott.com, +.pvp.net] nameserver: ['tls://223.5.5.5:853', 'tls://223.6.6.6:853', 'https://doh.pub/dns-query', 'https://dns.alidns.com/dns-query']
proxy-providers: 订阅1: type: http path: ./proxy_provider/订阅1.yaml url: <订阅1地址> interval: 86400 override: additional-prefix: "订阅1 | " 订阅2: type: http path: ./proxy_provider/订阅2.yaml url: <订阅2地址> interval: 21600 override: additional-prefix: "订阅2 | "
proxy-groups: - name: '自动选择' type: 'fallback' url: 'https://www.gstatic.com/generate_204' interval: 300 timeout: 5000 max-failed-times: 3 use: - '订阅1' - '订阅2' proxies: - '优先最佳' - name: '优先最佳' type: 'url-test' url: 'https://www.gstatic.com/generate_204' interval: 300 timeout: 5000 max-failed-times: 3 use: - '订阅1'
104 collapsed lines
rule-providers: reject: type: http behavior: domain url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/reject.txt" path: ./ruleset/reject.yaml interval: 86400 icloud: type: http behavior: domain url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/icloud.txt" path: ./ruleset/icloud.yaml interval: 86400 apple: type: http behavior: domain url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/apple.txt" path: ./ruleset/apple.yaml interval: 86400 google: type: http behavior: domain url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/google.txt" path: ./ruleset/google.yaml interval: 86400 proxy: type: http behavior: domain url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/proxy.txt" path: ./ruleset/proxy.yaml interval: 86400 direct: type: http behavior: domain url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/direct.txt" path: ./ruleset/direct.yaml interval: 86400 private: type: http behavior: domain url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/private.txt" path: ./ruleset/private.yaml interval: 86400 gfw: type: http behavior: domain url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/gfw.txt" path: ./ruleset/gfw.yaml interval: 86400 tld-not-cn: type: http behavior: domain url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/tld-not-cn.txt" path: ./ruleset/tld-not-cn.yaml interval: 86400 telegramcidr: type: http behavior: ipcidr url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/telegramcidr.txt" path: ./ruleset/telegramcidr.yaml interval: 86400 cncidr: type: http behavior: ipcidr url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/cncidr.txt" path: ./ruleset/cncidr.yaml interval: 86400 lancidr: type: http behavior: ipcidr url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/lancidr.txt" path: ./ruleset/lancidr.yaml interval: 86400 applications: type: http behavior: classical url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/applications.txt" path: ./ruleset/applications.yaml interval: 86400 adblock: type: http behavior: domain url: "https://gcore.jsdelivr.net/gh/217heidai/adblockfilters@main/rules/adblockmihomo.yaml" path: ./ruleset/adblock.yaml interval: 86400
rules: - RULE-SET,applications,DIRECT - DOMAIN,clash.razord.top,DIRECT - DOMAIN,yacd.haishan.me,DIRECT - RULE-SET,private,DIRECT - RULE-SET,reject,REJECT - RULE-SET,adblock,REJECT - RULE-SET,icloud,DIRECT - RULE-SET,apple,DIRECT - RULE-SET,google,自动选择 - RULE-SET,proxy,自动选择 - RULE-SET,direct,DIRECT - RULE-SET,lancidr,DIRECT - RULE-SET,cncidr,DIRECT - RULE-SET,telegramcidr,自动选择 - GEOIP,LAN,DIRECT - GEOIP,CN,DIRECT - MATCH,自动选择代理节点
点击客户端左侧的代理 选项,可以看到右上角多了一个 代理集合 按钮,点开后可以看到合并进去的所有订阅源的信息。

说明
以我的示例配置为例,在使用代理时,会优先使用 订阅1 里速度最快的节点,当该节点失效后尝试使用 订阅1 里的其它节点,当 订阅1 的节点全部失效时才会尝试使用 订阅2 里的节点。
Clash Verge Rev 合并订阅源
https://blog.unknowncat2048.top/posts/dev-tool/clash-verge-rev-merge-providers/