小火箭远程配置文件:https://cf.buliang0.cf/shadowrocket-rules/nodnsleak-pk.ini
查询dns泄漏:https://ipleak.net

IPCheck.ing - 查看我的 IP 地址 - 查询本机 IP 地址及归属地 - 查看 WebRTC 连接 IP - DNS 泄露检测 - 网速测试 - Jason Ng 阿禅开源作品

查ip:http://ip111.cn/ 或者 https://ip.skk.moe/

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
# Shadowrocket配置文件,解决DNS泄露

[General]
bypass-system = true
skip-proxy = 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12, localhost, *.local, captive.apple.com
tun-excluded-routes = 10.0.0.0/8, 100.64.0.0/10, 127.0.0.0/8, 169.254.0.0/16, 172.16.0.0/12, 192.0.0.0/24, 192.0.2.0/24, 192.88.99.0/24, 192.168.0.0/16, 198.51.100.0/24, 203.0.113.0/24, 224.0.0.0/4, 255.255.255.255/32, 239.255.255.250/32
dns-server = system
ipv6 = false
prefer-ipv6 = false
dns-fallback-system = false
dns-direct-system = false
icmp-auto-reply = true
always-reject-url-rewrite = false
private-ip-answer = true
dns-direct-fallback-proxy = true

[Rule]
RULE-SET,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/LocalAreaNetwork.list,DIRECT
RULE-SET,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/UnBan.list,DIRECT
RULE-SET,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ChinaDomain.list,DIRECT
RULE-SET,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ChinaMedia.list,DIRECT
RULE-SET,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/BanAD.list,REJECT
RULE-SET,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/BanProgramAD.list,REJECT
RULE-SET,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ChinaCompanyIp.list,DIRECT
RULE-SET,https://raw.githubusercontent.com/ACL4SSR/ACL4SSR/master/Clash/ChinaIp.list,DIRECT
GEOIP,CN,DIRECT,no-resolve
FINAL,PROXY

[Host]
localhost = 127.0.0.1

[URL Rewrite]
^https?://(www.)?g.cn https://www.google.com 302
^https?://(www.)?google.cn https://www.google.com 302

常见问题

小火箭的远程配置文件地址是什么?

正文给出的地址是 https://cf.buliang0.cf/shadowrocket-rules/nodnsleak-pk.ini,可直接填入 Shadowrocket 作为远程配置使用。

配置里 dns-server = system 是什么意思?

这条设置让 DNS 使用系统 DNS,而不是自定义 DNS。配置同时把 ipv6 和 prefer-ipv6 都设为 false,并将 dns-fallback-system、dns-direct-system 设为 false,配合 bypass-system = true 使用。

怎么检查自己的 DNS 有没有泄漏?

可以用 https://ipleak.net 查询 DNS 泄漏,也可以用 https://ipcheck.ing 查看 DNS 泄露检测结果。想单独查 IP,可用 http://ip111.cn/ 或 https://ip.skk.moe/。

配置里的 FINAL,PROXY 起什么作用?

这是兜底规则,前面所有 RULE-SET 和 GEOIP,CN,DIRECT 都没匹配到时,流量走 PROXY。国内域名、国内 IP 和局域网分别由对应的 RULE-SET 与 GEOIP,CN 规则走 DIRECT。

tun-excluded-routes 里为什么有这么多网段?

这些是私有和保留网段,例如 10.0.0.0/8、172.16.0.0/12、192.168.0.0/16、127.0.0.0/8 等,把它们排除在 TUN 之外可避免内网流量进入代理。skip-proxy 里同样列了 192.168.0.0/16、10.0.0.0/8、172.16.0.0/12、localhost、*.local 和 captive.apple.com。

URL Rewrite 那两条规则重写到哪里?

两条规则分别匹配 g.cn 和 google.cn(含带 www 的形式),都以 302 跳转到 https://www.google.com。规则写在 [URL Rewrite] 段,另有一个 [Host] 段把 localhost 指向 127.0.0.1。

相关阅读