279 lines
6.4 KiB
YAML
279 lines
6.4 KiB
YAML
port: 7890
|
||
socks-port: 7891
|
||
mixed-port: 7890
|
||
allow-lan: false
|
||
mode: rule
|
||
log-level: info
|
||
ipv6: false
|
||
external-controller: 127.0.0.1:9090
|
||
|
||
# DNS 优化 (Fake-IP 避免 DNS 污染与泄露)
|
||
dns:
|
||
enable: true
|
||
listen: 0.0.0.0:1053
|
||
ipv6: false
|
||
enhanced-mode: fake-ip
|
||
fake-ip-range: 198.18.0.1/16
|
||
nameserver:
|
||
- 223.5.5.5
|
||
- 119.29.29.29
|
||
fallback:
|
||
- https://dns.google/dns-query
|
||
- https://1.1.1.1/dns-query
|
||
fallback-filter:
|
||
geoip: true
|
||
geoip-code: CN
|
||
ipcidr:
|
||
- 240.0.0.0/4
|
||
|
||
# 4 个新节点转换配置
|
||
proxies:
|
||
# 1. VLESS Reality (TCP + Vision)
|
||
- name: "VPS-Reality"
|
||
type: vless
|
||
server: 154.201.80.157
|
||
port: 53151
|
||
uuid: a1bf8240-e7a9-47a8-a941-5e556f096e4c
|
||
cipher: none
|
||
udp: true
|
||
tls: true
|
||
flow: xtls-rprx-vision
|
||
servername: www.iij.ad.jp
|
||
reality-opts:
|
||
public-key: k-3W2gMnlgj-Xc-hGtigWAyb1uo_fzmE_2Cq8gU7BGw
|
||
short-id: 4de0887490c3ad48
|
||
client-fingerprint: firefox
|
||
tfo: true
|
||
|
||
# 2. Hysteria 2 (基于 UDP,SHA256 证书锁定)
|
||
- name: "VPS-Hy2"
|
||
type: hysteria2
|
||
server: 154.201.80.157
|
||
port: 12580
|
||
password: a1bf8240-e7a9-47a8-a941-5e556f096e4c
|
||
sni: www.bing.com
|
||
skip-cert-verify: true
|
||
alpn:
|
||
- h3
|
||
pinned-sha256: DF:7B:BA:17:E6:86:A4:A1:CE:3D:C3:DC:FB:3F:53:A8:E3:FF:27:E0:FD:35:6D:13:16:8A:EE:8F:93:0C:2D:08
|
||
|
||
# 3. TUIC v5 (BBR 拥塞控制 + Native UDP)
|
||
- name: "VPS-TUIC"
|
||
type: tuic
|
||
server: 154.201.80.157
|
||
port: 34760
|
||
uuid: a1bf8240-e7a9-47a8-a941-5e556f096e4c
|
||
password: a1bf8240-e7a9-47a8-a941-5e556f096e4c
|
||
sni: www.bing.com
|
||
congestion-controller: bbr
|
||
udp-relay-mode: native
|
||
reduce-rtt: true
|
||
alpn:
|
||
- h3
|
||
skip-cert-verify: true
|
||
|
||
# 4. VMess Argo WebSocket (Cloudflare CDN 兜底)
|
||
- name: "VPS-VMess-Argo"
|
||
type: vmess
|
||
server: cdns.doon.eu.org
|
||
port: 443
|
||
uuid: a1bf8240-e7a9-47a8-a941-5e556f096e4c
|
||
alterId: 0
|
||
cipher: auto
|
||
udp: true
|
||
tls: true
|
||
servername: similar-beyond-msgid-jewelry.trycloudflare.com
|
||
network: ws
|
||
ws-opts:
|
||
path: /vmess-argo?ed=2560
|
||
headers:
|
||
Host: similar-beyond-msgid-jewelry.trycloudflare.com
|
||
client-fingerprint: firefox
|
||
skip-cert-verify: false
|
||
|
||
# 策略组
|
||
proxy-groups:
|
||
- name: "节点选择"
|
||
type: select
|
||
proxies:
|
||
- "自动选优"
|
||
- "负载均衡"
|
||
- "VPS-Reality"
|
||
- "VPS-Hy2"
|
||
- "VPS-TUIC"
|
||
- "VPS-VMess-Argo"
|
||
|
||
- name: "自动选优"
|
||
type: url-test
|
||
url: http://www.gstatic.com/generate_204
|
||
interval: 300
|
||
tolerance: 50
|
||
proxies:
|
||
- "VPS-Reality"
|
||
- "VPS-Hy2"
|
||
- "VPS-TUIC"
|
||
- "VPS-VMess-Argo"
|
||
|
||
- name: "负载均衡"
|
||
type: load-balance
|
||
url: http://www.gstatic.com/generate_204
|
||
interval: 300
|
||
strategy: round-robin
|
||
proxies:
|
||
- "VPS-Reality"
|
||
- "VPS-Hy2"
|
||
- "VPS-TUIC"
|
||
- "VPS-VMess-Argo"
|
||
|
||
- name: "电报信息"
|
||
type: select
|
||
proxies:
|
||
- "节点选择"
|
||
- "VPS-Hy2"
|
||
- "VPS-TUIC"
|
||
- "VPS-Reality"
|
||
|
||
- name: "苹果服务"
|
||
type: select
|
||
proxies:
|
||
- DIRECT
|
||
- "节点选择"
|
||
|
||
- name: "国内直连"
|
||
type: select
|
||
proxies:
|
||
- DIRECT
|
||
- "节点选择"
|
||
|
||
- name: "漏网之鱼"
|
||
type: select
|
||
proxies:
|
||
- "节点选择"
|
||
- DIRECT
|
||
|
||
# Loyalsoldier 远程分流规则集
|
||
rule-providers:
|
||
reject:
|
||
type: http
|
||
behavior: domain
|
||
url: "https://raw.githubusercontent.com/Loyalsoldier/clash-rules/release/reject.txt"
|
||
path: ./ruleset/reject.yaml
|
||
interval: 86400
|
||
|
||
icloud:
|
||
type: http
|
||
behavior: domain
|
||
url: "https://raw.githubusercontent.com/Loyalsoldier/clash-rules/release/icloud.txt"
|
||
path: ./ruleset/icloud.yaml
|
||
interval: 86400
|
||
|
||
apple:
|
||
type: http
|
||
behavior: domain
|
||
url: "https://raw.githubusercontent.com/Loyalsoldier/clash-rules/release/apple.txt"
|
||
path: ./ruleset/apple.yaml
|
||
interval: 86400
|
||
|
||
google:
|
||
type: http
|
||
behavior: domain
|
||
url: "https://raw.githubusercontent.com/Loyalsoldier/clash-rules/release/google.txt"
|
||
path: ./ruleset/google.yaml
|
||
interval: 86400
|
||
|
||
proxy:
|
||
type: http
|
||
behavior: domain
|
||
url: "https://raw.githubusercontent.com/Loyalsoldier/clash-rules/release/proxy.txt"
|
||
path: ./ruleset/proxy.yaml
|
||
interval: 86400
|
||
|
||
direct:
|
||
type: http
|
||
behavior: domain
|
||
url: "https://raw.githubusercontent.com/Loyalsoldier/clash-rules/release/direct.txt"
|
||
path: ./ruleset/direct.yaml
|
||
interval: 86400
|
||
|
||
private:
|
||
type: http
|
||
behavior: domain
|
||
url: "https://raw.githubusercontent.com/Loyalsoldier/clash-rules/release/private.txt"
|
||
path: ./ruleset/private.yaml
|
||
interval: 86400
|
||
|
||
gfw:
|
||
type: http
|
||
behavior: domain
|
||
url: "https://raw.githubusercontent.com/Loyalsoldier/clash-rules/release/gfw.txt"
|
||
path: ./ruleset/gfw.yaml
|
||
interval: 86400
|
||
|
||
tld-not-cn:
|
||
type: http
|
||
behavior: domain
|
||
url: "https://raw.githubusercontent.com/Loyalsoldier/clash-rules/release/tld-not-cn.txt"
|
||
path: ./ruleset/tld-not-cn.yaml
|
||
interval: 86400
|
||
|
||
telegramcidr:
|
||
type: http
|
||
behavior: ipcidr
|
||
url: "https://raw.githubusercontent.com/Loyalsoldier/clash-rules/release/telegramcidr.txt"
|
||
path: ./ruleset/telegramcidr.yaml
|
||
interval: 86400
|
||
|
||
cncidr:
|
||
type: http
|
||
behavior: ipcidr
|
||
url: "https://raw.githubusercontent.com/Loyalsoldier/clash-rules/release/cncidr.txt"
|
||
path: ./ruleset/cncidr.yaml
|
||
interval: 86400
|
||
|
||
lancidr:
|
||
type: http
|
||
behavior: ipcidr
|
||
url: "https://raw.githubusercontent.com/Loyalsoldier/clash-rules/release/lancidr.txt"
|
||
path: ./ruleset/lancidr.yaml
|
||
interval: 86400
|
||
|
||
applications:
|
||
type: http
|
||
behavior: classical
|
||
url: "https://raw.githubusercontent.com/Loyalsoldier/clash-rules/release/applications.txt"
|
||
path: ./ruleset/applications.yaml
|
||
interval: 86400
|
||
|
||
# 匹配执行规则
|
||
rules:
|
||
# 本地与进程规则
|
||
- RULE-SET,applications,DIRECT
|
||
|
||
# 广告拦截
|
||
- RULE-SET,reject,REJECT
|
||
|
||
# 局域网直连
|
||
- RULE-SET,private,DIRECT
|
||
- RULE-SET,lancidr,DIRECT,no-resolve
|
||
|
||
# Telegram 走电报策略组
|
||
- RULE-SET,telegramcidr,电报信息,no-resolve
|
||
|
||
# 苹果服务
|
||
- RULE-SET,icloud,苹果服务
|
||
- RULE-SET,apple,苹果服务
|
||
|
||
# Google 与境外代理
|
||
- RULE-SET,google,节点选择
|
||
- RULE-SET,proxy,节点选择
|
||
- RULE-SET,gfw,节点选择
|
||
- RULE-SET,tld-not-cn,节点选择
|
||
|
||
# 国内直连
|
||
- RULE-SET,direct,国内直连
|
||
- RULE-SET,cncidr,国内直连
|
||
- GEOIP,LAN,DIRECT,no-resolve
|
||
- GEOIP,CN,国内直连
|
||
|
||
# 漏网流量兜底
|
||
- MATCH,漏网之鱼 |