详细设置说明自行查看文档 Dreamacro/clash/wiki、MetaCubeX/Clash.Meta、Loyalsoldier/clash-rules 白名单模式,意为「没有命中规则的网络流量,统统使用代理」,适用于服务器线路网络质量稳定、快速,不缺服务器流量的用户。 如你希望 Apple、iCloud 和 Google 列表中的域名使用代理,则把 policy 由 DIRECT 改为 PROXY,以此类推,举一反三。 如你不希望进行 DNS 解析,可在 GEOIP 规则的最后加上 ,no-resolve,如 GEOIP,CN,DIRECT,no-resolve。 白名单模式免流mixed-port: 7890 allow-lan: true bind-address: '*' ipv6: true mode: rule log-level: info external-controller: 0.0.0.0:9090 tun: enable: true stack: gvisor auto-detect-interface: true auto-route: true dns-hijack: - any:53 dns: enable: true listen: 0.0.0.0:53 enhanced-mode: fake-ip nameserver: - 61.139.2.69 - 218.6.200.139 - 202.98.96.68 fallback: - tls://8.8.4.4 - tls://1.1.1.1 fallback-filter: geoip: true ipcidr: - 240.0.0.0/4 proxies: - name: Trojan type: trojan server: <节点地址> port: <节点端口> password: <节点密码> udp: true proxy-groups: - name: 手动选择 type: select proxies: - Trojan rule-providers: reject: type: http behavior: domain url: 'https://jsd.cdn.zzko.cn/gh/Loyalsoldier/clash-rules@release/reject.txt' path: ./ruleset/reject.yaml interval: 86400 icloud: type: http behavior: domain url: 'https://jsd.cdn.zzko.cn/gh/Loyalsoldier/clash-rules@release/icloud.txt' path: ./ruleset/icloud.yaml interval: 86400 apple: type: http behavior: domain url: 'https://jsd.cdn.zzko.cn/gh/Loyalsoldier/clash-rules@release/apple.txt' path: ./ruleset/apple.yaml interval: 86400 google: type: http behavior: domain url: 'https://jsd.cdn.zzko.cn/gh/Loyalsoldier/clash-rules@release/google.txt' path: ./ruleset/google.yaml interval: 86400 proxy: type: http behavior: domain url: 'https://jsd.cdn.zzko.cn/gh/Loyalsoldier/clash-rules@release/proxy.txt' path: ./ruleset/proxy.yaml interval: 86400 direct: type: http behavior: domain url: 'https://jsd.cdn.zzko.cn/gh/Loyalsoldier/clash-rules@release/direct.txt' path: ./ruleset/direct.yaml interval: 86400 private: type: http behavior: domain url: 'https://jsd.cdn.zzko.cn/gh/Loyalsoldier/clash-rules@release/private.txt' path: ./ruleset/private.yaml interval: 86400 gfw: type: http behavior: domain url: 'https://jsd.cdn.zzko.cn/gh/Loyalsoldier/clash-rules@release/gfw.txt' path: ./ruleset/gfw.yaml interval: 86400 greatfire: type: http behavior: domain url: 'https://jsd.cdn.zzko.cn/gh/Loyalsoldier/clash-rules@release/greatfire.txt' path: ./ruleset/greatfire.yaml interval: 86400 tld-not-cn: type: http behavior: domain url: 'https://jsd.cdn.zzko.cn/gh/Loyalsoldier/clash-rules@release/tld-not-cn.txt' path: ./ruleset/tld-not-cn.yaml interval: 86400 telegramcidr: type: http behavior: ipcidr url: 'https://jsd.cdn.zzko.cn/gh/Loyalsoldier/clash-rules@release/telegramcidr.txt' path: ./ruleset/telegramcidr.yaml interval: 86400 cncidr: type: http behavior: ipcidr url: 'https://jsd.cdn.zzko.cn/gh/Loyalsoldier/clash-rules@release/cncidr.txt' path: ./ruleset/cncidr.yaml interval: 86400 lancidr: type: http behavior: ipcidr url: 'https://jsd.cdn.zzko.cn/gh/Loyalsoldier/clash-rules@release/lancidr.txt' path: ./ruleset/lancidr.yaml interval: 86400 applications: type: http behavior: classical url: 'https://jsd.cdn.zzko.cn/gh/Loyalsoldier/clash-rules@release/applications.txt' path: ./ruleset/applications.yaml interval: 86400 rules: # Android Google Store App - PROCESS-NAME,com.android.vending,手动选择 # RSS - DOMAIN-SUFFIX,acg.rip,手动选择 - DOMAIN-SUFFIX,acgnx.se,手动选择 # default - RULE-SET,applications,DIRECT - RULE-SET,private,DIRECT - RULE-SET,reject,REJECT - RULE-SET,icloud,DIRECT - RULE-SET,apple,DIRECT - RULE-SET,google,DIRECT - 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,手动选择mixed-port: 7890 allow-lan: true bind-address: '*' ipv6: true mode: rule log-level: info external-controller: 0.0.0.0:9090 tun: enable: true stack: gvisor auto-detect-interface: true auto-route: true dns-hijack: - any:53 dns: enable: true listen: 0.0.0.0:53 enhanced-mode: fake-ip nameserver: - 61.139.2.69 - 218.6.200.139 - 202.98.96.68 fallback: - tls://8.8.4.4 - tls://1.1.1.1 fallback-filter: geoip: true ipcidr: - 240.0.0.0/4 proxies: - name: 日常 type: vmess server: <节点地址> port: <节点端口> uuid: <节点密码> alterId: 0 cipher: auto udp: true network: ws ws-opts: path: / headers: Host: ltetp.tv189.com - name: 欠费 type: vmess server: <节点地址> port: <节点端口> uuid: <节点密码> alterId: 0 cipher: auto udp: true network: ws ws-opts: path: / headers: Host: wap.sc.189.cn proxy-groups: - name: 全局代理 type: select proxies: - 日常 - 欠费 rule-providers: reject: type: http behavior: domain url: 'https://jsd.cdn.zzko.cn/gh/Loyalsoldier/clash-rules@release/reject.txt' path: ./ruleset/reject.yaml interval: 86400 private: type: http behavior: domain url: 'https://jsd.cdn.zzko.cn/gh/Loyalsoldier/clash-rules@release/private.txt' path: ./ruleset/private.yaml interval: 86400 rules: - RULE-SET,private,DIRECT - RULE-SET,reject,REJECT - MATCH,全局代理