person-share/clash_v4.yaml
2025-05-30 14:22:56 +00:00

210 lines
8.4 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# ----------------------- Clash Meta Optimised -----------------------
mixed-port: 7890 # 同时监听 HTTP / SOCKS
redir-port: 7892 # Linux & macOS 透明代理端口
allow-lan: false # 旁路由场景才改为 true
mode: Rule # Rule / Global / Direct
log-level: info
external-controller: 127.0.0.1:9090
# ========= Proxy-providers =========
proxy-providers:
# 统一用 “AirportShandianPro-XXX.yaml” 命名,避免写错 path
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}
AirportShandianProForeign: # “Foregin” → “Foreign”
<<: *AirportShandianProAll
AirportShandianProAmerica:
<<: *AirportShandianProAll
path: ./providers/proxy/AirportShandianProAmerica.yaml
filter: '美国'
AirportShandianProJapan:
<<: *AirportShandianProAll
path: ./providers/proxy/AirportShandianProJapan.yaml
filter: '日本'
AirportShandianProTaiwan:
<<: *AirportShandianProAll
path: ./providers/proxy/AirportShandianProTaiwan.yaml # 修正 path
url: "https://a.ppconverter.eu.org/api/convert?url=https://b88c32b7-e6db-4dc8-b44f-a13e5160f674.shandiannginx.com/api/v1/client/subscribe?token=a629ecf09cd5408c12610a8171085d7c"
filter: '台湾'
AirportShandianProSingapore:
<<: *AirportShandianProAll
path: ./providers/proxy/AirportShandianProSingapore.yaml
filter: '新加坡'
AirportShandianProHongkong:
<<: *AirportShandianProAll
path: ./providers/proxy/AirportShandianProHongkong.yaml
filter: '香港'
# ========= Static proxies =========
proxies:
- {name: router_local_reality, type: socks5, server: 192.168.11.13, port: 7891}
- {name: local_reality, type: socks5, server: 127.0.0.1, port: 10000}
# ---- VMess 核心节点 (去掉废弃 alterId 字段) ----
- name: vmess_cfws_likezgq
type: vmess
server: 172.64.93.84
port: 8080
uuid: e3a45881-f11b-42da-b0d0-4f1f57c5d57b
cipher: auto
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
cipher: auto
tls: true
tls-hostname: cftls.likezgq.top
skip-cert-verify: true
network: ws
ws-opts:
headers: {Host: cftls.likezgq.top}
path: /tls
# ========= Proxy-groups =========
proxy-groups:
## 延迟测试基组
- name: SB_LOWEST_DELAY
type: url-test
url: http://www.gstatic.com/generate_204
interval: 150
tolerance: 30
proxies: [vmess_cfws_likezgq, vmess_cfws_tls_likezgq, local_reality, router_local_reality]
- name: SB_SELECTED
type: select
proxies: [SB_LOWEST_DELAY, vmess_cfws_tls_likezgq, vmess_cfws_likezgq, local_reality, router_local_reality]
## GPT 系列
- name: GPT_LOWEST_DELAY
type: url-test
url: https://github.com
interval: 150
tolerance: 30
use: [AirportShandianProTaiwan, AirportShandianProSingapore]
- {name: GPT_SELECTED, type: select, proxies: [GPT_LOWEST_DELAY, SB_SELECTED, PG_AMERICA]}
## 其他分类
- {name: YOUTUBE_SELECTED, type: select, proxies: [LOWEST_DELAY, SB_LOWEST_DELAY, SB_SELECTED]}
- {name: REDDIT_SELECTED, type: select, proxies: [PROXY, SB_SELECTED, PG_JAPAN, PG_AMERICA, PG_TAIWAN]}
## 自动负载均衡
- name: LOWEST_DELAY
type: url-test
url: http://www.gstatic.com/generate_204
interval: 150
tolerance: 50
use: [AirportShandianProHongkong]
- name: LOWEST_LOAD_BALANCE
type: load-balance
strategy: consistent-hashing
url: http://www.gstatic.com/generate_204
interval: 180
proxies: [LOWEST_DELAY]
## 地区分流
- name: PG_AMERICA
type: url-test
url: http://www.gstatic.com/generate_204
interval: 300
use: [AirportShandianProAmerica]
proxies: [SB_SELECTED]
- name: PG_JAPAN
type: url-test
url: http://www.gstatic.com/generate_204
interval: 300
use: [AirportShandianProJapan]
- name: PG_TAIWAN
type: url-test
url: http://www.gstatic.com/generate_204
interval: 300
use: [AirportShandianProTaiwan]
- name: PG_SINGAPORE
type: url-test
url: http://www.gstatic.com/generate_204
interval: 300
use: [AirportShandianProSingapore]
## 总代理出口
- name: PROXY
type: select
proxies: [LOWEST_LOAD_BALANCE, GPT_SELECTED, SB_SELECTED]
# ========= Rule-providers (保持原样,仅缩进修正) =========
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 =========
rules:
- DOMAIN-SUFFIX,openai.com,GPT_SELECTED
- DOMAIN-KEYWORD,openai,GPT_SELECTED
- DOMAIN-KEYWORD,chatgpt,GPT_SELECTED
- DOMAIN-KEYWORD,claude,GPT_SELECTED
- DOMAIN-SUFFIX,huggingface.co,SB_SELECTED
# 分类流量
- RULE-SET,github,GPT_SELECTED
- DOMAIN-KEYWORD,youtube,YOUTUBE_SELECTED
- DOMAIN-SUFFIX,bard.google.com,PG_AMERICA
- DOMAIN-KEYWORD,discord,PG_AMERICA
- RULE-SET,tiktok,PG_AMERICA
# IP 与进程直连
- IP-CIDR,100.64.0.0/10,DIRECT
- PROCESS-NAME,tailscaled,DIRECT
- PROCESS-NAME,Tailscale*,DIRECT
# 自定义直连 & CDN 加速
- DOMAIN-SUFFIX,likezgq.top,DIRECT
- DOMAIN-SUFFIX,lan,DIRECT
- IP-CIDR,172.64.93.84/32,DIRECT # 如需改 PROXY 自行调整
# 系统 & 本地优先
- 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
# 其余走总代理
- MATCH,PROXY