547 lines
14 KiB
YAML
547 lines
14 KiB
YAML
# HTTP 端口
|
|
mixed-port: 7890
|
|
|
|
# Linux 及 macOS 的 redir 端口
|
|
# redir-port: 7892
|
|
|
|
allow-lan: false
|
|
|
|
# 仅适用于设置 allow-lan 为 true 时
|
|
# "*": 绑定所有 IP 地址
|
|
# 192.168.122.11: 绑定单个 IPv4 地址
|
|
# "[aaaa::a8aa:ff:fe09:57d8]": 绑定单个 IPv6 地址
|
|
# bind-address: "*"
|
|
|
|
# Rule / Global / Direct (默认为 Rule 模式)
|
|
mode: Rule
|
|
|
|
# 设置输出日志的等级 (默认为 info)
|
|
# info / warning / error / debug / silent
|
|
log-level: info
|
|
|
|
# RESTful API for clash
|
|
external-controller: 127.0.0.1:9090
|
|
|
|
# 启用 IPv6
|
|
ipv6: true
|
|
|
|
# 增强模式
|
|
enhanced-mode: fake-ip
|
|
|
|
# DNS 配置优化
|
|
dns:
|
|
enable: true
|
|
listen: 0.0.0.0:53
|
|
ipv6: true
|
|
enhanced-mode: fake-ip
|
|
fake-ip-range: 198.18.0.1/16
|
|
fake-ip-filter:
|
|
- '*.lan'
|
|
- '*.local'
|
|
- localhost.ptlogin2.qq.com
|
|
- '+.srv.nintendo.net'
|
|
- '+.stun.playstation.net'
|
|
- xbox.*.microsoft.com
|
|
- '*.battlenet.com.cn'
|
|
- '*.battlenet.com'
|
|
- '*.blzstatic.cn'
|
|
- '*.battle.net'
|
|
nameserver:
|
|
- 223.5.5.5
|
|
- 119.29.29.29
|
|
- 114.114.114.114
|
|
fallback:
|
|
- 8.8.8.8
|
|
- 1.1.1.1
|
|
- tls://dns.google
|
|
fallback-filter:
|
|
geoip: true
|
|
geoip-code: CN
|
|
ipcidr:
|
|
- 240.0.0.0/4
|
|
|
|
proxy-providers:
|
|
AirportShandianProAll:
|
|
type: http
|
|
path: ./providers/proxy/AirportShandianProAll.yaml
|
|
url: "https://a.ppconverter.eu.org/api/convert?url=https://times1732002366.subxiandan.top:9604/v2b/shandian/api/v1/client/subscribe?token=fdee6024ef338b23b9012eb748030d1c"
|
|
interval: 1800
|
|
health-check:
|
|
enable: true
|
|
url: http://www.gstatic.com/generate_204
|
|
interval: 300
|
|
timeout: 5000
|
|
|
|
AirportShandianProForegin:
|
|
type: http
|
|
path: ./providers/proxy/AirportShandianProForegin.yaml
|
|
url: "https://a.ppconverter.eu.org/api/convert?url=https://times1732002366.subxiandan.top:9604/v2b/shandian/api/v1/client/subscribe?token=fdee6024ef338b23b9012eb748030d1c"
|
|
interval: 1800
|
|
health-check:
|
|
enable: true
|
|
url: http://www.gstatic.com/generate_204
|
|
interval: 300
|
|
timeout: 5000
|
|
|
|
AirportShandianProAmerica:
|
|
type: http
|
|
path: ./providers/proxy/AirportShandianProAmerica.yaml
|
|
url: "https://a.ppconverter.eu.org/api/convert?url=https://times1732002366.subxiandan.top:9604/v2b/shandian/api/v1/client/subscribe?token=fdee6024ef338b23b9012eb748030d1c"
|
|
interval: 1800
|
|
filter: '美国'
|
|
health-check:
|
|
enable: true
|
|
url: http://www.gstatic.com/generate_204
|
|
interval: 300
|
|
timeout: 5000
|
|
|
|
AirportShandianProJapan:
|
|
type: http
|
|
path: ./providers/proxy/AirportShandianProJapan.yaml
|
|
url: "https://a.ppconverter.eu.org/api/convert?url=https://times1732002366.subxiandan.top:9604/v2b/shandian/api/v1/client/subscribe?token=fdee6024ef338b23b9012eb748030d1c"
|
|
interval: 1800
|
|
filter: '日本'
|
|
health-check:
|
|
enable: true
|
|
url: http://www.gstatic.com/generate_204
|
|
interval: 300
|
|
timeout: 5000
|
|
|
|
AirportShandianProTaiwan:
|
|
type: http
|
|
path: ./providers/proxy/AirportShandianProTaiwan.yaml
|
|
url: "https://a.ppconverter.eu.org/api/convert?url=https://b88c32b7-e6db-4dc8-b44f-a13e5160f674.shandiannginx.com/api/v1/client/subscribe?token=a629ecf09cd5408c12610a8171085d7c"
|
|
interval: 1800
|
|
filter: '台湾'
|
|
health-check:
|
|
enable: true
|
|
url: http://www.gstatic.com/generate_204
|
|
interval: 300
|
|
timeout: 5000
|
|
|
|
AirportShandianProSingapore:
|
|
type: http
|
|
path: ./providers/proxy/AirportShandianProSingapore.yaml
|
|
url: "https://a.ppconverter.eu.org/api/convert?url=https://times1732002366.subxiandan.top:9604/v2b/shandian/api/v1/client/subscribe?token=fdee6024ef338b23b9012eb748030d1c"
|
|
interval: 1800
|
|
filter: '新加坡'
|
|
health-check:
|
|
enable: true
|
|
url: http://www.gstatic.com/generate_204
|
|
interval: 300
|
|
timeout: 5000
|
|
|
|
AirportShandianProHongkong:
|
|
type: http
|
|
path: ./providers/proxy/AirportShandianProHongkong.yaml
|
|
url: "https://a.ppconverter.eu.org/api/convert?url=https://times1732002366.subxiandan.top:9604/v2b/shandian/api/v1/client/subscribe?token=fdee6024ef338b23b9012eb748030d1c"
|
|
interval: 1800
|
|
filter: '香港'
|
|
health-check:
|
|
enable: true
|
|
url: http://www.gstatic.com/generate_204
|
|
interval: 300
|
|
timeout: 5000
|
|
|
|
proxies:
|
|
- name: "router_local_reality"
|
|
type: socks5
|
|
server: 192.168.11.13
|
|
port: 7891
|
|
udp: true
|
|
|
|
- name: "local_reality"
|
|
type: socks5
|
|
server: 127.0.0.1
|
|
port: 10000
|
|
udp: true
|
|
|
|
- name: "vmess_cfws_likezgq"
|
|
type: vmess
|
|
server: 172.64.93.84
|
|
port: 8080
|
|
uuid: e3a45881-f11b-42da-b0d0-4f1f57c5d57b
|
|
alterId: 0
|
|
cipher: auto
|
|
udp: true
|
|
skip-cert-verify: true
|
|
network: ws
|
|
ws-opts:
|
|
headers:
|
|
Host: cfws.likezgq.top
|
|
path: /ws
|
|
|
|
- name: "vmess_cfws_tls_likezgq"
|
|
type: vmess
|
|
server: 104.16.29.191
|
|
port: 2053
|
|
uuid: a226be6c-2b1c-49c3-ad6b-f5857704f003
|
|
alterId: 0
|
|
cipher: auto
|
|
udp: true
|
|
tls: true
|
|
skip-cert-verify: true
|
|
network: ws
|
|
servername: cftls.likezgq.top
|
|
ws-opts:
|
|
headers:
|
|
Host: cftls.likezgq.top
|
|
path: /tls
|
|
|
|
proxy-groups:
|
|
# 自建节点组 - 优化延迟检测
|
|
- name: SB_LOWEST_DELAY1
|
|
type: url-test
|
|
url: http://www.gstatic.com/generate_204
|
|
interval: 120
|
|
timeout: 5000
|
|
tolerance: 20
|
|
proxies:
|
|
- "vmess_cfws_tls_likezgq"
|
|
- "vmess_cfws_likezgq"
|
|
- "local_reality"
|
|
- "router_local_reality"
|
|
|
|
- name: SB_SELECTED
|
|
type: select
|
|
proxies:
|
|
- SB_LOWEST_DELAY1
|
|
- "vmess_cfws_tls_likezgq"
|
|
- "vmess_cfws_likezgq"
|
|
- "local_reality"
|
|
- "router_local_reality"
|
|
|
|
# GPT 专用组 - 优化为台湾和新加坡节点
|
|
- name: GPT_LOWEST_DELAY1
|
|
type: url-test
|
|
url: https://www.google.com/generate_204
|
|
interval: 180
|
|
timeout: 8000
|
|
tolerance: 50
|
|
use:
|
|
- AirportShandianProTaiwan
|
|
- AirportShandianProSingapore
|
|
|
|
- name: GPT_SELECTED
|
|
type: select
|
|
proxies:
|
|
- GPT_LOWEST_DELAY1
|
|
- SB_SELECTED
|
|
- PG_AMERICA
|
|
|
|
# Reddit 专用组
|
|
- name: REDDIT_SELECTED
|
|
type: select
|
|
proxies:
|
|
- PROXY
|
|
- SB_SELECTED
|
|
- PG_JAPAN
|
|
- PG_AMERICA
|
|
- PG_TAIWAN
|
|
|
|
# YouTube 专用组
|
|
- name: YOUTUBE_SELECTED
|
|
type: select
|
|
proxies:
|
|
- LOWEST_DELAY1
|
|
- SB_LOWEST_DELAY1
|
|
- SB_SELECTED
|
|
|
|
# 香港节点组 - 主要代理
|
|
- name: LOWEST_DELAY1
|
|
type: url-test
|
|
url: http://www.gstatic.com/generate_204
|
|
interval: 120
|
|
timeout: 5000
|
|
tolerance: 30
|
|
use:
|
|
- AirportShandianProHongkong
|
|
|
|
- name: LOWEST_DELAY2
|
|
type: url-test
|
|
url: http://www.gstatic.com/generate_204
|
|
interval: 200
|
|
timeout: 5000
|
|
tolerance: 30
|
|
use:
|
|
- AirportShandianProHongkong
|
|
|
|
# 负载均衡组
|
|
- name: LOWEST_LOAD_BALANCE
|
|
type: load-balance
|
|
strategy: consistent-hashing
|
|
url: 'http://www.google.com/generate_204'
|
|
interval: 150
|
|
timeout: 5000
|
|
proxies:
|
|
- LOWEST_DELAY1
|
|
- LOWEST_DELAY2
|
|
|
|
# 主代理延迟测试组
|
|
- name: PROXY_DELAY
|
|
type: url-test
|
|
url: http://www.gstatic.com/generate_204
|
|
interval: 120
|
|
timeout: 5000
|
|
tolerance: 50
|
|
proxies:
|
|
- LOWEST_LOAD_BALANCE
|
|
- SB_SELECTED
|
|
|
|
# 主代理选择组
|
|
- name: PROXY
|
|
type: select
|
|
proxies:
|
|
- PROXY_DELAY
|
|
- LOWEST_LOAD_BALANCE
|
|
- GPT_SELECTED
|
|
- SB_SELECTED
|
|
|
|
# 地区专用组
|
|
- name: PG_AMERICA
|
|
type: url-test
|
|
url: http://www.gstatic.com/generate_204
|
|
interval: 240
|
|
timeout: 8000
|
|
tolerance: 100
|
|
use:
|
|
- AirportShandianProAmerica
|
|
proxies:
|
|
- SB_SELECTED
|
|
|
|
- name: PG_JAPAN_DELAY
|
|
type: url-test
|
|
url: http://www.gstatic.com/generate_204
|
|
interval: 240
|
|
timeout: 8000
|
|
tolerance: 100
|
|
use:
|
|
- AirportShandianProJapan
|
|
|
|
- name: PG_JAPAN
|
|
type: select
|
|
proxies:
|
|
- PG_JAPAN_DELAY
|
|
- SB_SELECTED
|
|
|
|
- name: PG_TAIWAN
|
|
type: url-test
|
|
url: http://www.gstatic.com/generate_204
|
|
interval: 240
|
|
timeout: 8000
|
|
tolerance: 100
|
|
use:
|
|
- AirportShandianProTaiwan
|
|
|
|
- name: PG_SINGAPORE
|
|
type: url-test
|
|
url: http://www.gstatic.com/generate_204
|
|
interval: 240
|
|
timeout: 8000
|
|
tolerance: 100
|
|
use:
|
|
- AirportShandianProSingapore
|
|
|
|
rule-providers:
|
|
reject:
|
|
type: http
|
|
behavior: domain
|
|
url: "https://fastly.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/reject.txt"
|
|
path: ./ruleset/reject.yaml
|
|
interval: 86400
|
|
|
|
icloud:
|
|
type: http
|
|
behavior: domain
|
|
url: "https://fastly.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/icloud.txt"
|
|
path: ./ruleset/icloud.yaml
|
|
interval: 86400
|
|
|
|
apple:
|
|
type: http
|
|
behavior: domain
|
|
url: "https://fastly.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/apple.txt"
|
|
path: ./ruleset/apple.yaml
|
|
interval: 86400
|
|
|
|
google:
|
|
type: http
|
|
behavior: domain
|
|
url: "https://fastly.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/google.txt"
|
|
path: ./ruleset/google.yaml
|
|
interval: 86400
|
|
|
|
proxy:
|
|
type: http
|
|
behavior: domain
|
|
url: "https://fastly.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/proxy.txt"
|
|
path: ./ruleset/proxy.yaml
|
|
interval: 86400
|
|
|
|
direct:
|
|
type: http
|
|
behavior: domain
|
|
url: "https://fastly.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/direct.txt"
|
|
path: ./ruleset/direct.yaml
|
|
interval: 86400
|
|
|
|
private:
|
|
type: http
|
|
behavior: domain
|
|
url: "https://fastly.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/private.txt"
|
|
path: ./ruleset/private.yaml
|
|
interval: 86400
|
|
|
|
tld-not-cn:
|
|
type: http
|
|
behavior: domain
|
|
url: "https://fastly.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://fastly.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/telegramcidr.txt"
|
|
path: ./ruleset/telegramcidr.yaml
|
|
interval: 86400
|
|
|
|
cncidr:
|
|
type: http
|
|
behavior: ipcidr
|
|
url: "https://fastly.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/cncidr.txt"
|
|
path: ./ruleset/cncidr.yaml
|
|
interval: 86400
|
|
|
|
lancidr:
|
|
type: http
|
|
behavior: ipcidr
|
|
url: "https://fastly.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/lancidr.txt"
|
|
path: ./ruleset/lancidr.yaml
|
|
interval: 86400
|
|
|
|
applications:
|
|
type: http
|
|
behavior: classical
|
|
url: "https://fastly.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/applications.txt"
|
|
path: ./ruleset/applications.yaml
|
|
interval: 86400
|
|
|
|
github:
|
|
type: http
|
|
behavior: domain
|
|
url: "https://raw.gitmirror.com/ACL4SSR/ACL4SSR/master/Clash/Providers/Ruleset/Github.yaml"
|
|
path: ./ruleset/github.yaml
|
|
interval: 86400
|
|
|
|
tiktok:
|
|
type: http
|
|
behavior: domain
|
|
url: "https://raw.gitmirror.com/ACL4SSR/ACL4SSR/master/Clash/Providers/Ruleset/TikTok.yaml"
|
|
path: ./ruleset/tiktok.yaml
|
|
interval: 86400
|
|
|
|
rules:
|
|
# AI 服务专用规则 - 保持原有逻辑
|
|
- DOMAIN-SUFFIX,anthropic.com,PG_AMERICA
|
|
- DOMAIN,huggingface.co,SB_SELECTED
|
|
- DOMAIN-SUFFIX,openai.com,GPT_SELECTED
|
|
- DOMAIN-KEYWORD,openai,GPT_SELECTED
|
|
- DOMAIN-KEYWORD,chatgpt,GPT_SELECTED
|
|
- DOMAIN-KEYWORD,claude,GPT_SELECTED
|
|
- DOMAIN-KEYWORD,sora.com,GPT_SELECTED
|
|
- DOMAIN-KEYWORD,gemini,GPT_SELECTED
|
|
- DOMAIN-KEYWORD,grok,GPT_SELECTED
|
|
- DOMAIN-KEYWORD,aistudio,GPT_SELECTED
|
|
|
|
# 开发相关
|
|
- RULE-SET,github,GPT_SELECTED
|
|
|
|
# 媒体服务
|
|
- DOMAIN-KEYWORD,youtube,YOUTUBE_SELECTED
|
|
|
|
# 特定地区服务
|
|
- DOMAIN-SUFFIX,bard.google.com,PG_AMERICA
|
|
- DOMAIN-SUFFIX,one.google.com,PG_AMERICA
|
|
- DOMAIN-KEYWORD,discord,PG_AMERICA
|
|
- DOMAIN-KEYWORD,us-api,PG_AMERICA
|
|
- DOMAIN-KEYWORD,paypal,PG_AMERICA
|
|
- DOMAIN-KEYWORD,paypa1,PG_AMERICA
|
|
- DOMAIN-KEYWORD,reddit.com,REDDIT_SELECTED
|
|
|
|
# 成人内容 - 日本节点
|
|
- DOMAIN-KEYWORD,avgle,PG_JAPAN
|
|
- DOMAIN-KEYWORD,porn,PG_JAPAN
|
|
- DOMAIN-KEYWORD,xvideo,PG_JAPAN
|
|
- DOMAIN-KEYWORD,xhamster,PG_JAPAN
|
|
|
|
# 社交媒体
|
|
- RULE-SET,tiktok,PG_AMERICA
|
|
|
|
# 技术相关网站
|
|
- DOMAIN-SUFFIX,ycombinator.com,PROXY
|
|
- DOMAIN-SUFFIX,distrowatch.com,PROXY
|
|
|
|
# Python 包管理
|
|
- DOMAIN-SUFFIX,pypi.org,PROXY
|
|
- DOMAIN-SUFFIX,pythonhosted.org,PROXY
|
|
|
|
# 其他服务
|
|
- DOMAIN-SUFFIX,nvidia.com,PROXY
|
|
- DOMAIN-SUFFIX,tailscale.com,PROXY
|
|
|
|
# Telegram
|
|
- RULE-SET,telegramcidr,PROXY,no-resolve
|
|
|
|
# 直连规则 - 保持原有逻辑
|
|
- DOMAIN-KEYWORD,time.windows.com,DIRECT
|
|
- DOMAIN-SUFFIX,likezgq.top,DIRECT
|
|
- DOMAIN-KEYWORD,ra2web.com,DIRECT
|
|
- DOMAIN-KEYWORD,bun.sh.cn,DIRECT
|
|
- DOMAIN-SUFFIX,kgithub.com,DIRECT
|
|
- DOMAIN-KEYWORD,chronodivide.com,DIRECT
|
|
- DOMAIN,clash.razord.top,DIRECT
|
|
- DOMAIN,yacd.haishan.me,DIRECT
|
|
- DOMAIN-SUFFIX,likezgq.pub,DIRECT
|
|
- DOMAIN-SUFFIX,home.pub,DIRECT
|
|
- DOMAIN-SUFFIX,lan,DIRECT
|
|
|
|
# Cloudflare CDN IP - 直连
|
|
- IP-CIDR,104.27.80.65/32,DIRECT
|
|
- IP-CIDR,104.16.29.191/32,DIRECT
|
|
- IP-CIDR,141.101.115.236/32,DIRECT
|
|
- IP-CIDR,172.64.93.84/32,DIRECT
|
|
- IP-CIDR,142.171.94.73/32,DIRECT
|
|
|
|
# Tailscale 网络
|
|
- IP-CIDR,100.64.0.0/10,DIRECT
|
|
|
|
# Tailscale 进程
|
|
- PROCESS-NAME,Tailscale.exe,DIRECT
|
|
- PROCESS-NAME,Tailscale Service.exe,DIRECT
|
|
- PROCESS-NAME,tailscaled.exe,DIRECT
|
|
- PROCESS-NAME,tailscale-ipn.exe,DIRECT
|
|
- PROCESS-NAME,tailscaled,DIRECT
|
|
- PROCESS-NAME,Tailscale,DIRECT
|
|
|
|
# 基础规则集 - 保持原有逻辑顺序
|
|
- 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,direct,DIRECT
|
|
- RULE-SET,lancidr,DIRECT,no-resolve
|
|
- RULE-SET,cncidr,DIRECT,no-resolve
|
|
- GEOIP,LAN,DIRECT
|
|
- GEOIP,CN,DIRECT
|
|
|
|
# SSH 连接
|
|
- DST-PORT,22,SB_SELECTED
|
|
|
|
# 代理规则
|
|
- RULE-SET,proxy,PROXY
|
|
|
|
# 兜底规则
|
|
- MATCH,PROXY |