-
Notifications
You must be signed in to change notification settings - Fork 2
/
template.yaml
218 lines (182 loc) · 6.83 KB
/
template.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
# Wiki: https://github.com/Dreamacro/clash/wiki/Configuration
# Clash 流媒体等策略组规则整合.
# https://github.com/Z-Siqi/Clash-for-Windows_Rule
# https://github.com/blackmatrix7/ios_rule_script/tree/master/rule/Clash
# HTTP(S) and SOCKS4(A)/SOCKS5 server on the same port
mixed-port: 7890
# Linux 和 macOS 的 redir 透明代理端口 (重定向 TCP 和 TProxy UDP 流量)
redir-port: 7892
# 允许局域网的连接(可用来共享代理)
allow-lan: false
# Clash 路由工作模式
# 规则模式:rule(规则) / global(全局代理)/ direct(全局直连)
mode: rule
# 设置日志输出级别 (默认级别:silent,即不输出任何内容,以避免因日志内容过大而导致程序内存溢出)。
# 5 个级别:silent / info / warning / error / debug。级别越高日志输出量越大,越倾向于调试,若需要请自行开启。
log-level: info
# clash 的 RESTful API 监听地址
external-controller: '0.0.0.0:9090'
# RESTful API 的口令 (可选)
# 通过 HTTP 头中 Authorization: Bearer ${secret} 参数来验证口令
# 当 RESTful API 的监听地址为 0.0.0.0 时,请务必设定口令以保证安全
# secret: ""
# 出站网卡接口
# interface-name: en0
# DNS 服务器和建立连接时的 静态 Hosts, 仅在 dns.enhanced-mode 模式为 redir-host 生效
# 支持通配符域名 (例如: *.clash.dev, *.foo.*.example.com )
# 不使用通配符的域名优先级高于使用通配符的域名 (例如: foo.example.com > *.example.com > .example.com )
# 注意: +.foo.com 的效果等同于 .foo.com 和 foo.com
hosts:
'*.docker.internal': 127.0.0.1
# '*.clash.dev': 127.0.0.1
# '.dev': 127.0.0.1
# 'alpha.clash.dev': '::1'
# DNS 服务器配置(可选;若不配置,程序内置的 DNS 服务会被关闭)
dns:
enable: false
listen: 0.0.0.0:53
# 以下填写的 DNS 服务器将会被用来解析 DNS 服务的域名
# 仅填写 DNS 服务器的 IP 地址
default-nameserver:
- 114.114.114.114
- 8.8.8.8
# fake-ip-range: 198.18.0.1/16 # Fake IP 地址池 (CIDR 形式)
use-hosts: true # 查询 hosts 并返回 IP 记录
# 此列表中的主机名将不会使用 Fake IP 解析
# 即, 对这些域名的请求将始终使用其真实 IP 地址进行响应
# fake-ip-filter:
# - '*.lan'
# - localhost.ptlogin2.qq.com
# 支持 UDP、TCP、DoT、DoH. 您可以指定要连接的端口.
# 所有 DNS 查询都直接发送到名称服务器, 无需代理
# Clash 使用第一个收到的响应作为 DNS 查询的结果.
nameserver:
- 114.114.114.114 # 默认值
- 8.8.8.8 # 默认值
- tls://dns.rubyfish.cn:853 # DNS over TLS
- https://1.1.1.1/dns-query # DNS over HTTPS
- dhcp://en0
# proxy provider start here
#proxy-providers:
#proxy-groups:
rule-providers:
advertisingLite:
type: http
behavior: classical
url: "https://cdn.jsdelivr.net/gh/blackmatrix7/ios_rule_script@release/rule/Clash/AdvertisingLite/AdvertisingLite_Classical.yaml"
path: ./ruleset/advertisingLite.yaml
interval: 86400
apple:
type: http
behavior: classical
url: "https://cdn.jsdelivr.net/gh/blackmatrix7/ios_rule_script@release/rule/Clash/Apple/Apple_Classical.yaml"
path: ./ruleset/apple.yaml
interval: 86400
openai:
type: http
behavior: classical
url: "https://cdn.jsdelivr.net/gh/blackmatrix7/ios_rule_script@release/rule/Clash/OpenAI/OpenAI.yaml"
path: ./ruleset/openai.yaml
interval: 86400
google:
type: http
behavior: classical
url: "https://cdn.jsdelivr.net/gh/blackmatrix7/ios_rule_script@release/rule/Clash/Google/Google.yaml"
path: ./ruleset/google.yaml
interval: 86400
telegram:
type: http
behavior: classical
url: "https://cdn.jsdelivr.net/gh/blackmatrix7/ios_rule_script@release/rule/Clash/Telegram/Telegram.yaml"
path: ./ruleset/telegram.yaml
interval: 86400
twitter:
type: http
behavior: classical
url: "https://cdn.jsdelivr.net/gh/blackmatrix7/ios_rule_script@release/rule/Clash/Twitter/Twitter.yaml"
path: ./ruleset/twitter.yaml
interval: 86400
youtube:
type: http
behavior: classical
url: "https://cdn.jsdelivr.net/gh/blackmatrix7/ios_rule_script@release/rule/Clash/YouTube/YouTube.yaml"
path: ./ruleset/youtube.yaml
interval: 86400
amazon:
type: http
behavior: classical
url: "https://cdn.jsdelivr.net/gh/blackmatrix7/ios_rule_script@release/rule/Clash/Amazon/Amazon.yaml"
path: ./ruleset/amazon.yaml
interval: 86400
netflix:
type: http
behavior: classical
url: "https://cdn.jsdelivr.net/gh/blackmatrix7/ios_rule_script@master/rule/Clash/Netflix/Netflix_Classical.yaml"
path: ./ruleset/netflix.yaml
interval: 86400
tiktok:
type: http
behavior: classical
url: "https://cdn.jsdelivr.net/gh/blackmatrix7/ios_rule_script@release/rule/Clash/TikTok/TikTok.yaml"
path: ./ruleset/tiktok.yaml
interval: 86400
jetbrains:
type: http
behavior: classical
url: "https://cdn.jsdelivr.net/gh/blackmatrix7/ios_rule_script@master/rule/Clash/Jetbrains/Jetbrains.yaml"
path: ./ruleset/jetbrains.yaml
interval: 86400
claude:
type: http
behavior: classical
url: "https://cdn.jsdelivr.net/gh/blackmatrix7/ios_rule_script@master/rule/Clash/Claude/Claude.yaml"
path: ./ruleset/claude.yaml
interval: 86400
proxy:
type: http
behavior: classical
url: "https://ghproxy.com/https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/release/rule/Clash/Proxy/Proxy_Classical.yaml"
path: ./ruleset/proxy.yaml
interval: 86400
direct:
type: http
behavior: classical
url: "https://cdn.jsdelivr.net/gh/blackmatrix7/ios_rule_script@release/rule/Clash/Direct/Direct.yaml"
path: ./ruleset/direct.yaml
interval: 86400
private:
type: http
behavior: classical
url: "https://cdn.jsdelivr.net/gh/blackmatrix7/ios_rule_script@release/rule/Clash/Lan/Lan.yaml"
path: ./ruleset/lan.yaml
interval: 86400
cnmax:
type: http
behavior: classical
url: "https://cdn.jsdelivr.net/gh/blackmatrix7/ios_rule_script@release/rule/Clash/ChinaMax/ChinaMax_Classical.yaml"
path: ./ruleset/cnmax.yaml
interval: 86400
rules:
# 白名单模式 Rules 配置方式, 没有命中规则的网络流量,统统使用代理
- DOMAIN,clash.razord.top,DIRECT
- DOMAIN,yacd.haishan.me,DIRECT
- RULE-SET,private,DIRECT
- DOMAIN-SUFFIX,coze.com,OpenAI
- RULE-SET,advertisingLite,REJECT
- RULE-SET,apple,Apple
- RULE-SET,google,Google
- RULE-SET,telegram,Telegram
- RULE-SET,openai,OpenAI
- RULE-SET,jetbrains,Jetbrains
- RULE-SET,claude,Claude
- RULE-SET,twitter,Twitter
- RULE-SET,youtube,YouTube
- RULE-SET,netflix,Netflix
- RULE-SET,tiktok,TikTok
- RULE-SET,amazon,Amazon
- RULE-SET,proxy,Proxy
- RULE-SET,direct,DIRECT
- RULE-SET,cnmax,DIRECT
- GEOIP,LAN,DIRECT
- GEOIP,CN,DIRECT
- MATCH,MATCH