Clash 进阶补充:自定义规则集 + DNS 配置 + IPv6 关闭 全讲解【配置文件直接用】

1

1
2
3
4
5
6
7
8
9
10
11
12
13
14
规则集
https://github.com/ACL4SSR/ACL4SSR/tree/master/Clash/Ruleset

ai
http://chatglm.cn/

mihomowiki
https://wiki.metacubex.one/config/

clashverge
https://github.com/clash-verge-rev/clash-verge-rev

mac关闭ipv6
sudo networksetup -setv6off Wi-Fi

配置

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
mode: rule
mixed-port: 7897
allow-lan: false
log-level: info
external-controller: 127.0.0.1:9097
secret: set-your-secret
unified-delay: true
bind-address: '*'
profile:
store-selected: true
store-fake-ip: true
external-controller-unix: /tmp/verge/verge-mihomo.sock
tcp-concurrent: true
external-controller-cors:
allow-private-network: true
allow-origins:
- tauri://localhost
- http://tauri.localhost
- https://yacd.metacubex.one
- https://metacubex.github.io
- https://board.zash.run.place
find-process-mode: always
ipv6: false
dns:
enable: true
ipv6: false
listen: 0.0.0.0:1053
enhanced-mode: fake-ip
fake-ip-filter-mode: whitelist
respect-rules: true
fake-ip-range: 198.18.0.1/16
fake-ip-filter:
- "rule-set:github"
- "rule-set:jys"
- "rule-set:ai"
- "rule-set:proxy"
- "rule-set:gfw"
- "rule-set:tld-not-cn"
- "rule-set:google"
nameserver:
- 223.5.5.5
- 119.29.29.29
proxy-server-nameserver:
- 223.5.5.5
- 119.29.29.29
tun:
enable: true
stack: gvisor
auto-route: true
strict-route: false
auto-detect-interface: true
dns-hijack:
- any:53
listeners:
- name: M50001
type: mixed
port: 50001
listen: 127.0.0.1
udp: true
proxy: S50001
proxies:
- name: 直连
type: direct
proxy-providers:
fakeyou:
url: https://image.fakeyou.top/25384810-d24a-40ca-8f80-f1fcea2fbb53.yaml
type: http
interval: 864000
proxy: 直连
proxy-groups:
- name: 代理
type: select
include-all: true
filter: "(?i)港|台|新|日|韩|美|HK|TW|SG|JP|KR|US|Taiwan|Hong Kong|Singapore|Japan|Korea|States|直连"
- name: ai代理
type: select
include-all: true
filter: "(?i)台|新|日|韩|美|TW|SG|JP|KR|US|Taiwan|Singapore|Japan|Korea|States"
- name: 交易所
type: select
include-all: true
filter: "(?i)港|台|新|日|韩|美|HK|TW|SG|JP|KR|US|Taiwan|Hong Kong|Singapore|Japan|Korea|States"
- name: 邮件
type: select
include-all: true
filter: "(?i)港|台|新|日|韩|美|HK|TW|SG|JP|KR|US|Taiwan|Hong Kong|Singapore|Japan|Korea|States"
- name: 模拟器
type: select
include-all: true
filter: "(?i)港|台|新|日|韩|美|HK|TW|SG|JP|KR|US|Taiwan|Hong Kong|Singapore|Japan|Korea|States|直连"
- name: 链式代理
type: select
include-all: true
filter: "(?i)港|台|新|日|韩|美|HK|TW|SG|JP|KR|US|Taiwan|Hong Kong|Singapore|Japan|Korea|States"
- name: github分组
type: select
include-all: true
filter: "(?i)港|台|新|日|韩|美|HK|TW|SG|JP|KR|US|Taiwan|Hong Kong|Singapore|Japan|Korea|States"
rules:
- RULE-SET,github,github分组
- PROCESS-NAME,MuMuPlayer Pro,模拟器
- DOMAIN-SUFFIX,imap.gmail.com,邮件
- DOMAIN-SUFFIX,smtp.gmail.com,邮件
- RULE-SET,jys,交易所
- RULE-SET,ai,ai代理
- RULE-SET,google,代理
- RULE-SET,private,直连
- RULE-SET,icloud,直连
- RULE-SET,apple,直连
- RULE-SET,direct,直连
- RULE-SET,lancidr,直连
- RULE-SET,cncidr,直连
- MATCH,代理
rule-providers:
github:
type: http
behavior: domain
interval: 86400
url: https://ghfast.top/https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/refs/heads/master/Clash/Ruleset/Github.list
jys:
type: http
behavior: domain
interval: 86400
url: https://ghfast.top/https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/refs/heads/master/Clash/Providers/Ruleset/Crypto.yaml
ai:
type: http
behavior: domain
interval: 86400
url: https://ghfast.top/https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/Providers/Ruleset/AI.yaml
applications:
type: http
behavior: classical
url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/applications.txt"
interval: 86400
proxy:
type: http
behavior: domain
url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/proxy.txt"
interval: 86400
gfw:
type: http
behavior: domain
url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/gfw.txt"
interval: 86400
tld-not-cn:
type: http
behavior: domain
url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/tld-not-cn.txt"
interval: 86400
google:
type: http
behavior: domain
url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/google.txt"
interval: 86400
private:
type: http
behavior: domain
url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/private.txt"
interval: 86400
icloud:
type: http
behavior: domain
url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/icloud.txt"
interval: 86400
apple:
type: http
behavior: domain
url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/apple.txt"
interval: 86400
direct:
type: http
behavior: domain
url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/direct.txt"
interval: 86400
lancidr:
type: http
behavior: ipcidr
url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/lancidr.txt"
interval: 86400
cncidr:
type: http
behavior: ipcidr
url: "https://cdn.jsdelivr.net/gh/Loyalsoldier/clash-rules@release/cncidr.txt"
interval: 86400