Skip to content

Instantly share code, notes, and snippets.

@corvofeng
Last active May 17, 2025 02:47
Show Gist options
  • Save corvofeng/5782affb2d534af11f950fb887e570fa to your computer and use it in GitHub Desktop.
Save corvofeng/5782affb2d534af11f950fb887e570fa to your computer and use it in GitHub Desktop.
clash_base.yaml
port: {{ default(global.clash.http_port, "7890") }}
socks-port: {{ default(global.clash.socks_port, "7891") }}
allow-lan: {{ default(global.clash.allow_lan, "true") }}
mode: rule
log-level: {{ default(global.clash.log_level, "silent") }}
external-controller: :9091
external-ui: /usr/share/openclash/ui/
secret: ''
{% if default(request.adg, "true") == "true" or exists("request.adg.port") %}
dns:
enable: true
listen: '127.0.0.1:5553'
ipv6: true
use-hosts: true
enhanced-mode: fake-ip
fake-ip-filter:
- '*.n.n.srv.nintendo.net'
- +.stun.playstation.net
- 'xbox.*.*.microsoft.com'
- '*.msftncsi.com'
- '*.msftconnecttest.com'
- WORKGROUP
- '*.lan'
- 'stun.*.*.*'
- 'stun.*.*'
- time.windows.com
- time.nist.gov
- time.apple.com
- time.asia.apple.com
- '*.ntp.org.cn'
- '*.openwrt.pool.ntp.org'
- time1.cloud.tencent.com
- time.ustc.edu.cn
- pool.ntp.org
- ntp.ubuntu.com
- '*.*.xboxlive.com'
- speedtest.cros.wr.pvp.net
nameserver:
- 'https://223.6.6.6/dns-query'
- 'https://120.53.53.53/dns-query'
- 'tls://223.5.5.5:853'
nameserver-policy:
+.tmall.com: 223.5.5.5
+.taobao.com: 223.5.5.5
+.alicdn.com: 223.5.5.5
+.aliyun.com: 223.5.5.5
+.alipay.com: 223.5.5.5
+.alibaba.com: 223.5.5.5
+.qq.com: 119.29.29.29
+.tencent.com: 119.29.29.29
+.weixin.com: 119.29.29.29
+.qpic.cn: 119.29.29.29
+.jd.com: 119.29.29.29
+.bilibili.com: 119.29.29.29
+.hdslb.com: 119.29.29.29
+.163.com: 119.29.29.29
+.126.com: 119.29.29.29
+.126.net: 119.29.29.29
+.127.net: 119.29.29.29
+.netease.com: 119.29.29.29
+.baidu.com: 223.5.5.5
+.bdstatic.com: 223.5.5.5
+.bilivideo.+: 119.29.29.29
+.iqiyi.com: 119.29.29.29
+.douyinvod.com: 180.184.1.1
+.douyin.com: 180.184.1.1
+.douyincdn.com: 180.184.1.1
+.douyinpic.com: 180.184.1.1
+.feishu.cn: 180.184.1.1
fallback:
- 'https://google.dns/dns-query'
- 'https://101.101.101.101/dns-query'
- 'https://public.dns.iij.jp/dns-query'
- 'https://208.67.220.220/dns-query'
fallback-filter:
geoip: true
ipcidr:
- 240.0.0.0/4
- 0.0.0.0/32
- 127.0.0.1/32
- 223.75.236.241/32
domain:
- +.nfcloud.net
- +.nfcloud.club
- +.nfcloud.life
- +.jsdelivr.net
{% endif %}
{% if local.clash.new_field_name == "true" %}
proxies: ~
proxy-groups: ~
rules: ~
{% else %}
Proxy: ~
Proxy Group: ~
Rule: ~
{% endif %}
# 匹配类型,域名
DOMAIN-SUFFIX,vidhub.tv,DIRECT
DOMAIN-SUFFIX,yzzy27-play.com,DIRECT
DOMAIN-SUFFIX,in.corvo.fun,DIRECT
IP-CIDR,17.0.0.0/8,no-resolve
DOMAIN-SUFFIX,google.com
DOMAIN-SUFFIX,meet.google.com
DOMAIN-SUFFIX,googleusercontent.com
[custom]
clash_rule_base=https://gist.github.com/corvofeng/5782affb2d534af11f950fb887e570fa/raw/clash_base.yml
singbox_rule_base=https://gist.github.com/corvofeng/5782affb2d534af11f950fb887e570fa/raw/5737e4633ed1a45b042e62d629f55281333b88d6/singbox.json
;不要随意改变关键字,否则会导致出错
;acl4SSR规则-在线更新版
;去广告:支持
;自动测速:支持
;微软分流:支持
;苹果分流:支持
;增强中国IP段:不支持
;增强国外GFW:不支持
;多国家分组:支持港/日/美
ruleset=DIRECT,
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/LocalAreaNetwork.list
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/UnBan.list
ruleset=🛑 全球拦截,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/BanAD.list
ruleset=🍃 应用净化,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/BanProgramAD.list
ruleset=📢 谷歌FCM,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/GoogleFCM.list
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/GoogleCN.list
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Ruleset/SteamCN.list
ruleset=Ⓜ️ 微软服务,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Microsoft.list
ruleset=🍎 苹果服务,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Apple.list
ruleset=📲 电报信息,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Telegram.list
ruleset=🌍 国外媒体,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ProxyMedia.list
ruleset=🚀 节点选择,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ProxyLite.list
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ChinaDomain.list
ruleset=🎯 全球直连,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ChinaCompanyIp.list
ruleset=🚀 节点选择,https://gist.github.com/corvofeng/5782affb2d534af11f950fb887e570fa/raw/d0d57a1c06e938528d7327693c3b409cb0485ccb/OutterDomain
;ruleset=🎯 全球直连,[]GEOIP,LAN
ruleset=🎯 全球直连,https://gist.github.com/corvofeng/5782affb2d534af11f950fb887e570fa/raw/a1f11541b75e55f75dcd37159c6f79bcdfe8e702/InnerDomain
ruleset=🎯 全球直连,[]GEOIP,CN
ruleset=🐟 漏网之鱼,[]FINAL
custom_proxy_group=🚀 节点选择`select`[]♻️ 自动选择`[]🇭🇰 香港节点`[]🇺🇲 美国节点`[]🇯🇵 日本节点`[]🚀 手动切换`[]DIRECT
custom_proxy_group=🚀 手动切换`select`.*
custom_proxy_group=♻️ 自动选择`url-test`.*`http://www.gstatic.com/generate_204`300,,50
custom_proxy_group=🌍 国外媒体`select`[]🚀 节点选择`[]♻️ 自动选择`[]🎯 全球直连`.*
custom_proxy_group=📲 电报信息`select`[]🚀 节点选择`[]🎯 全球直连`.*
custom_proxy_group=Ⓜ️ 微软服务`select`[]🎯 全球直连`[]🚀 节点选择`.*
custom_proxy_group=🍎 苹果服务`select`[]🚀 节点选择`[]🎯 全球直连`.*
custom_proxy_group=📢 谷歌FCM`select`[]🚀 节点选择`[]🎯 全球直连`[]♻️ 自动选择`.*
custom_proxy_group=🎯 全球直连`select`[]DIRECT`[]🚀 节点选择`[]♻️ 自动选择
custom_proxy_group=🛑 全球拦截`select`[]REJECT`[]DIRECT
custom_proxy_group=🍃 应用净化`select`[]REJECT`[]DIRECT
custom_proxy_group=🐟 漏网之鱼`select`[]🚀 节点选择`[]🎯 全球直连`[]♻️ 自动选择`.*
custom_proxy_group=🇭🇰 香港节点`url-test`(港|HK|hk|Hong Kong|HongKong|hongkong)`http://www.gstatic.com/generate_204`600,,50
custom_proxy_group=🇯🇵 日本节点`url-test`(日本|川日|东京|大阪|泉日|埼玉|沪日|深日|JP|Japan)`http://www.gstatic.com/generate_204`300,,50
custom_proxy_group=🇺🇲 美国节点`url-test`(美|波特兰|达拉斯|俄勒冈|凤凰城|费利蒙|硅谷|拉斯维加斯|洛杉矶|圣何塞|圣克拉拉|西雅图|芝加哥|US|United States)`http://www.gstatic.com/generate_204`300,,150
{
"log": {
"disabled": false,
"level": "info",
"timestamp": true
},
"dns": {
"servers": [
{
"tag": "dns_proxy",
"address": "tls://1.1.1.1",
"address_resolver": "dns_resolver"
},
{
"tag": "dns_direct",
"address": "h3://dns.alidns.com/dns-query",
"address_resolver": "dns_resolver",
"detour": "DIRECT"
},
{
"tag": "dns_resolver",
"address": "223.5.5.5",
"detour": "DIRECT"
},
{
"tag": "block",
"address": "rcode://success"
}
],
"rules": [
{
"outbound": [
"any"
],
"disable_cache": true,
"server": "dns_resolver"
},
{
"clash_mode": "global",
"server": "dns_proxy"
},
{
"geosite": [
"category-ads-all"
],
"server": "dns_block",
"disable_cache": true
}
],
"final": "dns_direct"
},
"ntp": {
"enabled": true,
"server": "time.apple.com",
"server_port": 123,
"interval": "30m",
"detour": "DIRECT"
},
"inbounds": [
{
"type": "mixed",
"tag": "mixed-in",
"listen": "0.0.0.0",
"listen_port": 2080
},
{
"type": "tun",
"tag": "tun-in",
"inet4_address": "172.19.0.1/30",
"inet6_address": "fdfe:dcba:9876::1/126",
"auto_route": true,
"strict_route": true,
"stack": "mixed",
"sniff": true
}
],
"outbounds": [],
"route": {
"rules": [],
"auto_detect_interface": true
},
"experimental": {
"cache_file": {
"enabled": true,
"store_fakeip": true
},
"clash_api": {
"external_controller": "127.0.0.1:9090",
"external_ui": "dashboard"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment