-
-
Save ASC8384/8889bed93081a6fe92dba5a550158fef to your computer and use it in GitHub Desktop.
Clash Meta 懒人配置
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Clash Meta 懒人配置 | |
# https://gist.github.com/liuran001/5ca84f7def53c70b554d3f765ff86a33 | |
# 作者: 笨蛋ovo (bdovo.cc) | |
# Telegram: https://t.me/baka_not_baka | |
# 修改自官方示例规则 https://wiki.metacubex.one/example/#meta | |
# 转载请保留此注释 | |
# 尽量添加了较为详尽的注释,不理解的地方建议对照 Clash Meta Wiki 进行理解 | |
# 不理解的地方不要乱动,这套规则我自己在用是正常没问题的,搞坏了我不负责 | |
# 推荐机场: 倾城极速 (https://qcjs.pro/) | |
# 全中转 流媒体解锁 8K秒开无压力 | |
# 分组 | |
pr: | |
&pr { | |
type: select, | |
proxies: | |
[ | |
节点选择, | |
香港, | |
台湾, | |
日本, | |
新加坡, | |
美国, | |
其它地区, | |
全部节点, | |
自动选择, | |
DIRECT, | |
], | |
} | |
# 延迟检测 URL | |
p: | |
&p { | |
type: http, | |
interval: 3600, | |
health-check: | |
{ | |
enable: true, | |
url: https://www.gstatic.com/generate_204, | |
interval: 300, | |
}, | |
} | |
# 订阅名,记得修改成自己的 | |
# 添删订阅在这里和下方订阅链接依葫芦画瓢就行 | |
use: &use | |
type: select | |
use: | |
- 订阅一 | |
- 订阅二 | |
- 订阅三 | |
# 订阅链接 | |
# path 为选填项,如果无法正常工作请启用 path | |
proxy-providers: | |
订阅一: | |
<<: *p | |
# path: ./订阅一.yaml | |
url: "https://example.com/airport?type=clash&protocol=shadowsocks&rule=default" | |
订阅二: | |
<<: *p | |
# path: ./订阅二.yaml | |
url: "https://example.com/api/v1/client/subscribe?token=8964xjp" | |
订阅三: | |
<<: *p | |
# path: ./订阅三.yaml | |
url: "https://example.com/api/v1/client/subscribe?token=52chinaccp" | |
# 规则订阅 | |
rule-providers: | |
# anti-AD 广告拦截规则 | |
# https://github.com/privacy-protection-tools/anti-AD | |
# 如果误杀率高请自行更换 | |
anti-AD: | |
type: http | |
behavior: domain | |
format: yaml | |
# path可为空(仅限clash.meta 1.15.0以上版本) | |
path: ./anti-AD.yaml | |
url: "https://raw.githubusercontent.com/privacy-protection-tools/anti-AD/master/anti-ad-clash.yaml?" | |
interval: 600 | |
# anti-AD 白名单规则 | |
anti-AD-white: | |
type: http | |
behavior: domain | |
format: yaml | |
# path可为空(仅限clash.meta 1.15.0以上版本) | |
path: ./anti-AD-white.yaml | |
url: "https://raw.githubusercontent.com/privacy-protection-tools/dead-horse/master/anti-ad-white-for-clash.yaml?" | |
interval: 600 | |
mode: rule | |
# ipv6 支持 | |
ipv6: true | |
log-level: info | |
# 允许局域网连接 | |
allow-lan: true | |
# socks5/http 端口 | |
mixed-port: 7890 | |
# Meta 内核特性 https://wiki.metacubex.one/config/general | |
# 统一延迟 | |
# 更换延迟计算方式,去除握手等额外延迟 | |
unified-delay: true | |
# TCP 并发 | |
# 同时对所有ip进行连接,返回延迟最低的地址 | |
tcp-concurrent: true | |
# 外部控制端口 | |
external-controller: :9090 | |
geodata-mode: true | |
# Geo 数据库下载地址 | |
# 使用 FastGit 代理 (https://fgit.cf) | |
# 源地址 https://github.com/MetaCubeX/meta-rules-dat | |
# 可以更换镜像站但不要更换其他数据库,可能导致无法启动 | |
geox-url: | |
geoip: "https://download.fgit.cf/MetaCubeX/meta-rules-dat/releases/download/latest/geoip.dat" | |
geosite: "https://download.fgit.cf/MetaCubeX/meta-rules-dat/releases/download/latest/geosite.dat" | |
mmdb: "https://download.fgit.cf/MetaCubeX/meta-rules-dat/releases/download/latest/country.mmdb" | |
# 进程匹配模式 | |
# 路由器上请设置为 off | |
# find-process-mode: off | |
# 全局客户端指纹 | |
global-client-fingerprint: random # 随机指纹 | |
# 缓存 | |
profile: | |
store-selected: true | |
store-fake-ip: true | |
# 域名嗅探 | |
sniffer: | |
enable: true | |
sniff: | |
TLS: | |
ports: [443, 8443] | |
HTTP: | |
ports: [80, 8080-8880] | |
override-destination: true | |
# tun 模式 | |
tun: | |
enable: false # enable 'true' | |
stack: system # or 'gvisor' | |
dns-hijack: | |
- "any:53" | |
- "tcp://any:53" | |
auto-route: true | |
auto-detect-interface: true | |
# dns 设置 | |
# 已配置 ipv6 | |
dns: | |
enable: true | |
listen: :1053 | |
ipv6: true | |
# 路由器个人建议使用 redir-host 以最佳兼容性 | |
# 其他设备可以使用 fake-ip | |
enhanced-mode: redir-host | |
fake-ip-range: 28.0.0.1/8 | |
fake-ip-filter: | |
- '*' | |
- '+.lan' | |
- '+.local' | |
default-nameserver: | |
- 223.5.5.5 | |
- 119.29.29.29 | |
- 114.114.114.114 | |
- '[2402:4e00::]' | |
- '[2400:3200::1]' | |
nameserver: | |
- 'tls://8.8.4.4#dns' | |
- 'tls://1.0.0.1#dns' | |
- 'tls://[2001:4860:4860::8844]#dns' | |
- 'tls://[2606:4700:4700::1001]#dns' | |
proxy-server-nameserver: | |
- https://doh.pub/dns-query | |
nameserver-policy: | |
"geosite:cn,private": | |
- https://doh.pub/dns-query | |
- https://dns.alidns.com/dns-query | |
# 多入站端口设置 | |
# 个人拿来做哔哩漫游解析分流用的 | |
# listeners: | |
# - name: hk | |
# type: mixed | |
# port: 12991 | |
# proxy: 香港 | |
# - name: tw | |
# type: mixed | |
# port: 12992 | |
# proxy: 台湾 | |
# - name: sg | |
# type: mixed | |
# port: 12993 | |
# proxy: 新加坡 | |
proxies: | |
# - name: "WARP" | |
# type: wireguard | |
# server: engage.cloudflareclient.com | |
# port: 2408 | |
# ip: "172.16.0.2/32" | |
# ipv6: "2606::1/128" # 自行替换 | |
# private-key: "private-key" # 自行替换 | |
# public-key: "public-key" # 自行替换 | |
# udp: true | |
# reserved: "abba" # 自行替换 | |
# mtu: 1280 | |
# dialer-proxy: "dns" | |
# remote-dns-resolve: true | |
# dns: | |
# - https://dns.cloudflare.com/dns-query | |
proxy-groups: | |
- { | |
name: 节点选择, | |
type: select, | |
proxies: | |
[全部节点, 自动选择, 香港, 台湾, 日本, 新加坡, 美国, 其它地区, DIRECT], | |
} | |
# - { | |
# name: dns, | |
# type: select, | |
# proxies: | |
# [WARP, 节点选择, 自动选择, 香港, 台湾, 日本, 新加坡, 美国, 其它地区, 全部节点, DIRECT] | |
# } # 加入 WARP | |
- { | |
name: dns, # 这里的 dns 指海外解析 dns 走的节点,一般跟随节点选择即可 | |
type: select, | |
proxies: | |
[ | |
节点选择, | |
自动选择, | |
香港, | |
台湾, | |
日本, | |
新加坡, | |
美国, | |
其它地区, | |
全部节点, | |
DIRECT, | |
], | |
} | |
- { name: 广告拦截白名单, type: select, proxies: [DIRECT, REJECT, 节点选择] } | |
- { name: 广告拦截, type: select, proxies: [REJECT, DIRECT, 节点选择] } | |
- { name: Google, <<: *pr } | |
- { name: Telegram, <<: *pr } | |
- { name: Twitter, <<: *pr } | |
- { name: Pixiv, <<: *pr } | |
- { name: ehentai, <<: *pr } | |
# 下面两个看需求启用,打开之后会代理全站流量,可能导致部分版权视频反而无法播放 | |
# - {name: 哔哩哔哩, <<: *pr} | |
# - {name: 哔哩东南亚, <<: *pr} | |
- { name: 巴哈姆特, <<: *pr } | |
- { name: YouTube, <<: *pr } | |
- { name: NETFLIX, <<: *pr } | |
- { name: Spotify, <<: *pr } | |
- { name: Github, <<: *pr } | |
- { | |
name: 国内, | |
type: select, | |
proxies: | |
[ | |
DIRECT, | |
节点选择, | |
香港, | |
台湾, | |
日本, | |
新加坡, | |
美国, | |
其它地区, | |
全部节点, | |
自动选择, | |
], | |
} | |
# 其他就是所有规则没匹配到的 | |
# 可以理解为其他配置里的 漏网之鱼 | |
# 换言之,其他走代理就是绕过中国大陆地址,不走就是 GFWList 模式 | |
- { name: 其他, <<: *pr } | |
# 分隔,下面是地区分组 | |
- { name: 香港, <<: *use, filter: "(?i)港|hk|hongkong|hong kong" } | |
- { name: 台湾, <<: *use, filter: "(?i)台|tw|taiwan" } | |
- { name: 日本, <<: *use, filter: "(?i)日本|jp|japan" } | |
- { name: 美国, <<: *use, filter: "(?i)美|us|unitedstates|united states" } | |
- { name: 新加坡, <<: *use, filter: "(?i)(新|sg|singapore)" } | |
- { | |
name: 其它地区, | |
<<: *use, | |
filter: "(?i)^(?!.*(?:🇭🇰|🇯🇵|🇺🇸|🇸🇬|🇨🇳|港|hk|hongkong|台|tw|taiwan|日|jp|japan|新|sg|singapore|美|us|unitedstates)).*", | |
} | |
- { name: 全部节点, <<: *use } | |
- { name: 自动选择, <<: *use, tolerance: 2, type: url-test } | |
rules: | |
# 若需禁用 QUIC 请取消注释 QUIC 两条规则 | |
# 防止 YouTube 等使用 QUIC 导致速度不佳, 禁用 443 端口 UDP 流量(不包括国内) | |
# - AND,(AND,(DST-PORT,443),(NETWORK,UDP)),(NOT,((GEOSITE,cn))),REJECT # quic | |
- RULE-SET,anti-AD-white,广告拦截白名单 | |
- RULE-SET,anti-AD,广告拦截 | |
# - GEOSITE,biliintl,哔哩东南亚 | |
# - GEOSITE,bilibili,哔哩哔哩 | |
- GEOSITE,ehentai,ehentai | |
- GEOSITE,github,Github | |
- GEOSITE,twitter,Twitter | |
- GEOSITE,youtube,YouTube | |
- GEOSITE,google,Google | |
- GEOSITE,telegram,Telegram | |
- GEOSITE,netflix,NETFLIX | |
- GEOSITE,bahamut,巴哈姆特 | |
- GEOSITE,spotify,Spotify | |
- GEOSITE,geolocation-!cn,其他 | |
# - AND,(AND,(DST-PORT,443),(NETWORK,UDP)),(NOT,((GEOIP,CN))),REJECT # quic | |
- GEOIP,google,Google | |
- GEOIP,netflix,NETFLIX | |
- GEOIP,telegram,Telegram | |
- GEOIP,twitter,Twitter | |
- GEOSITE,pixiv,Pixiv | |
- GEOSITE,CN,国内 | |
- GEOIP,CN,国内 | |
- MATCH,其他 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment