Sync all projects
This commit is contained in:
@@ -10,9 +10,9 @@ tags: [Clash, mihomo, 进阶, DNS, DNS 分流]
|
||||
{: .prompt-tip }
|
||||
1. 使用 [ShellCrash](https://github.com/juewuy/ShellCrash) 搭配 [AdGuard Home](https://github.com/AdguardTeam/AdGuardHome) 并将 AdGuard Home 作为上游时不要使用该方法
|
||||
2. 本教程以 ShellCrash 为例,其它客户端亦可参考
|
||||
3. 本教程搭载 [mihomo 内核 Meta 版](https://github.com/MetaCubeX/mihomo/tree/Meta)(导入内核方法可参考《[ShellCrash 和 AdGuard Home 快速安装教程/导入 mihomo 内核 或 sing-box 内核](https://proxy-tutorials.dustinwin.us.kg/posts/pin-toolsinstall/#%E4%BA%8C-%E5%AF%BC%E5%85%A5-mihomo-%E5%86%85%E6%A0%B8-%E6%88%96-sing-box-%E5%86%85%E6%A0%B8)》)
|
||||
3. 本教程搭载 [mihomo 内核 Meta 版](https://github.com/MetaCubeX/mihomo/tree/Meta)(导入内核方法可参考《[ShellCrash 和 AdGuard Home 快速安装教程/导入 mihomo 内核 或 sing-box 内核](https://proxy-tutorials.dustinwin.cc.cd/posts/pin-toolsinstall/#%E4%BA%8C-%E5%AF%BC%E5%85%A5-mihomo-%E5%86%85%E6%A0%B8-%E6%88%96-sing-box-%E5%86%85%E6%A0%B8)》)
|
||||
4. DNS 分流简单来说就是**指定国内域名走国内 DNS 解析,国外域名走 `fake-ip`**。未知域名走 `fake-ip`(在匹配 `GEOIP:cn` 规则时会由国内 DNS 解析,解析出 IP 在国内则走 `国内 IP` 规则,否则走 `漏网之鱼` 规则)
|
||||
5. 部分用户觉得未知域名处理方式会导致 DNS 泄露,可参考《[搭载 mihomo 内核配置 DNS 不泄露教程-geodata 方案](https://proxy-tutorials.dustinwin.us.kg/posts/dnsnoleaks-mihomo-geodata)》
|
||||
5. 部分用户觉得未知域名处理方式会导致 DNS 泄露,可参考《[搭载 mihomo 内核配置 DNS 不泄露教程-geodata 方案](https://proxy-tutorials.dustinwin.cc.cd/posts/dnsnoleaks-mihomo-geodata)》
|
||||
|
||||
## 一、 导入路由规则文件
|
||||
geosite.dat 文件须包含 `fakeip-filter`、`cn` 和 `proxy`,推荐导入我定制的[路由规则文件](https://github.com/DustinWin/ruleset_geodata?tab=readme-ov-file#%E4%B8%80-geodata-%E6%96%87%E4%BB%B6%E8%AF%B4%E6%98%8E)
|
||||
|
||||
@@ -10,9 +10,9 @@ tags: [Clash, mihomo, 进阶, DNS, DNS 分流]
|
||||
{: .prompt-tip }
|
||||
1. 使用 [ShellCrash](https://github.com/juewuy/ShellCrash) 搭配 [AdGuard Home](https://github.com/AdguardTeam/AdGuardHome) 并将 AdGuard Home 作为上游时不要使用该方法
|
||||
2. 本教程以 ShellCrash 为例,其它客户端亦可参考
|
||||
3. 本教程搭载 [mihomo 内核 Meta 版](https://github.com/MetaCubeX/mihomo/tree/Meta)(导入内核方法可参考《[ShellCrash 和 AdGuard Home 快速安装教程/导入 mihomo 内核 或 sing-box 内核](https://proxy-tutorials.dustinwin.us.kg/posts/pin-toolsinstall/#%E4%BA%8C-%E5%AF%BC%E5%85%A5-mihomo-%E5%86%85%E6%A0%B8-%E6%88%96-sing-box-%E5%86%85%E6%A0%B8)》)
|
||||
3. 本教程搭载 [mihomo 内核 Meta 版](https://github.com/MetaCubeX/mihomo/tree/Meta)(导入内核方法可参考《[ShellCrash 和 AdGuard Home 快速安装教程/导入 mihomo 内核 或 sing-box 内核](https://proxy-tutorials.dustinwin.cc.cd/posts/pin-toolsinstall/#%E4%BA%8C-%E5%AF%BC%E5%85%A5-mihomo-%E5%86%85%E6%A0%B8-%E6%88%96-sing-box-%E5%86%85%E6%A0%B8)》)
|
||||
4. DNS 分流简单来说就是**指定国内域名走国内 DNS 解析,国外域名走 `fake-ip`**。未知域名走 `fake-ip`(在匹配 `RULE-SET:cnip` 规则时会由国内 DNS 解析,解析出 IP 在国内则走 `国内 IP` 规则,否则走 `漏网之鱼` 规则)
|
||||
5. 部分用户觉得未知域名处理方式会导致 DNS 泄露,可参考《[搭载 mihomo 内核配置 DNS 不泄露教程-ruleset 方案](https://proxy-tutorials.dustinwin.us.kg/posts/dnsnoleaks-mihomo-ruleset)》
|
||||
5. 部分用户觉得未知域名处理方式会导致 DNS 泄露,可参考《[搭载 mihomo 内核配置 DNS 不泄露教程-ruleset 方案](https://proxy-tutorials.dustinwin.cc.cd/posts/dnsnoleaks-mihomo-ruleset)》
|
||||
|
||||
## 一、 导入规则集合文件
|
||||
`rule-providers` 须添加 `fakeip-filter`、`cn` 和 `proxy`,如下:
|
||||
|
||||
@@ -10,7 +10,7 @@ tags: [Clash, mihomo, 进阶, DNS, DNS 泄露]
|
||||
{: .prompt-tip }
|
||||
1. 此方案彻底防止了 DNS 泄露(未知域名在匹配 `GEOIP:cn` 规则时会由国外 DNS 解析且配置 `ecs`,解析出 IP 在国内则走 `国内 IP` 规则,否则走 `漏网之鱼` 规则),兼容性高,可放心使用
|
||||
2. 本教程以 [ShellCrash](https://github.com/juewuy/ShellCrash) 为例,其它客户端亦可参考
|
||||
3. 本教程搭载 [mihomo 内核 Meta 版](https://github.com/MetaCubeX/mihomo/tree/Meta)(导入内核方法可参考《[ShellCrash 和 AdGuard Home 快速安装教程/导入 mihomo 内核 或 sing-box 内核](https://proxy-tutorials.dustinwin.us.kg/posts/pin-toolsinstall/#%E4%BA%8C-%E5%AF%BC%E5%85%A5-mihomo-%E5%86%85%E6%A0%B8-%E6%88%96-sing-box-%E5%86%85%E6%A0%B8)》)
|
||||
3. 本教程搭载 [mihomo 内核 Meta 版](https://github.com/MetaCubeX/mihomo/tree/Meta)(导入内核方法可参考《[ShellCrash 和 AdGuard Home 快速安装教程/导入 mihomo 内核 或 sing-box 内核](https://proxy-tutorials.dustinwin.cc.cd/posts/pin-toolsinstall/#%E4%BA%8C-%E5%AF%BC%E5%85%A5-mihomo-%E5%86%85%E6%A0%B8-%E6%88%96-sing-box-%E5%86%85%E6%A0%B8)》)
|
||||
4. 可进入 <https://ipleak.net> 测试 DNS 是否泄露,“DNS Addresses” 栏目下没有中国国旗(因 `ipleak.net` 属未知域名,默认走 `漏网之鱼` 规则),即代表 DNS 没有发生泄露
|
||||
|
||||
## 一、 导入路由规则文件
|
||||
@@ -67,7 +67,7 @@ dns:
|
||||
按一下 Esc 键(退出键),输入英文冒号 `:`,继续输入 `wq` 并回车
|
||||
|
||||
### 2. DNS 模式为 `fake-ip`(不推荐)
|
||||
- ① 额外编辑配置文件,在《[生成带有自定义策略组和规则的 mihomo 配置文件直链-geodata 方案/添加模板](https://proxy-tutorials.dustinwin.us.kg/posts/link-mihomo-geodata/#%E4%BA%8C-%E6%B7%BB%E5%8A%A0%E6%A8%A1%E6%9D%BF)》编辑 .yaml 配置文件时,将 `rules` 里的所有 `GEOIP` 规则末尾加上 `no-resolve`,即修改为:
|
||||
- ① 额外编辑配置文件,在《[生成带有自定义策略组和规则的 mihomo 配置文件直链-geodata 方案/添加模板](https://proxy-tutorials.dustinwin.cc.cd/posts/link-mihomo-geodata/#%E4%BA%8C-%E6%B7%BB%E5%8A%A0%E6%A8%A1%E6%9D%BF)》编辑 .yaml 配置文件时,将 `rules` 里的所有 `GEOIP` 规则末尾加上 `no-resolve`,即修改为:
|
||||
|
||||
```yaml
|
||||
- GEOIP,telegram,📲 电报消息,no-resolve
|
||||
|
||||
@@ -10,7 +10,7 @@ tags: [Clash, mihomo, 进阶, DNS, DNS 泄露]
|
||||
{: .prompt-tip }
|
||||
1. 此方案彻底防止了 DNS 泄露(未知域名在匹配 `RULE-SET:cnip` 规则时会由国外 DNS 解析且配置 `ecs`,解析出 IP 在国内则走 `国内 IP` 规则,否则走 `漏网之鱼` 规则),兼容性高,可放心使用
|
||||
2. 本教程以 [ShellCrash](https://github.com/juewuy/ShellCrash) 为例,其它客户端亦可参考
|
||||
3. 本教程搭载 [mihomo 内核 Meta 版](https://github.com/MetaCubeX/mihomo/tree/Meta)(导入内核方法可参考《[ShellCrash 和 AdGuard Home 快速安装教程/导入 mihomo 内核 或 sing-box 内核](https://proxy-tutorials.dustinwin.us.kg/posts/pin-toolsinstall/#%E4%BA%8C-%E5%AF%BC%E5%85%A5-mihomo-%E5%86%85%E6%A0%B8-%E6%88%96-sing-box-%E5%86%85%E6%A0%B8)》)
|
||||
3. 本教程搭载 [mihomo 内核 Meta 版](https://github.com/MetaCubeX/mihomo/tree/Meta)(导入内核方法可参考《[ShellCrash 和 AdGuard Home 快速安装教程/导入 mihomo 内核 或 sing-box 内核](https://proxy-tutorials.dustinwin.cc.cd/posts/pin-toolsinstall/#%E4%BA%8C-%E5%AF%BC%E5%85%A5-mihomo-%E5%86%85%E6%A0%B8-%E6%88%96-sing-box-%E5%86%85%E6%A0%B8)》)
|
||||
4. 可进入 <https://ipleak.net> 测试 DNS 是否泄露,“DNS Addresses” 栏目下没有中国国旗(因 `ipleak.net` 属未知域名,默认走 `漏网之鱼` 规则),即代表 DNS 没有发生泄露
|
||||
|
||||
## 一、 导入规则集合文件
|
||||
@@ -95,7 +95,7 @@ dns:
|
||||
|
||||
### 2. DNS 模式为 `fake-ip`(不推荐)
|
||||
- ① 额外编辑配置文件
|
||||
在《[生成带有自定义策略组和规则的 mihomo 配置文件直链-ruleset 方案/添加模板](https://proxy-tutorials.dustinwin.us.kg/posts/link-mihomo-ruleset/#%E4%BA%8C-%E6%B7%BB%E5%8A%A0%E6%A8%A1%E6%9D%BF)》编辑 .yaml 配置文件时,将 `rules` 里所有 IP 相关的规则末尾加上 `no-resolve`,即修改为:
|
||||
在《[生成带有自定义策略组和规则的 mihomo 配置文件直链-ruleset 方案/添加模板](https://proxy-tutorials.dustinwin.cc.cd/posts/link-mihomo-ruleset/#%E4%BA%8C-%E6%B7%BB%E5%8A%A0%E6%A8%A1%E6%9D%BF)》编辑 .yaml 配置文件时,将 `rules` 里所有 IP 相关的规则末尾加上 `no-resolve`,即修改为:
|
||||
|
||||
```yaml
|
||||
- RULE-SET,telegramip,📲 电报消息,no-resolve
|
||||
|
||||
@@ -312,4 +312,4 @@ rules:
|
||||
1. 进入 ShellCrash 配置脚本 → a) 添加提供者 → 1) 设置名称或代号,如输入“mihomo”;后进入 2) 设置链接或路径,粘贴最终生成的订阅链接,选择“a) 保存此提供者”
|
||||
2. 进入 6) 配置文件管理 → 6) 配置文件管理 → c) 在线生成配置文件 → 6) 自定义浏览器 UA,选择“2) 不使用 UA”
|
||||
3. 进入 6) 配置文件管理 → 1) mihomo,选择“e) 在线获取此配置文件”即可
|
||||
4. 具体设置请参考《[ShellCrash 搭载 mihomo 内核的配置-geodata 方案](https://proxy-tutorials.dustinwin.us.kg/posts/toolsettings-shellcrash-mihomo-geodata)》
|
||||
4. 具体设置请参考《[ShellCrash 搭载 mihomo 内核的配置-geodata 方案](https://proxy-tutorials.dustinwin.cc.cd/posts/toolsettings-shellcrash-mihomo-geodata)》
|
||||
|
||||
@@ -567,4 +567,4 @@ rules:
|
||||
1. 进入 ShellCrash 配置脚本 → a) 添加提供者 → 1) 设置名称或代号,如输入 `mihomo`;后进入 2) 设置链接或路径,粘贴最终生成的订阅链接,选择“a) 保存此提供者”
|
||||
2. 进入 6) 配置文件管理 → 6) 配置文件管理 → c) 在线生成配置文件 → 6) 自定义浏览器 UA,选择“2) 不使用 UA”
|
||||
3. 进入 6) 配置文件管理 → 1) mihomo,选择“e) 在线获取此配置文件”即可
|
||||
4. 具体设置请参考《[ShellCrash 搭载 mihomo 内核的配置-ruleset 方案](https://proxy-tutorials.dustinwin.us.kg/posts/toolsettings-shellcrash-mihomo-ruleset)》
|
||||
4. 具体设置请参考《[ShellCrash 搭载 mihomo 内核的配置-ruleset 方案](https://proxy-tutorials.dustinwin.cc.cd/posts/toolsettings-shellcrash-mihomo-ruleset)》
|
||||
|
||||
@@ -14,8 +14,8 @@ pin: true
|
||||
3. 安装 [mihomo 内核](https://github.com/MetaCubeX/mihomo)和 AdGuard Home 时须注意路由器 CPU 架构,查看 CPU 架构可连接 SSH 后执行命令 `uname -ms`,若执行结果是“linux aarch64”,就下载 arm64 版安装包;若是其它架构请下载相匹配的安装包
|
||||
4. ShellCrash 和 AdGuard Home 中所有没有提到的配置保持默认即可
|
||||
5. 使用本教程时,不建议启用 ShellCrash 配置脚本 → 2) 功能设置 → 3) 透明路由流量过滤 → 2) 过滤局域网设备,因不经过内核的设备在访问 `漏网之鱼` 域名时会遇到无法访问的情况
|
||||
6. ShellCrash 和 AdGuard Home 快速安装方法请看《[ShellCrash 和 AdGuard Home 快速安装教程](https://proxy-tutorials.dustinwin.us.kg/posts/pin-toolsinstall)》
|
||||
7. ShellCrash 单独使用时设置 DNS 分流请看《[搭载 mihomo 内核进行 DNS 分流教程-geodata 方案](https://proxy-tutorials.dustinwin.us.kg/posts/dnsbypass-mihomo-geodata)》或《[搭载 mihomo 内核进行 DNS 分流教程-ruleset 方案](https://proxy-tutorials.dustinwin.us.kg/posts/dnsbypass-mihomo-ruleset)》
|
||||
6. ShellCrash 和 AdGuard Home 快速安装方法请看《[ShellCrash 和 AdGuard Home 快速安装教程](https://proxy-tutorials.dustinwin.cc.cd/posts/pin-toolsinstall)》
|
||||
7. ShellCrash 单独使用时设置 DNS 分流请看《[搭载 mihomo 内核进行 DNS 分流教程-geodata 方案](https://proxy-tutorials.dustinwin.cc.cd/posts/dnsbypass-mihomo-geodata)》或《[搭载 mihomo 内核进行 DNS 分流教程-ruleset 方案](https://proxy-tutorials.dustinwin.cc.cd/posts/dnsbypass-mihomo-ruleset)》
|
||||
|
||||
## 一、 资源下载
|
||||
打包下载:<https://dustinwinvip.lanzoum.com/b01qd6p3a>
|
||||
@@ -64,18 +64,18 @@ pin: true
|
||||
- ➋ 点击“添加”
|
||||
<img src="/assets/img/pin/add-windows-openssh-2.png" alt="启用 OpenSSH 服务器 2" width="60%" />
|
||||
|
||||
> 在成功完成《[三、 2](https://proxy-tutorials.dustinwin.us.kg/posts/pin-shellcrashadguardhome-mihomo/#2-%E6%B0%B8%E4%B9%85%E5%BC%80%E5%90%AF-telnet)》后才能进行此操作
|
||||
> 在成功完成《[三、 2](https://proxy-tutorials.dustinwin.cc.cd/posts/pin-shellcrashadguardhome-mihomo/#2-%E6%B0%B8%E4%B9%85%E5%BC%80%E5%90%AF-telnet)》后才能进行此操作
|
||||
{: .prompt-warning }
|
||||
- ③ 连接 Telnet
|
||||
- ➊ 以管理员身份运行 PowerShell 或 CMD,执行命令 `telnet 192.168.31.1`
|
||||
- 注:首次登录不需要用户名和密码,解锁或恢复 SSH 后用户名为 `root`,密码为《[三、 3](https://proxy-tutorials.dustinwin.us.kg/posts/pin-shellcrashadguardhome-mihomo/#3-%E6%B0%B8%E4%B9%85%E5%BC%80%E5%90%AF%E5%B9%B6%E5%9B%BA%E5%8C%96-ssh)》中设置的登录密码
|
||||
- 注:首次登录不需要用户名和密码,解锁或恢复 SSH 后用户名为 `root`,密码为《[三、 3](https://proxy-tutorials.dustinwin.cc.cd/posts/pin-shellcrashadguardhome-mihomo/#3-%E6%B0%B8%E4%B9%85%E5%BC%80%E5%90%AF%E5%B9%B6%E5%9B%BA%E5%8C%96-ssh)》中设置的登录密码
|
||||
|
||||
<img src="/assets/img/pin/connect-telnet-windows-1.png" alt="连接 Telnet 1" width="60%" />
|
||||
|
||||
- ➋ 输入密码 `12345678`(输入时密码不可见,下同)并回车,显示“ARE U OK”表示成功连接 Telnet
|
||||
<img src="/assets/img/pin/connect-telnet-windows-2.png" alt="连接 Telnet 2" width="60%" />
|
||||
|
||||
> 在成功完成《[三、 3](https://proxy-tutorials.dustinwin.us.kg/posts/pin-shellcrashadguardhome-mihomo/#3-%E6%B0%B8%E4%B9%85%E5%BC%80%E5%90%AF%E5%B9%B6%E5%9B%BA%E5%8C%96-ssh)》后才能进行此操作
|
||||
> 在成功完成《[三、 3](https://proxy-tutorials.dustinwin.cc.cd/posts/pin-shellcrashadguardhome-mihomo/#3-%E6%B0%B8%E4%B9%85%E5%BC%80%E5%90%AF%E5%B9%B6%E5%9B%BA%E5%8C%96-ssh)》后才能进行此操作
|
||||
{: .prompt-warning }
|
||||
- ④ 连接 SSH
|
||||
- ➊ 以管理员身份运行 PowerShell 或 CMD,执行命令 `ssh -oHostKeyAlgorithms=+ssh-rsa [email protected]` 以允许 SSH 客户端接受“ssh-rsa”密钥,输入 `yes` 并回车
|
||||
@@ -90,7 +90,7 @@ pin: true
|
||||
<img src="/assets/img/pin/connect-ssh-windows-3.png" alt="连接 SSH 3" width="60%" />
|
||||
|
||||
### 2. 通过 SSH 工具添加 SSH 支持(任选一)
|
||||
> 在成功完成《[三、 2](https://proxy-tutorials.dustinwin.us.kg/posts/pin-shellcrashadguardhome-mihomo/#2-%E6%B0%B8%E4%B9%85%E5%BC%80%E5%90%AF-telnet)》后才能进行此操作
|
||||
> 在成功完成《[三、 2](https://proxy-tutorials.dustinwin.cc.cd/posts/pin-shellcrashadguardhome-mihomo/#2-%E6%B0%B8%E4%B9%85%E5%BC%80%E5%90%AF-telnet)》后才能进行此操作
|
||||
{: .prompt-warning }
|
||||
- ① 连接 Telnet
|
||||
- ➊ 安装 PuTTY 并打开,按图输入和选择,点击“Open”即可成功连接 Telnet
|
||||
@@ -99,7 +99,7 @@ pin: true
|
||||
- ➋ 显示“ARE U OK”表示成功登录 Telnet
|
||||
<img src="/assets/img/pin/connect-telnet-2.png" alt="连接和添加 Telnet 2" width="60%" />
|
||||
|
||||
> 在成功完成《[三、 3](https://proxy-tutorials.dustinwin.us.kg/posts/pin-shellcrashadguardhome-mihomo/#3-%E6%B0%B8%E4%B9%85%E5%BC%80%E5%90%AF%E5%B9%B6%E5%9B%BA%E5%8C%96-ssh)》后才能进行此操作
|
||||
> 在成功完成《[三、 3](https://proxy-tutorials.dustinwin.cc.cd/posts/pin-shellcrashadguardhome-mihomo/#3-%E6%B0%B8%E4%B9%85%E5%BC%80%E5%90%AF%E5%B9%B6%E5%9B%BA%E5%8C%96-ssh)》后才能进行此操作
|
||||
{: .prompt-warning }
|
||||
- ② 连接 SSH
|
||||
- ➊ 打开 PuTTY,然后按图输入,点击“Open”即可成功连接 SSH
|
||||
@@ -109,7 +109,7 @@ pin: true
|
||||
<img src="/assets/img/pin/connect-ssh-2.png" alt="连接和添加 SSH 2" width="60%" />
|
||||
|
||||
### 3. 通过 WinSCP 连接路由器文件管理
|
||||
> 在成功完成《[三、 3](https://proxy-tutorials.dustinwin.us.kg/posts/pin-shellcrashadguardhome-mihomo/#3-%E6%B0%B8%E4%B9%85%E5%BC%80%E5%90%AF%E5%B9%B6%E5%9B%BA%E5%8C%96-ssh)》后才能进行此操作
|
||||
> 在成功完成《[三、 3](https://proxy-tutorials.dustinwin.cc.cd/posts/pin-shellcrashadguardhome-mihomo/#3-%E6%B0%B8%E4%B9%85%E5%BC%80%E5%90%AF%E5%B9%B6%E5%9B%BA%E5%8C%96-ssh)》后才能进行此操作
|
||||
{: .prompt-warning }
|
||||
|
||||
- ① 安装 WinSCP 并打开,“文件协议”选择“SCP”,其它按图输入,“密码”为 SSH 登录密码,点击“保存”后再点击“登录”
|
||||
@@ -280,13 +280,13 @@ echo -e '12345678\n12345678' | passwd root
|
||||
- 注:使用“Tun 模式”前须进入主菜单 → 8) 工具与优化,启用“8) 小米设备 Tun 模块修复”
|
||||
|
||||
- ➋ 进入 2) 功能设置 → 2) DNS 设置(推荐“MIX 模式”)
|
||||
- ➌ 进入 2) DNS 设置 → 7) DNS 劫持端口,设置为“5353”(须完成《[六、 1](https://proxy-tutorials.dustinwin.us.kg/posts/pin-shellcrashadguardhome-mihomo/#1-adguard-home-%E5%AE%89%E8%A3%85)》后才可设置)
|
||||
- ➌ 进入 2) DNS 设置 → 7) DNS 劫持端口,设置为“5353”(须完成《[六、 1](https://proxy-tutorials.dustinwin.cc.cd/posts/pin-shellcrashadguardhome-mihomo/#1-adguard-home-%E5%AE%89%E8%A3%85)》后才可设置)
|
||||
- ➍ 进入 2) DNS 设置 → 9) 修改 DNS 服务器,选择“4) 一键配置加密 DNS”
|
||||
- 注:推荐设置 DNS 分流(单独使用 ShellCrash 以及 ShellCrash 搭配 AdGuard Home 都适用),请看《[搭载 mihomo 内核进行 DNS 分流教程-geodata 方案](https://proxy-tutorials.dustinwin.us.kg/posts/dnsbypass-mihomo-geodata)》或《[搭载 mihomo 内核进行 DNS 分流教程-ruleset 方案](https://proxy-tutorials.dustinwin.us.kg/posts/dnsbypass-mihomo-ruleset)》
|
||||
- 注:推荐设置 DNS 分流(单独使用 ShellCrash 以及 ShellCrash 搭配 AdGuard Home 都适用),请看《[搭载 mihomo 内核进行 DNS 分流教程-geodata 方案](https://proxy-tutorials.dustinwin.cc.cd/posts/dnsbypass-mihomo-geodata)》或《[搭载 mihomo 内核进行 DNS 分流教程-ruleset 方案](https://proxy-tutorials.dustinwin.cc.cd/posts/dnsbypass-mihomo-ruleset)》
|
||||
|
||||
- ➎ 进入 2) 功能设置 → 5) 启用域名嗅探,选择“1) 是”
|
||||
|
||||
- ④ 进入主菜单 → 4 启动设置,启用“1) 开机自启动”(若重启路由器后服务没有自动运行,可进入 3) 设置自启延时,设置为“30”秒,然后在《[六、 1. ⑥](https://proxy-tutorials.dustinwin.us.kg//posts/pin-shellcrashadguardhome-mihomo/#1-adguard-home-%E5%AE%89%E8%A3%85)》,将 `sleep 10s` 改为 `sleep 40s`)
|
||||
- ④ 进入主菜单 → 4 启动设置,启用“1) 开机自启动”(若重启路由器后服务没有自动运行,可进入 3) 设置自启延时,设置为“30”秒,然后在《[六、 1. ⑥](https://proxy-tutorials.dustinwin.cc.cd//posts/pin-shellcrashadguardhome-mihomo/#1-adguard-home-%E5%AE%89%E8%A3%85)》,将 `sleep 10s` 改为 `sleep 40s`)
|
||||
- ⑤ 进入主菜单 → 5) 自动任务 → 1) 添加自动任务,输入对应的数字并回车后可设置执行条件
|
||||
- ⑥ 进入主菜单 → 8) 工具与优化,选择“6) 小米设备软固化 SSH”(无需输入需要还原的 SSH 密码)
|
||||
- ⑦ 进入主菜单 → 9) 更新与支持 → 4) 安装/更新本地 Dashboard 面板,推荐安装“1) 安装 zashboard 面板”
|
||||
@@ -299,7 +299,7 @@ echo -e '12345678\n12345678' | passwd root
|
||||
- ⑧ 导入配置文件
|
||||
- ➊ 进入主菜单 → 6) 配置文件管理 → a) 添加提供者 → 1) 设置名称或代号,如输入“mihomo”;后进入 2) 设置链接或路径,粘贴你的订阅链接,选择“a) 保存此提供者”
|
||||
- ➋ 进入 6) 配置文件管理 → c) 在线生成配置文件 → 6) 自定义浏览器 UA,根据需要设置 UA(此处选择“2) 不使用 UA”)
|
||||
- ➌ 进入 6) 配置文件管理 → 1) mihomo,根据需要选择“b) 本地生成仅包含此提供者的配置文件”或“c) 在线生成仅包含此提供者的配置文件”;选择“e) 在线获取此配置文件”需要一定的 mihomo 知识储备,请查看《[生成带有自定义策略组和规则的 mihomo 配置文件直链-geodata 方案](https://proxy-tutorials.dustinwin.us.kg/posts/link-mihomo-geodata)》或《[生成带有自定义策略组和规则的 mihomo 配置文件直链-ruleset 方案](https://proxy-tutorials.dustinwin.us.kg/posts/link-mihomo-ruleset)》
|
||||
- ➌ 进入 6) 配置文件管理 → 1) mihomo,根据需要选择“b) 本地生成仅包含此提供者的配置文件”或“c) 在线生成仅包含此提供者的配置文件”;选择“e) 在线获取此配置文件”需要一定的 mihomo 知识储备,请查看《[生成带有自定义策略组和规则的 mihomo 配置文件直链-geodata 方案](https://proxy-tutorials.dustinwin.cc.cd/posts/link-mihomo-geodata)》或《[生成带有自定义策略组和规则的 mihomo 配置文件直链-ruleset 方案](https://proxy-tutorials.dustinwin.cc.cd/posts/link-mihomo-ruleset)》
|
||||
|
||||
导入配置文件完成后,选择 1 启动/重启服务
|
||||
|
||||
@@ -434,12 +434,12 @@ echo -e '12345678\n12345678' | passwd root
|
||||
|
||||
### 3. AdGuard Home 升级
|
||||
为了节约路由器内存,请按照如下步骤进行操作:
|
||||
- ① 执行《[六、 1. ① ② ③ ④(替换)](https://proxy-tutorials.dustinwin.us.kg//posts/pin-shellcrashadguardhome-mihomo/#1-adguard-home-%E5%AE%89%E8%A3%85)》的操作步骤
|
||||
- ① 执行《[六、 1. ① ② ③ ④(替换)](https://proxy-tutorials.dustinwin.cc.cd//posts/pin-shellcrashadguardhome-mihomo/#1-adguard-home-%E5%AE%89%E8%A3%85)》的操作步骤
|
||||
- ② 连接 SSH 后执行命令 `/data/AdGuardHome/AdGuardHome -s restart`
|
||||
|
||||
### 4. AdGuard Home 卸载
|
||||
- ① 删除开机启动项
|
||||
执行《[六、 1. ⑥](https://proxy-tutorials.dustinwin.us.kg//posts/pin-shellcrashadguardhome-mihomo/#1-adguard-home-%E5%AE%89%E8%A3%85)》的操作步骤,删除添加的内容:
|
||||
执行《[六、 1. ⑥](https://proxy-tutorials.dustinwin.cc.cd//posts/pin-shellcrashadguardhome-mihomo/#1-adguard-home-%E5%AE%89%E8%A3%85)》的操作步骤,删除添加的内容:
|
||||
|
||||
```shell
|
||||
sleep 10s
|
||||
|
||||
@@ -14,7 +14,7 @@ pin: true
|
||||
3. 安装 [sing-box reF1nd 版内核](https://github.com/reF1nd/sing-box) 内核和 AdGuard Home 时须注意路由器 CPU 架构,查看 CPU 架构可连接 SSH 后执行命令 `uname -ms`,若执行结果是“linux aarch64”,就下载 arm64 版安装包;若是其它架构请下载相匹配的安装包
|
||||
4. ShellCrash 和 AdGuard Home 中所有没有提到的配置保持默认即可
|
||||
5. 使用本教程时,不建议启用 ShellCrash 配置脚本 → 2) 功能设置 → 3) 透明路由流量过滤 → 2) 过滤局域网设备,因不经过内核的设备在访问 `漏网之鱼` 域名时会遇到无法访问的情况
|
||||
6. ShellCrash 和 AdGuard Home 快速安装方法请看《[ShellCrash 和 AdGuard Home 快速安装教程](https://proxy-tutorials.dustinwin.us.kg/posts/pin-toolsinstall)》
|
||||
6. ShellCrash 和 AdGuard Home 快速安装方法请看《[ShellCrash 和 AdGuard Home 快速安装教程](https://proxy-tutorials.dustinwin.cc.cd/posts/pin-toolsinstall)》
|
||||
|
||||
## 一、 资源下载
|
||||
打包下载:<https://dustinwinvip.lanzoum.com/b01qd6p3a>
|
||||
@@ -63,18 +63,18 @@ pin: true
|
||||
- ➋ 点击“添加”
|
||||
<img src="/assets/img/pin/add-windows-openssh-2.png" alt="启用 OpenSSH 服务器 2" width="60%" />
|
||||
|
||||
> 在成功完成《[三、 2](https://proxy-tutorials.dustinwin.us.kg/posts/pin-shellcrashadguardhome-singboxr/#2-%E6%B0%B8%E4%B9%85%E5%BC%80%E5%90%AF-telnet)》后才能进行此操作
|
||||
> 在成功完成《[三、 2](https://proxy-tutorials.dustinwin.cc.cd/posts/pin-shellcrashadguardhome-singboxr/#2-%E6%B0%B8%E4%B9%85%E5%BC%80%E5%90%AF-telnet)》后才能进行此操作
|
||||
{: .prompt-warning }
|
||||
- ③ 连接 Telnet
|
||||
- ➊ 以管理员身份运行 PowerShell 或 CMD,执行命令 `telnet 192.168.31.1`
|
||||
- 注:首次登录不需要用户名和密码,解锁或恢复 SSH 后用户名为 `root`,密码为《[三、 3](https://proxy-tutorials.dustinwin.us.kg/posts/pin-shellcrashadguardhome-singboxr/#3-%E6%B0%B8%E4%B9%85%E5%BC%80%E5%90%AF%E5%B9%B6%E5%9B%BA%E5%8C%96-ssh)》中设置的登录密码
|
||||
- 注:首次登录不需要用户名和密码,解锁或恢复 SSH 后用户名为 `root`,密码为《[三、 3](https://proxy-tutorials.dustinwin.cc.cd/posts/pin-shellcrashadguardhome-singboxr/#3-%E6%B0%B8%E4%B9%85%E5%BC%80%E5%90%AF%E5%B9%B6%E5%9B%BA%E5%8C%96-ssh)》中设置的登录密码
|
||||
|
||||
<img src="/assets/img/pin/connect-telnet-windows-1.png" alt="连接 Telnet 1" width="60%" />
|
||||
|
||||
- ➋ 输入密码 `12345678`(输入时密码不可见,下同)并回车,显示“ARE U OK”表示成功连接 Telnet
|
||||
<img src="/assets/img/pin/connect-telnet-windows-2.png" alt="连接 Telnet 2" width="60%" />
|
||||
|
||||
> 在成功完成《[三、 3](https://proxy-tutorials.dustinwin.us.kg/posts/pin-shellcrashadguardhome-singboxr/#3-%E6%B0%B8%E4%B9%85%E5%BC%80%E5%90%AF%E5%B9%B6%E5%9B%BA%E5%8C%96-ssh)》后才能进行此操作
|
||||
> 在成功完成《[三、 3](https://proxy-tutorials.dustinwin.cc.cd/posts/pin-shellcrashadguardhome-singboxr/#3-%E6%B0%B8%E4%B9%85%E5%BC%80%E5%90%AF%E5%B9%B6%E5%9B%BA%E5%8C%96-ssh)》后才能进行此操作
|
||||
{: .prompt-warning }
|
||||
- ④ 连接 SSH
|
||||
- ➊ 以管理员身份运行 PowerShell 或 CMD,执行命令 `ssh -oHostKeyAlgorithms=+ssh-rsa [email protected]` 以允许 SSH 客户端接受“ssh-rsa”密钥,输入 `yes` 并回车
|
||||
@@ -89,7 +89,7 @@ pin: true
|
||||
<img src="/assets/img/pin/connect-ssh-windows-3.png" alt="连接 SSH 3" width="60%" />
|
||||
|
||||
### 2. 通过 SSH 工具添加 SSH 支持(任选一)
|
||||
> 在成功完成《[三、 2](https://proxy-tutorials.dustinwin.us.kg/posts/pin-shellcrashadguardhome-singboxr/#2-%E6%B0%B8%E4%B9%85%E5%BC%80%E5%90%AF-telnet)》后才能进行此操作
|
||||
> 在成功完成《[三、 2](https://proxy-tutorials.dustinwin.cc.cd/posts/pin-shellcrashadguardhome-singboxr/#2-%E6%B0%B8%E4%B9%85%E5%BC%80%E5%90%AF-telnet)》后才能进行此操作
|
||||
{: .prompt-warning }
|
||||
- ① 连接 Telnet
|
||||
- ➊ 安装 PuTTY 并打开,按图输入和选择,点击“Open”即可成功连接 Telnet
|
||||
@@ -98,7 +98,7 @@ pin: true
|
||||
- ➋ 显示“ARE U OK”表示成功登录 Telnet
|
||||
<img src="/assets/img/pin/connect-telnet-2.png" alt="连接和添加 Telnet 2" width="60%" />
|
||||
|
||||
> 在成功完成《[三、 3](https://proxy-tutorials.dustinwin.us.kg/posts/pin-shellcrashadguardhome-singboxr/#3-%E6%B0%B8%E4%B9%85%E5%BC%80%E5%90%AF%E5%B9%B6%E5%9B%BA%E5%8C%96-ssh)》后才能进行此操作
|
||||
> 在成功完成《[三、 3](https://proxy-tutorials.dustinwin.cc.cd/posts/pin-shellcrashadguardhome-singboxr/#3-%E6%B0%B8%E4%B9%85%E5%BC%80%E5%90%AF%E5%B9%B6%E5%9B%BA%E5%8C%96-ssh)》后才能进行此操作
|
||||
{: .prompt-warning }
|
||||
- ② 连接 SSH
|
||||
- ➊ 打开 PuTTY,然后按图输入,点击“Open”即可成功连接 SSH
|
||||
@@ -108,7 +108,7 @@ pin: true
|
||||
<img src="/assets/img/pin/connect-ssh-2.png" alt="连接和添加 SSH 2" width="60%" />
|
||||
|
||||
### 3. 通过 WinSCP 连接路由器文件管理
|
||||
> 在成功完成《[三、 3](https://proxy-tutorials.dustinwin.us.kg/posts/pin-shellcrashadguardhome-singboxr/#3-%E6%B0%B8%E4%B9%85%E5%BC%80%E5%90%AF%E5%B9%B6%E5%9B%BA%E5%8C%96-ssh)》后才能进行此操作
|
||||
> 在成功完成《[三、 3](https://proxy-tutorials.dustinwin.cc.cd/posts/pin-shellcrashadguardhome-singboxr/#3-%E6%B0%B8%E4%B9%85%E5%BC%80%E5%90%AF%E5%B9%B6%E5%9B%BA%E5%8C%96-ssh)》后才能进行此操作
|
||||
{: .prompt-warning }
|
||||
- ① 安装 WinSCP 并打开,“文件协议”选择“SCP”,其它按图输入,“密码”为 SSH 登录密码,点击“保存”后再点击“登录”
|
||||
<img src="/assets/img/pin/login-winscp.png" alt="通过 WinSCP 连接路由器文件管理 1" width="60%" />
|
||||
@@ -277,11 +277,11 @@ echo -e '12345678\n12345678' | passwd root
|
||||
- 注:使用“Tun 模式”前须进入主菜单 → 8) 工具与优化,启用“8) 小米设备 Tun 模块修复”
|
||||
|
||||
- ➋ 进入 2) 功能设置 → 2) DNS 设置(推荐“MIX 模式”)
|
||||
- ➌ 进入 2) DNS 设置 → 7) DNS 劫持端口,设置为“5353”(须完成《[六、 1](https://proxy-tutorials.dustinwin.us.kg/posts/pin-shellcrashadguardhome-singboxr/#1-adguard-home-%E5%AE%89%E8%A3%85)》后才可设置)
|
||||
- ➌ 进入 2) DNS 设置 → 7) DNS 劫持端口,设置为“5353”(须完成《[六、 1](https://proxy-tutorials.dustinwin.cc.cd/posts/pin-shellcrashadguardhome-singboxr/#1-adguard-home-%E5%AE%89%E8%A3%85)》后才可设置)
|
||||
- ➍ 进入 2) DNS 设置 → 9) 修改 DNS 服务器,选择“4) 一键配置加密 DNS”
|
||||
- 注:推荐设置 DNS 分流(单独使用 ShellCrash 以及 ShellCrash 搭配 AdGuard Home 都适用),请看《[搭载 sing-boxr 内核进行 DNS 分流教程-ruleset 方案](https://proxy-tutorials.dustinwin.us.kg/posts/dnsbypass-singboxr-ruleset)》
|
||||
- 注:推荐设置 DNS 分流(单独使用 ShellCrash 以及 ShellCrash 搭配 AdGuard Home 都适用),请看《[搭载 sing-boxr 内核进行 DNS 分流教程-ruleset 方案](https://proxy-tutorials.dustinwin.cc.cd/posts/dnsbypass-singboxr-ruleset)》
|
||||
|
||||
- ④ 进入主菜单 → 4 启动设置,启用“1) 开机自启动”(若重启路由器后服务没有自动运行,可进入 3) 设置自启延时,设置为“30”秒,然后在《[六、 1. ⑥](https://proxy-tutorials.dustinwin.us.kg//posts/pin-shellcrashadguardhome-mihomo/#1-adguard-home-%E5%AE%89%E8%A3%85)》,将 `sleep 10s` 改为 `sleep 40s`)
|
||||
- ④ 进入主菜单 → 4 启动设置,启用“1) 开机自启动”(若重启路由器后服务没有自动运行,可进入 3) 设置自启延时,设置为“30”秒,然后在《[六、 1. ⑥](https://proxy-tutorials.dustinwin.cc.cd//posts/pin-shellcrashadguardhome-mihomo/#1-adguard-home-%E5%AE%89%E8%A3%85)》,将 `sleep 10s` 改为 `sleep 40s`)
|
||||
- ⑤ 进入主菜单 → 5) 自动任务 → 1) 添加自动任务,输入对应的数字并回车后可设置执行条件
|
||||
- ⑥ 进入主菜单 → 8) 工具与优化,选择“6) 小米设备软固化 SSH”(无需输入需要还原的 SSH 密码)
|
||||
- ⑦ 进入主菜单 → 9) 更新与支持 → 4) 安装/更新本地 Dashboard 面板,推荐安装“1) 安装 zashboard 面板”
|
||||
@@ -294,7 +294,7 @@ echo -e '12345678\n12345678' | passwd root
|
||||
- ⑧ 导入配置文件
|
||||
- ➊ 进入主菜单 → 6) 配置文件管理 → a) 添加提供者 → 1) 设置名称或代号,如输入“sing-boxr”;后进入 2) 设置链接或路径,粘贴你的订阅链接,选择“a) 保存此提供者”
|
||||
- ➋ 进入 6) 配置文件管理 → c) 在线生成配置文件 → 6) 自定义浏览器 UA,根据需要设置 UA(此处选择“2) 不使用 UA”)
|
||||
- ➌ 进入 6) 配置文件管理 → 1) sing-boxr,根据需要选择“b) 本地生成仅包含此提供者的配置文件”或“c) 在线生成仅包含此提供者的配置文件”;选择“e) 在线获取此配置文件”需要一定的 sing-boxr 知识储备,请查看《[生成带有自定义出站和规则的 sing-boxr 配置文件直链-ruleset 方案](https://proxy-tutorials.dustinwin.us.kg/posts/link-singboxr-ruleset/)》
|
||||
- ➌ 进入 6) 配置文件管理 → 1) sing-boxr,根据需要选择“b) 本地生成仅包含此提供者的配置文件”或“c) 在线生成仅包含此提供者的配置文件”;选择“e) 在线获取此配置文件”需要一定的 sing-boxr 知识储备,请查看《[生成带有自定义出站和规则的 sing-boxr 配置文件直链-ruleset 方案](https://proxy-tutorials.dustinwin.cc.cd/posts/link-singboxr-ruleset/)》
|
||||
|
||||
导入配置文件完成后,选择 1 启动/重启服务
|
||||
|
||||
@@ -429,12 +429,12 @@ echo -e '12345678\n12345678' | passwd root
|
||||
|
||||
### 3. AdGuard Home 升级
|
||||
为了节约路由器内存,请按照如下步骤进行操作:
|
||||
- ① 执行《[六、 1. ① ② ③ ④(替换)](https://proxy-tutorials.dustinwin.us.kg//posts/pin-shellcrashadguardhome-singboxr/#1-adguard-home-%E5%AE%89%E8%A3%85)》的操作步骤
|
||||
- ① 执行《[六、 1. ① ② ③ ④(替换)](https://proxy-tutorials.dustinwin.cc.cd//posts/pin-shellcrashadguardhome-singboxr/#1-adguard-home-%E5%AE%89%E8%A3%85)》的操作步骤
|
||||
- ② 连接 SSH 后执行命令 `/data/AdGuardHome/AdGuardHome -s restart`
|
||||
|
||||
### 4. AdGuard Home 卸载
|
||||
- ① 删除开机启动项
|
||||
执行《[六、 1. ⑥](https://proxy-tutorials.dustinwin.us.kg//posts/pin-shellcrashadguardhome-singboxr/#1-adguard-home-%E5%AE%89%E8%A3%85)》的操作步骤,删除添加的内容:
|
||||
执行《[六、 1. ⑥](https://proxy-tutorials.dustinwin.cc.cd//posts/pin-shellcrashadguardhome-singboxr/#1-adguard-home-%E5%AE%89%E8%A3%85)》的操作步骤,删除添加的内容:
|
||||
|
||||
```shell
|
||||
sleep 10s
|
||||
|
||||
@@ -12,7 +12,7 @@ pin: true
|
||||
1. 本教程中 **[AdGuard Home](https://github.com/AdguardTeam/AdGuardHome) 安装目录为 `/data/AdGuardHome`{: .filepath}**
|
||||
2. 本教程中的下载链接以 CPU 架构 ARM64 为例,请注意修改链接后缀
|
||||
3. 查看 CPU 架构可连接 SSH 后执行命令 `uname -ms`,若执行结果是“linux aarch64”,就是搭载的 ARM64 架构
|
||||
4. 以下所有命令均可全部复制后直接粘贴执行(若出现无法下载的情况,可更换[下载源](https://proxy-tutorials.dustinwin.us.kg/about/#%E5%AF%B9%E4%B8%8B%E8%BD%BD%E6%BA%90%E7%9A%84%E8%AF%B4%E6%98%8E))
|
||||
4. 以下所有命令均可全部复制后直接粘贴执行(若出现无法下载的情况,可更换[下载源](https://proxy-tutorials.dustinwin.cc.cd/about/#%E5%AF%B9%E4%B8%8B%E8%BD%BD%E6%BA%90%E7%9A%84%E8%AF%B4%E6%98%8E))
|
||||
|
||||
## 一、 安装 [ShellCrash](https://github.com/juewuy/ShellCrash)
|
||||
### 1. 本地安装
|
||||
|
||||
@@ -12,7 +12,7 @@ pin: true
|
||||
1. 本教程中 **[AdGuard Home](https://github.com/AdguardTeam/AdGuardHome) 安装目录为 `/data/AdGuardHome`{: .filepath}**
|
||||
2. 本教程中的下载链接以 CPU 架构 ARM64 为例,请注意修改链接后缀
|
||||
3. 查看 CPU 架构可连接 SSH 后执行命令 `uname -ms`,若执行结果是“linux aarch64”,就是搭载的 ARM64 架构
|
||||
4. 以下所有命令均可全部复制后直接粘贴执行(若出现无法下载的情况,可更换[下载源](https://proxy-tutorials.dustinwin.us.kg/about/#%E5%AF%B9%E4%B8%8B%E8%BD%BD%E6%BA%90%E7%9A%84%E8%AF%B4%E6%98%8E))
|
||||
4. 以下所有命令均可全部复制后直接粘贴执行(若出现无法下载的情况,可更换[下载源](https://proxy-tutorials.dustinwin.cc.cd/about/#%E5%AF%B9%E4%B8%8B%E8%BD%BD%E6%BA%90%E7%9A%84%E8%AF%B4%E6%98%8E))
|
||||
|
||||
## 一、 安装 [ShellCrash](https://github.com/juewuy/ShellCrash)
|
||||
### 1. 本地安装
|
||||
|
||||
@@ -11,7 +11,7 @@ tags: [Clash, Clash Mi, mihomo, Android, ruleset, rule-set, 分享]
|
||||
请根据自身情况进行修改,**适合自己的方案才是最好的方案**,如无特殊需求,可以照搬
|
||||
|
||||
## 一、 生成配置文件 .yaml 文件直链
|
||||
具体方法请参考《[生成带有自定义策略组和规则的 mihomo 配置文件直链-ruleset 方案](https://proxy-tutorials.dustinwin.us.kg/posts/link-mihomo-ruleset)》,贴一下我使用的配置:
|
||||
具体方法请参考《[生成带有自定义策略组和规则的 mihomo 配置文件直链-ruleset 方案](https://proxy-tutorials.dustinwin.cc.cd/posts/link-mihomo-ruleset)》,贴一下我使用的配置:
|
||||
|
||||
```yaml
|
||||
proxy-providers:
|
||||
@@ -290,7 +290,7 @@ rules:
|
||||
{: .prompt-tip }
|
||||
|
||||
注:
|
||||
- ① 本 `dns` 配置中,国内域名走国内 DNS 解析,国外域名走 `fake-ip`,未知域名也走 `fake-ip`,在匹配 `RULE-SET:cn` 规则时会由国外 DNS 解析且配置 `ecs` 提高了兼容性,解析出 IP 在国内则走 `国内 IP` 规则,否则走 `漏网之鱼` 规则(有效解决了“心理 DNS 泄露问题”,详见《[搭载 mihomo 内核配置 DNS 不泄露教程-ruleset 方案](https://proxy-tutorials.dustinwin.us.kg/posts/dnsnoleaks-mihomo-ruleset/)》)
|
||||
- ① 本 `dns` 配置中,国内域名走国内 DNS 解析,国外域名走 `fake-ip`,未知域名也走 `fake-ip`,在匹配 `RULE-SET:cn` 规则时会由国外 DNS 解析且配置 `ecs` 提高了兼容性,解析出 IP 在国内则走 `国内 IP` 规则,否则走 `漏网之鱼` 规则(有效解决了“心理 DNS 泄露问题”,详见《[搭载 mihomo 内核配置 DNS 不泄露教程-ruleset 方案](https://proxy-tutorials.dustinwin.cc.cd/posts/dnsnoleaks-mihomo-ruleset/)》)
|
||||
- ② 推荐将 `ecs` 设置为当前宽带运营商分配的默认 DNS(可进入光猫或路由器拨号页面查看,或者前往[公共 DNS 大全](https://toolb.cn/publicdns)查询)的 IP 段,如默认 DNS 为 `211.137.58.20`,可设置为 `211.137.58.0/24`
|
||||
|
||||
```yaml
|
||||
@@ -371,7 +371,7 @@ proxy-groups:
|
||||
```
|
||||
|
||||
## 二、 导入配置文件并启动
|
||||
1. 进入 [Clash Mi for Android](https://github.com/KaringX/clashmi) → “+”图标 → 添加配置链接,“配置链接/内容”输入《[一](https://proxy-tutorials.dustinwin.us.kg/posts/share-android-mihomo-ruleset/#%E4%B8%80-%E7%94%9F%E6%88%90%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6-yaml-%E6%96%87%E4%BB%B6%E7%9B%B4%E9%93%BE)》中生成的配置文件 .yaml 直链,点击“✓”
|
||||
1. 进入 [Clash Mi for Android](https://github.com/KaringX/clashmi) → “+”图标 → 添加配置链接,“配置链接/内容”输入《[一](https://proxy-tutorials.dustinwin.cc.cd/posts/share-android-mihomo-ruleset/#%E4%B8%80-%E7%94%9F%E6%88%90%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6-yaml-%E6%96%87%E4%BB%B6%E7%9B%B4%E9%93%BE)》中生成的配置文件 .yaml 直链,点击“✓”
|
||||
2. 待配置下载完成后返回到主界面,进入核心设置,关闭所有配置项的覆写功能
|
||||
3. 再次返回到主界面,点击“未连接”右边的灰色按钮即可启动服务
|
||||
4. 待服务启动成功后可直接点击“面板”来使用 [zashboard](https://github.com/Zephyruso/zashboard)
|
||||
|
||||
@@ -12,7 +12,7 @@ tags: [sing-box, sing-boxr, Android, ruleset, rule_set, 分享]
|
||||
2. 本教程搭载 [sing-box 内核 reF1nd-Testing 版](https://github.com/reF1nd/sing-box/tree/reF1nd-testing)(可前往 <https://github.com/reF1nd/sing-box-releases/releases> 下载“SFA-[version]-reF1nd-arm64-v8a.apk”文件进行安装)
|
||||
|
||||
## 一、 生成配置文件 .json 文件直链
|
||||
具体方法请参考《[生成带有自定义出站和规则的 sing-boxr 配置文件直链-ruleset 方案](https://proxy-tutorials.dustinwin.us.kg/posts/link-singboxr-ruleset)》,贴一下我使用的配置:
|
||||
具体方法请参考《[生成带有自定义出站和规则的 sing-boxr 配置文件直链-ruleset 方案](https://proxy-tutorials.dustinwin.cc.cd/posts/link-singboxr-ruleset)》,贴一下我使用的配置:
|
||||
- 注:推荐将 `client_subnet` 设置为当前宽带运营商分配的默认 DNS(可进入光猫或路由器拨号页面查看,或者前往[公共 DNS 大全](https://toolb.cn/publicdns)查询)的 IP 段,如默认 DNS 为 `211.137.58.20`,可设置为 `211.137.58.0/24`
|
||||
|
||||
```json
|
||||
@@ -290,7 +290,7 @@ tags: [sing-box, sing-boxr, Android, ruleset, rule_set, 分享]
|
||||
{: .prompt-tip }
|
||||
|
||||
注:
|
||||
- ① 本 `dns` 配置中,国内域名走国内 DNS 解析,国外域名走 `fakeip`,未知域名也走 `fakeip`,在匹配 `rule_set:cnip` 规则时会先由国外 DNS 解析且配置 `client_subnet` 提高了兼容性,解析出 IP 在国内则走 `国内 IP` 规则,否则走 `漏网之鱼` 规则(有效解决了“心理 DNS 泄露问题”,详见《[搭载 sing-boxr 内核配置 DNS 不泄露教程-ruleset 方案](https://proxy-tutorials.dustinwin.us.kg/posts/dnsnoleaks-singboxr-ruleset/)》)
|
||||
- ① 本 `dns` 配置中,国内域名走国内 DNS 解析,国外域名走 `fakeip`,未知域名也走 `fakeip`,在匹配 `rule_set:cnip` 规则时会先由国外 DNS 解析且配置 `client_subnet` 提高了兼容性,解析出 IP 在国内则走 `国内 IP` 规则,否则走 `漏网之鱼` 规则(有效解决了“心理 DNS 泄露问题”,详见《[搭载 sing-boxr 内核配置 DNS 不泄露教程-ruleset 方案](https://proxy-tutorials.dustinwin.cc.cd/posts/dnsnoleaks-singboxr-ruleset/)》)
|
||||
- ② 推荐将 `client_subnet` 设置为当前宽带运营商分配的默认 DNS(可进入光猫或路由器拨号页面查看,或者前往[公共 DNS 大全](https://toolb.cn/publicdns)查询)的 IP 段,如默认 DNS 为 `211.137.58.20`,可设置为 `211.137.58.0/24`
|
||||
|
||||
```json
|
||||
@@ -372,13 +372,13 @@ tags: [sing-box, sing-boxr, Android, ruleset, rule_set, 分享]
|
||||
```
|
||||
|
||||
## 二、 导入配置文件并启动 sing-boxr
|
||||
1. 进入 [sing-boxr for Android](https://github.com/DustinWin/proxy-tools/releases/tag/sing-box) → 仪表 → 新配置 → 手动创建,“类型”选择“远程”,在“URL”处粘贴《[一](https://proxy-tutorials.dustinwin.us.kg/posts/share-android-singboxr-ruleset/#%E4%B8%80-%E7%94%9F%E6%88%90%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6-json-%E6%96%87%E4%BB%B6%E7%9B%B4%E9%93%BE)》中生成的配置文件 .json 直链,“自动更新间隔”填写 `1440`,最后点击“创建”
|
||||
1. 进入 [sing-boxr for Android](https://github.com/DustinWin/proxy-tools/releases/tag/sing-box) → 仪表 → 新配置 → 手动创建,“类型”选择“远程”,在“URL”处粘贴《[一](https://proxy-tutorials.dustinwin.cc.cd/posts/share-android-singboxr-ruleset/#%E4%B8%80-%E7%94%9F%E6%88%90%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6-json-%E6%96%87%E4%BB%B6%E7%9B%B4%E9%93%BE)》中生成的配置文件 .json 直链,“自动更新间隔”填写 `1440`,最后点击“创建”
|
||||
2. 进入 sing-boxr for Android → 仪表,点击“▶️”图标即可启动 sing-boxr 服务
|
||||
- 注:首次启用可能会报错,重试几次即可
|
||||
|
||||
## 三、 访问 Dashboard 面板
|
||||
1. 打开 zashboard 在线面板地址 <http://board.zash.run.place> 可直接通过 [Clash API](https://sing-boxr.dustinwin.us.kg/zh/configuration/experimental/clash-api/) 的方式访问 Dashboard 面板
|
||||
2. 进入设置 → 后端设置,点击“+”图标,切换到“[sing-box API](https://sing-boxr.dustinwin.us.kg/zh/configuration/service/api/)”标签,将“端口”修改为 `9999` 并点击“提交”
|
||||
1. 打开 zashboard 在线面板地址 <http://board.zash.run.place> 可直接通过 [Clash API](https://sing-boxr.dustinwin.cc.cd/zh/configuration/experimental/clash-api/) 的方式访问 Dashboard 面板
|
||||
2. 进入设置 → 后端设置,点击“+”图标,切换到“[sing-box API](https://sing-boxr.dustinwin.cc.cd/zh/configuration/service/api/)”标签,将“端口”修改为 `9999` 并点击“提交”
|
||||
<img src="/assets/img/share/172-9090-dashboard-singbox-phone.png" alt="面板设置" width="60%" />
|
||||
|
||||
3. 通过切换后端配置可以分别使用 Clash API(支持“代理提供商”和“规则提供商”的更新)和 sing-box API Dashboard 面板
|
||||
|
||||
@@ -11,10 +11,10 @@ tags: [Clash, mihomo, ShellCrash, geodata, geosite, 分享, Router]
|
||||
1. 请根据自身情况进行修改,**适合自己的方案才是最好的方案**,如无特殊需求,可以照搬
|
||||
2. 此方案适用于 [ShellCrash](https://github.com/juewuy/ShellCrash)(以 ARM64 架构为例,且安装路径为 `/data/ShellCrash`{: .filepath})
|
||||
3. 本方案绕过了 CNIP 且不搭配 [AdGuard Home](https://github.com/AdguardTeam/AdGuardHome),在 DNS 层拦截广告
|
||||
4. 本人将路由器设置了每天早上 6 点重启,使得《[五](https://proxy-tutorials.dustinwin.us.kg/posts/share-shellcrash-mihomo-geodata/#%E4%BA%94-%E6%B7%BB%E5%8A%A0%E5%AE%9A%E6%97%B6%E4%BB%BB%E5%8A%A1)》中设置的定时任务生效
|
||||
4. 本人将路由器设置了每天早上 6 点重启,使得《[五](https://proxy-tutorials.dustinwin.cc.cd/posts/share-shellcrash-mihomo-geodata/#%E4%BA%94-%E6%B7%BB%E5%8A%A0%E5%AE%9A%E6%97%B6%E4%BB%BB%E5%8A%A1)》中设置的定时任务生效
|
||||
|
||||
## 一、 生成配置文件 .yaml 文件直链
|
||||
具体方法此处不再赘述,请看《[生成带有自定义策略组和规则的 mihomo 配置文件直链-geodata 方案](https://proxy-tutorials.dustinwin.us.kg/posts/link-mihomo-geodata)》,贴一下我使用的配置:
|
||||
具体方法此处不再赘述,请看《[生成带有自定义策略组和规则的 mihomo 配置文件直链-geodata 方案](https://proxy-tutorials.dustinwin.cc.cd/posts/link-mihomo-geodata)》,贴一下我使用的配置:
|
||||
- 注:`rules` 部分的 `geosite` 和 `geoip` 内容须与 `geodata-url` 中的路由规则文件相匹配
|
||||
|
||||
```yaml
|
||||
@@ -207,7 +207,7 @@ dns:
|
||||
{: .prompt-tip }
|
||||
|
||||
注:
|
||||
- ① 本 `dns` 配置中,国内域名走国内 DNS 解析,国外域名走 `fake-ip`,未知域名也走 `fake-ip`,在匹配 `GEOIP:cn` 规则时会由国外 DNS 解析且配置 `ecs` 提高了兼容性,解析出 IP 在国内则走 `国内 IP` 规则,否则走 `漏网之鱼` 规则(有效解决了“心理 DNS 泄露问题”,详见《[搭载 mihomo 内核配置 DNS 不泄露教程-geodata 方案](https://proxy-tutorials.dustinwin.us.kg/posts/dnsnoleaks-mihomo-geodata/)》)
|
||||
- ① 本 `dns` 配置中,国内域名走国内 DNS 解析,国外域名走 `fake-ip`,未知域名也走 `fake-ip`,在匹配 `GEOIP:cn` 规则时会由国外 DNS 解析且配置 `ecs` 提高了兼容性,解析出 IP 在国内则走 `国内 IP` 规则,否则走 `漏网之鱼` 规则(有效解决了“心理 DNS 泄露问题”,详见《[搭载 mihomo 内核配置 DNS 不泄露教程-geodata 方案](https://proxy-tutorials.dustinwin.cc.cd/posts/dnsnoleaks-mihomo-geodata/)》)
|
||||
- ② 推荐将 `ecs` 设置为当前宽带运营商分配的默认 DNS(可进入光猫或路由器拨号页面查看,或者前往[公共 DNS 大全](https://toolb.cn/publicdns)查询)的 IP 段,如默认 DNS 为 `211.137.58.20`,可设置为 `211.137.58.0/24`
|
||||
|
||||
```yaml
|
||||
@@ -256,17 +256,17 @@ dns:
|
||||
```
|
||||
|
||||
## 五、 添加定时任务
|
||||
可参考《[ShellCrash 搭载 mihomo 内核的配置-geodata 方案/添加定时任务](https://proxy-tutorials.dustinwin.us.kg/posts/toolsettings-shellcrash-mihomo-geodata/#%E4%B8%89-%E6%B7%BB%E5%8A%A0%E5%AE%9A%E6%97%B6%E4%BB%BB%E5%8A%A1)》
|
||||
可参考《[ShellCrash 搭载 mihomo 内核的配置-geodata 方案/添加定时任务](https://proxy-tutorials.dustinwin.cc.cd/posts/toolsettings-shellcrash-mihomo-geodata/#%E4%B8%89-%E6%B7%BB%E5%8A%A0%E5%AE%9A%E6%97%B6%E4%BB%BB%E5%8A%A1)》
|
||||
|
||||
## 六、 设置部分
|
||||
1. 设置可参考《[ShellCrash 搭载 mihomo 内核的配置-geodata 方案/设置部分](https://proxy-tutorials.dustinwin.us.kg/posts/toolsettings-shellcrash-mihomo-geodata/#%E5%9B%9B-%E8%AE%BE%E7%BD%AE%E9%83%A8%E5%88%86)》,此处只列举配置的不同之处
|
||||
1. 设置可参考《[ShellCrash 搭载 mihomo 内核的配置-geodata 方案/设置部分](https://proxy-tutorials.dustinwin.cc.cd/posts/toolsettings-shellcrash-mihomo-geodata/#%E5%9B%9B-%E8%AE%BE%E7%BD%AE%E9%83%A8%E5%88%86)》,此处只列举配置的不同之处
|
||||
2. 进入 ShellCrash 配置脚本 → 2) 功能设置 → 2) DNS 设置 → 9) 修改 DNS 服务器,设置如下:
|
||||
<img src="/assets/img/dns/dns-null.png" alt="设置部分 2" width="60%" />
|
||||
|
||||
3. 进入 2) 功能设置 → 6) 自定义端口及密钥 → 5) 修改面板访问端口,修改为 `9090`
|
||||
|
||||
## 七、 访问 Dashboard 面板
|
||||
打开 [zashboard](https://github.com/Zephyruso/zashboard) 在线面板地址 <http://board.zash.run.place> 后,直接在 [Clash API](https://sing-boxr.dustinwin.us.kg/zh/configuration/experimental/clash-api/) 标签里将“主机”修改为 `192.168.31.1`,点击“提交”即可访问 Dashboard 面板
|
||||
打开 [zashboard](https://github.com/Zephyruso/zashboard) 在线面板地址 <http://board.zash.run.place> 后,直接在 [Clash API](https://sing-boxr.dustinwin.cc.cd/zh/configuration/experimental/clash-api/) 标签里将“主机”修改为 `192.168.31.1`,点击“提交”即可访问 Dashboard 面板
|
||||
|
||||
> 推荐设置
|
||||
{: .prompt-tip }
|
||||
|
||||
@@ -11,10 +11,10 @@ tags: [Clash, mihomo, ShellCrash, ruleset, rule-set, 分享, Router]
|
||||
1. 请根据自身情况进行修改,**适合自己的方案才是最好的方案**,如无特殊需求,可以照搬
|
||||
2. 此方案适用于 [ShellCrash](https://github.com/juewuy/ShellCrash)(以 ARM64 架构为例,且安装路径为 `/data/ShellCrash`{: .filepath})
|
||||
3. 本方案绕过了 CNIP 且不搭配 [AdGuard Home](https://github.com/AdguardTeam/AdGuardHome),在 DNS 层拦截广告
|
||||
4. 本人将路由器设置了每天早上 6 点重启,使得《[四](https://proxy-tutorials.dustinwin.us.kg/posts/share-shellcrash-mihomo-ruleset/#%E5%9B%9B-%E6%B7%BB%E5%8A%A0%E5%AE%9A%E6%97%B6%E4%BB%BB%E5%8A%A1)》中设置的定时任务生效
|
||||
4. 本人将路由器设置了每天早上 6 点重启,使得《[四](https://proxy-tutorials.dustinwin.cc.cd/posts/share-shellcrash-mihomo-ruleset/#%E5%9B%9B-%E6%B7%BB%E5%8A%A0%E5%AE%9A%E6%97%B6%E4%BB%BB%E5%8A%A1)》中设置的定时任务生效
|
||||
|
||||
## 一、 生成配置文件 .yaml 文件直链
|
||||
具体方法此处不再赘述,请看《[生成带有自定义策略组和规则的 mihomo 配置文件直链-ruleset 方案](https://proxy-tutorials.dustinwin.us.kg/posts/link-mihomo-ruleset)》,贴一下我使用的配置:
|
||||
具体方法此处不再赘述,请看《[生成带有自定义策略组和规则的 mihomo 配置文件直链-ruleset 方案](https://proxy-tutorials.dustinwin.cc.cd/posts/link-mihomo-ruleset)》,贴一下我使用的配置:
|
||||
|
||||
```yaml
|
||||
proxy-providers:
|
||||
@@ -314,7 +314,7 @@ dns:
|
||||
{: .prompt-tip }
|
||||
|
||||
注:
|
||||
- ① 本 `dns` 配置中,国内域名走国内 DNS 解析,国外域名走 `fake-ip`,未知域名也走 `fake-ip`,在匹配 `RULE-SET:cn` 规则时会由国外 DNS 解析且配置 `ecs` 提高了兼容性,解析出 IP 在国内则走 `国内 IP` 规则,否则走 `漏网之鱼` 规则(有效解决了“心理 DNS 泄露问题”,详见《[搭载 mihomo 内核配置 DNS 不泄露教程-ruleset 方案](https://proxy-tutorials.dustinwin.us.kg/posts/dnsnoleaks-mihomo-ruleset/)》)
|
||||
- ① 本 `dns` 配置中,国内域名走国内 DNS 解析,国外域名走 `fake-ip`,未知域名也走 `fake-ip`,在匹配 `RULE-SET:cn` 规则时会由国外 DNS 解析且配置 `ecs` 提高了兼容性,解析出 IP 在国内则走 `国内 IP` 规则,否则走 `漏网之鱼` 规则(有效解决了“心理 DNS 泄露问题”,详见《[搭载 mihomo 内核配置 DNS 不泄露教程-ruleset 方案](https://proxy-tutorials.dustinwin.cc.cd/posts/dnsnoleaks-mihomo-ruleset/)》)
|
||||
- ② 推荐将 `ecs` 设置为当前宽带运营商分配的默认 DNS(可进入光猫或路由器拨号页面查看,或者前往[公共 DNS 大全](https://toolb.cn/publicdns)查询)的 IP 段,如默认 DNS 为 `211.137.58.20`,可设置为 `211.137.58.0/24`
|
||||
|
||||
```yaml
|
||||
@@ -363,16 +363,16 @@ dns:
|
||||
```
|
||||
|
||||
## 四、 添加定时任务
|
||||
可参考《[ShellCrash 搭载 mihomo 内核的配置-ruleset 方案/添加定时任务](https://proxy-tutorials.dustinwin.us.kg/posts/toolsettings-shellcrash-mihomo-ruleset/#%E4%BA%8C-%E6%B7%BB%E5%8A%A0%E5%AE%9A%E6%97%B6%E4%BB%BB%E5%8A%A1)》
|
||||
可参考《[ShellCrash 搭载 mihomo 内核的配置-ruleset 方案/添加定时任务](https://proxy-tutorials.dustinwin.cc.cd/posts/toolsettings-shellcrash-mihomo-ruleset/#%E4%BA%8C-%E6%B7%BB%E5%8A%A0%E5%AE%9A%E6%97%B6%E4%BB%BB%E5%8A%A1)》
|
||||
|
||||
## 五、 设置部分
|
||||
1. 设置可参考《[ShellCrash 搭载 mihomo 内核的配置-ruleset 方案/设置部分](https://proxy-tutorials.dustinwin.us.kg/posts/toolsettings-shellcrash-mihomo-ruleset/#%E4%B8%89-%E8%AE%BE%E7%BD%AE%E9%83%A8%E5%88%86)》,此处只列举配置的不同之处
|
||||
1. 设置可参考《[ShellCrash 搭载 mihomo 内核的配置-ruleset 方案/设置部分](https://proxy-tutorials.dustinwin.cc.cd/posts/toolsettings-shellcrash-mihomo-ruleset/#%E4%B8%89-%E8%AE%BE%E7%BD%AE%E9%83%A8%E5%88%86)》,此处只列举配置的不同之处
|
||||
2. 进入 ShellCrash 配置脚本 → 2) 功能设置 → 2) DNS 设置 → 9) 修改 DNS 服务器,设置如下:
|
||||
<img src="/assets/img/dns/dns-null.png" alt="设置部分 2" width="60%" />
|
||||
|
||||
3. 进入 2) 功能设置 → 6) 自定义端口及密钥 → 5) 修改面板访问端口,修改为 `9090`
|
||||
## 六、 访问 Dashboard 面板
|
||||
打开 [zashboard](https://github.com/Zephyruso/zashboard) 在线面板地址 <http://board.zash.run.place> 后,直接在 [Clash API](https://sing-boxr.dustinwin.us.kg/zh/configuration/experimental/clash-api/) 标签里将“主机”修改为 `192.168.31.1`,点击“提交”即可访问 Dashboard 面板
|
||||
打开 [zashboard](https://github.com/Zephyruso/zashboard) 在线面板地址 <http://board.zash.run.place> 后,直接在 [Clash API](https://sing-boxr.dustinwin.cc.cd/zh/configuration/experimental/clash-api/) 标签里将“主机”修改为 `192.168.31.1`,点击“提交”即可访问 Dashboard 面板
|
||||
|
||||
> 推荐设置
|
||||
{: .prompt-tip }
|
||||
|
||||
@@ -14,10 +14,10 @@ tags: [Clash, mihomo, ShellCrash, AdGuard Home, ruleset, rule-set, 分享, Route
|
||||
4. 此方案适用于 ShellCrash(以 ARM64 架构为例,且安装路径为 `/data/ShellCrash`{: .filepath})
|
||||
5. 此方案适用于 AdGuard Home(以 ARM64 架构为例,且安装路径为 `/data/AdGuardHome`{: .filepath})
|
||||
6. 此方案不建议启用 ShellCrash 配置脚本 → 2) 功能设置 → 3) 透明路由流量过滤 → 2) 过滤局域网设备,因不经过内核的设备在访问 `漏网之鱼` 域名时会遇到无法访问的情况
|
||||
7. 本人将路由器设置了每天早上 6 点重启,使得《[四](https://proxy-tutorials.dustinwin.us.kg/posts/share-shellcrashadguardhome-mihomo-ruleset/#%E5%9B%9B-%E6%B7%BB%E5%8A%A0%E5%AE%9A%E6%97%B6%E4%BB%BB%E5%8A%A1)》中设置的定时任务生效
|
||||
7. 本人将路由器设置了每天早上 6 点重启,使得《[四](https://proxy-tutorials.dustinwin.cc.cd/posts/share-shellcrashadguardhome-mihomo-ruleset/#%E5%9B%9B-%E6%B7%BB%E5%8A%A0%E5%AE%9A%E6%97%B6%E4%BB%BB%E5%8A%A1)》中设置的定时任务生效
|
||||
|
||||
## 一、 生成配置文件 .yaml 文件直链
|
||||
具体方法此处不再赘述,请看《[生成带有自定义策略组和规则的 mihomo 配置文件直链-ruleset 方案](https://proxy-tutorials.dustinwin.us.kg/posts/link-mihomo-ruleset)》,贴一下我使用的配置:
|
||||
具体方法此处不再赘述,请看《[生成带有自定义策略组和规则的 mihomo 配置文件直链-ruleset 方案](https://proxy-tutorials.dustinwin.cc.cd/posts/link-mihomo-ruleset)》,贴一下我使用的配置:
|
||||
|
||||
```yaml
|
||||
proxy-providers:
|
||||
@@ -269,7 +269,7 @@ sc
|
||||
注:
|
||||
- ① 由于 ShellCrash 采用的 DNS 模式为 `mix`,**ShellCrash 传给 AdGuard Home 的国外域名对应 IP 为假 IP**,会导致 AdGuard Home 检查更新和下载更新 DNS 黑名单时失败
|
||||
- ② `dns.fake-ip-filter` 中添加了 AdGuard Home 常用域名,包括:`adguardteam.github.io`(AdGuard Home 自带 DNS 黑名单下载域名)、`adrules.top`(常用广告拦截下载域名)、`anti-ad.net`(常用广告拦截下载域名)和 `static.adtidy.org`(AdGuard Home 检查更新域名),可使这些域名不走 `fakeip`
|
||||
- ③ 不推荐使用自带更新去更新,推荐《[四](https://proxy-tutorials.dustinwin.us.kg/posts/share-shellcrashadguardhome-mihomo-ruleset/#%E5%9B%9B-%E6%B7%BB%E5%8A%A0%E5%AE%9A%E6%97%B6%E4%BB%BB%E5%8A%A1)》中通过定时任务去自动更新(AdGuard Home 程序已被压缩,节省空间)
|
||||
- ③ 不推荐使用自带更新去更新,推荐《[四](https://proxy-tutorials.dustinwin.cc.cd/posts/share-shellcrashadguardhome-mihomo-ruleset/#%E5%9B%9B-%E6%B7%BB%E5%8A%A0%E5%AE%9A%E6%97%B6%E4%BB%BB%E5%8A%A1)》中通过定时任务去自动更新(AdGuard Home 程序已被压缩,节省空间)
|
||||
<img src="/assets/img/share/update-adguardhome.png" alt="编辑 user.yaml 文件" width="60%" />
|
||||
|
||||
```yaml
|
||||
@@ -320,7 +320,7 @@ dns:
|
||||
{: .prompt-tip }
|
||||
|
||||
注:
|
||||
- ① 本 `dns` 配置中,国内域名走国内 DNS 解析,国外域名走 `fake-ip`,未知域名也走 `fake-ip`,在匹配 `RULE-SET:cn` 规则时会由国外 DNS 解析且配置 `ecs` 提高了兼容性,解析出 IP 在国内则走 `国内 IP` 规则,否则走 `漏网之鱼` 规则(有效解决了“心理 DNS 泄露问题”,详见《[搭载 mihomo 内核配置 DNS 不泄露教程-ruleset 方案](https://proxy-tutorials.dustinwin.us.kg/posts/dnsnoleaks-mihomo-ruleset/)》)
|
||||
- ① 本 `dns` 配置中,国内域名走国内 DNS 解析,国外域名走 `fake-ip`,未知域名也走 `fake-ip`,在匹配 `RULE-SET:cn` 规则时会由国外 DNS 解析且配置 `ecs` 提高了兼容性,解析出 IP 在国内则走 `国内 IP` 规则,否则走 `漏网之鱼` 规则(有效解决了“心理 DNS 泄露问题”,详见《[搭载 mihomo 内核配置 DNS 不泄露教程-ruleset 方案](https://proxy-tutorials.dustinwin.cc.cd/posts/dnsnoleaks-mihomo-ruleset/)》)
|
||||
- ② 推荐将 `ecs` 设置为当前宽带运营商分配的默认 DNS(可进入光猫或路由器拨号页面查看,或者前往[公共 DNS 大全](https://toolb.cn/publicdns)查询)的 IP 段,如默认 DNS 为 `211.137.58.20`,可设置为 `211.137.58.0/24`
|
||||
|
||||
```yaml
|
||||
@@ -379,8 +379,8 @@ dns:
|
||||
<img src="/assets/img/share/task-adguardhome.png" alt="添加定时任务" width="60%" />
|
||||
|
||||
## 五、 ShellCrash 设置
|
||||
1. 设置可参考《[ShellCrash 搭载 mihomo 内核的配置-ruleset 方案/设置部分](https://proxy-tutorials.dustinwin.us.kg/posts/toolsettings-shellcrash-mihomo-ruleset/#%E4%B8%89-%E8%AE%BE%E7%BD%AE%E9%83%A8%E5%88%86)》,此处只列举配置的不同之处
|
||||
2. 进入 ShellCrash 配置脚本 → 2) 功能设置 → 2) DNS 设置 → 7) DNS 劫持端口,设置为“5353”(须完成《[六](https://proxy-tutorials.dustinwin.us.kg/posts/share-shellcrashadguardhome-mihomo-ruleset/#%E5%85%AD-%E5%AE%89%E8%A3%85-adguard-home)》后才可设置)
|
||||
1. 设置可参考《[ShellCrash 搭载 mihomo 内核的配置-ruleset 方案/设置部分](https://proxy-tutorials.dustinwin.cc.cd/posts/toolsettings-shellcrash-mihomo-ruleset/#%E4%B8%89-%E8%AE%BE%E7%BD%AE%E9%83%A8%E5%88%86)》,此处只列举配置的不同之处
|
||||
2. 进入 ShellCrash 配置脚本 → 2) 功能设置 → 2) DNS 设置 → 7) DNS 劫持端口,设置为“5353”(须完成《[六](https://proxy-tutorials.dustinwin.cc.cd/posts/share-shellcrashadguardhome-mihomo-ruleset/#%E5%85%AD-%E5%AE%89%E8%A3%85-adguard-home)》后才可设置)
|
||||
3. 进入 2) DNS 设置 → 9) 修改 DNS 服务器,设置如下:
|
||||
<img src="/assets/img/dns/dns-null.png" alt="ShellCrash 设置 2" width="60%" />
|
||||
|
||||
@@ -411,10 +411,10 @@ EOF
|
||||
```
|
||||
|
||||
## 七、 AdGuard Home 设置
|
||||
设置可参考《[全网最详细的解锁 SSH ShellCrash 搭载 mihomo 内核搭配 AdGuard Home 安装和配置教程/AdGuard Home 配置](https://proxy-tutorials.dustinwin.us.kg/posts/pin-shellcrashadguardhome-mihomo/#2-adguard-home-%E9%85%8D%E7%BD%AE)》
|
||||
设置可参考《[全网最详细的解锁 SSH ShellCrash 搭载 mihomo 内核搭配 AdGuard Home 安装和配置教程/AdGuard Home 配置](https://proxy-tutorials.dustinwin.cc.cd/posts/pin-shellcrashadguardhome-mihomo/#2-adguard-home-%E9%85%8D%E7%BD%AE)》
|
||||
|
||||
## 八、 访问面板
|
||||
1. 打开 [zashboard](https://github.com/Zephyruso/zashboard) 在线面板地址 <http://board.zash.run.place> 后,直接在 [Clash API](https://sing-boxr.dustinwin.us.kg/zh/configuration/experimental/clash-api/) 标签里将“主机”修改为 `192.168.31.1`,点击“提交”即可访问 Dashboard 面板
|
||||
1. 打开 [zashboard](https://github.com/Zephyruso/zashboard) 在线面板地址 <http://board.zash.run.place> 后,直接在 [Clash API](https://sing-boxr.dustinwin.cc.cd/zh/configuration/experimental/clash-api/) 标签里将“主机”修改为 `192.168.31.1`,点击“提交”即可访问 Dashboard 面板
|
||||
2. 打开 <http://miwifi.com:3000> 即可访问 AdGuard Home 面板
|
||||
|
||||
> 推荐设置
|
||||
|
||||
@@ -49,7 +49,7 @@ curl -sS -o $CRASHDIR/Country.mmdb -L https://cdn.jsdelivr.net/gh/DustinWin/rule
|
||||
- ⑥ 内核加载完成后根据需要是否保留相关数据库文件(此处选择“0) 不保留”)
|
||||
|
||||
3. 功能设置
|
||||
- ① 进入 2) DNS 设置 → 9) 修改 DNS 服务器,选择“4) 一键配置加密 DNS”(推荐设置 DNS 分流,请看《[搭载 mihomo 内核进行 DNS 分流教程-geodata 方案](https://proxy-tutorials.dustinwin.us.kg/posts/dnsbypass-mihomo-geodata)》)
|
||||
- ① 进入 2) DNS 设置 → 9) 修改 DNS 服务器,选择“4) 一键配置加密 DNS”(推荐设置 DNS 分流,请看《[搭载 mihomo 内核进行 DNS 分流教程-geodata 方案](https://proxy-tutorials.dustinwin.cc.cd/posts/dnsbypass-mihomo-geodata)》)
|
||||
- ② 进入 2) 功能设置 → 5) 启用域名嗅探,选择“1) 是”
|
||||
|
||||
4. 进入主菜单 → 4 启动设置,启用“1) 开机自启动”
|
||||
@@ -59,12 +59,12 @@ curl -sS -o $CRASHDIR/Country.mmdb -L https://cdn.jsdelivr.net/gh/DustinWin/rule
|
||||
8. 进入主菜单 → 9) 更新与支持 → 2) 切换/更新内核文件 → 6) 使用自定义内核 → 9) 自定义内核链接,输入导入内核命令里的链接并回车,选择“1) Mihomo(Meta)”
|
||||
9. 进入 9) 更新与支持 → 4) 安装/更新本地Dashboard面板,推荐安装“1) 安装 zashboard 面板”
|
||||
10. 导入配置文件
|
||||
- ① 进入主菜单 → 6) 配置文件管理 → a) 添加提供者 → 1) 设置名称或代号,如输入“mihomo”;后进入 2) 设置链接或路径,粘贴《[生成带有自定义策略组和规则的 mihomo 配置文件直链-geodata 方案](https://proxy-tutorials.dustinwin.us.kg/posts/link-mihomo-geodata)》中生成的 .yaml 配置文件直链,选择“a) 保存此提供者”
|
||||
- ① 进入主菜单 → 6) 配置文件管理 → a) 添加提供者 → 1) 设置名称或代号,如输入“mihomo”;后进入 2) 设置链接或路径,粘贴《[生成带有自定义策略组和规则的 mihomo 配置文件直链-geodata 方案](https://proxy-tutorials.dustinwin.cc.cd/posts/link-mihomo-geodata)》中生成的 .yaml 配置文件直链,选择“a) 保存此提供者”
|
||||
- ② 进入 6) 配置文件管理 → c) 在线生成配置文件 → 6) 自定义浏览器 UA,选择“2) 不使用 UA”
|
||||
- ③ 进入 6) 配置文件管理 → 1) mihomo,选择“e) 在线获取此配置文件”,启动服务即可
|
||||
|
||||
11. 访问 Dashboard 面板
|
||||
- ① 打开 <http://192.168.31.1:9999/ui/> 后,直接在“[Clash API](https://sing-boxr.dustinwin.us.kg/zh/configuration/experimental/clash-api/)”标签里将“主机”和“端口”分别修改为 `192.168.31.1` 和 `9999`,点击“提交”即可访问 Dashboard 面板
|
||||
- ① 打开 <http://192.168.31.1:9999/ui/> 后,直接在“[Clash API](https://sing-boxr.dustinwin.cc.cd/zh/configuration/experimental/clash-api/)”标签里将“主机”和“端口”分别修改为 `192.168.31.1` 和 `9999`,点击“提交”即可访问 Dashboard 面板
|
||||
<img src="/assets/img/tools/192-9999-dashboard.png" alt="设置部分 2" width="60%" />
|
||||
|
||||
- ② 进入 Dashboard 面板 → 代理 → 代理提供者,点击“转圈”图标,可手动更新节点
|
||||
|
||||
@@ -10,13 +10,13 @@ tags: [Clash, mihomo, ShellCrash, geodata, geosite, 进阶, 本地, Router]
|
||||
{: .prompt-tip }
|
||||
1. 本教程只适用于 [ShellCrash](https://github.com/juewuy/ShellCrash)
|
||||
2. 本教程**仅适合白名单模式**(没有命中规则的网络流量统统使用代理,适用于服务器线路网络质量稳定、快速,不缺服务器流量的用户)
|
||||
3. 本教程最终效果媲美《[生成带有自定义策略组和规则的 mihomo 配置文件直链-geodata 方案](https://proxy-tutorials.dustinwin.us.kg/posts/link-mihomo-geodata)》(策略组更直观,操作更方便)
|
||||
4. 若仅配置自定义策略组和规则,可直接跳过《[二](https://proxy-tutorials.dustinwin.us.kg/posts/toolsettings-shellcrash-mihomo-local-geodata/#%E4%BA%8C-%E5%AF%BC%E5%85%A5%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6)》
|
||||
3. 本教程最终效果媲美《[生成带有自定义策略组和规则的 mihomo 配置文件直链-geodata 方案](https://proxy-tutorials.dustinwin.cc.cd/posts/link-mihomo-geodata)》(策略组更直观,操作更方便)
|
||||
4. 若仅配置自定义策略组和规则,可直接跳过《[二](https://proxy-tutorials.dustinwin.cc.cd/posts/toolsettings-shellcrash-mihomo-local-geodata/#%E4%BA%8C-%E5%AF%BC%E5%85%A5%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6)》
|
||||
5. 所有步骤完成后,请连接 SSH 后执行命令 `$CRASHDIR/start.sh restart` 生效
|
||||
6. 推荐使用 [Visual Studio Code](https://code.visualstudio.com/Download) 等专业编辑器来修改配置文件
|
||||
|
||||
## 一、 导入 [mihomo 内核](https://github.com/MetaCubeX/mihomo)和[路由规则文件](https://github.com/DustinWin/ruleset_geodata?tab=readme-ov-file#%E4%B8%80-geodata-%E6%96%87%E4%BB%B6%E8%AF%B4%E6%98%8E)
|
||||
可参考《[ShellCrash 搭载 mihomo 内核的配置-geodata 方案](https://proxy-tutorials.dustinwin.us.kg/posts/toolsettings-shellcrash-mihomo-geodata)》里的《[一](https://proxy-tutorials.dustinwin.us.kg/posts/toolsettings-shellcrash-mihomo-geodata/#%E4%B8%80-%E5%AF%BC%E5%85%A5-mihomo-%E5%86%85%E6%A0%B8)》和《[二](https://proxy-tutorials.dustinwin.us.kg/posts/toolsettings-shellcrash-mihomo-geodata/#%E4%BA%8C-%E5%AF%BC%E5%85%A5%E8%B7%AF%E7%94%B1%E8%A7%84%E5%88%99%E6%96%87%E4%BB%B6)》进行操作
|
||||
可参考《[ShellCrash 搭载 mihomo 内核的配置-geodata 方案](https://proxy-tutorials.dustinwin.cc.cd/posts/toolsettings-shellcrash-mihomo-geodata)》里的《[一](https://proxy-tutorials.dustinwin.cc.cd/posts/toolsettings-shellcrash-mihomo-geodata/#%E4%B8%80-%E5%AF%BC%E5%85%A5-mihomo-%E5%86%85%E6%A0%B8)》和《[二](https://proxy-tutorials.dustinwin.cc.cd/posts/toolsettings-shellcrash-mihomo-geodata/#%E4%BA%8C-%E5%AF%BC%E5%85%A5%E8%B7%AF%E7%94%B1%E8%A7%84%E5%88%99%E6%96%87%E4%BB%B6)》进行操作
|
||||
|
||||
## 二、 导入配置文件
|
||||
1. 进入 ShellCrash → 6 管理配置文件 → 1 在线生成配置文件 → 4 选取在线配置规则模版,选择 4 [ACL4SSR](https://acl4ssr-sub.github.io) 极简版(适合自建节点)
|
||||
|
||||
@@ -10,13 +10,13 @@ tags: [Clash, ShellCrash, ruleset, rule-set, 进阶, 本地, Router]
|
||||
{: .prompt-tip }
|
||||
1. 本教程只适用于 [ShellCrash](https://github.com/juewuy/ShellCrash)
|
||||
2. 本教程**仅适合白名单模式**(没有命中规则的网络流量统统使用代理,适用于服务器线路网络质量稳定、快速,不缺服务器流量的用户)
|
||||
3. 本教程最终效果媲美《[生成带有自定义策略组和规则的 mihomo 配置文件直链-ruleset 方案](https://proxy-tutorials.dustinwin.us.kg/posts/link-mihomo-ruleset)》(策略组更直观,操作更方便)
|
||||
4. 若仅配置自定义策略组和规则,可直接跳过《[二](https://proxy-tutorials.dustinwin.us.kg/posts/toolsettings-shellcrash-mihomo-local-ruleset/#%E4%BA%8C-%E5%AF%BC%E5%85%A5%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6)》
|
||||
3. 本教程最终效果媲美《[生成带有自定义策略组和规则的 mihomo 配置文件直链-ruleset 方案](https://proxy-tutorials.dustinwin.cc.cd/posts/link-mihomo-ruleset)》(策略组更直观,操作更方便)
|
||||
4. 若仅配置自定义策略组和规则,可直接跳过《[二](https://proxy-tutorials.dustinwin.cc.cd/posts/toolsettings-shellcrash-mihomo-local-ruleset/#%E4%BA%8C-%E5%AF%BC%E5%85%A5%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6)》
|
||||
5. 所有步骤完成后,请连接 SSH 后执行命令 `$CRASHDIR/start.sh restart` 生效
|
||||
6. 推荐使用 [Visual Studio Code](https://code.visualstudio.com/Download) 等专业编辑器来修改配置文件
|
||||
|
||||
## 一、 导入 [mihomo 内核](https://github.com/MetaCubeX/mihomo)
|
||||
可参考《[ShellCrash 搭载 mihomo 内核的配置-ruleset 方案/导入 mihomo 内核](https://proxy-tutorials.dustinwin.us.kg/posts/toolsettings-shellcrash-mihomo-ruleset/#%E4%B8%80-%E5%AF%BC%E5%85%A5-mihomo-%E5%86%85%E6%A0%B8)》里的步骤进行操作
|
||||
可参考《[ShellCrash 搭载 mihomo 内核的配置-ruleset 方案/导入 mihomo 内核](https://proxy-tutorials.dustinwin.cc.cd/posts/toolsettings-shellcrash-mihomo-ruleset/#%E4%B8%80-%E5%AF%BC%E5%85%A5-mihomo-%E5%86%85%E6%A0%B8)》里的步骤进行操作
|
||||
|
||||
## 二、 导入配置文件
|
||||
1. 进入 ShellCrash → 6 管理配置文件 → 1 在线生成配置文件 → 4 选取在线配置规则模版,选择 4 [ACL4SSR](https://acl4ssr-sub.github.io) 极简版(适合自建节点)
|
||||
|
||||
@@ -40,7 +40,7 @@ curl -sS -o /tmp/CrashCore.upx -L https://ghfast.top/https://github.com/DustinWi
|
||||
- ⑥ 内核加载完成后根据需要是否保留相关数据库文件(此处选择“0) 不保留”)
|
||||
|
||||
3. 功能设置
|
||||
- ① 进入 2) DNS 设置 → 9) 修改 DNS 服务器,选择“4) 一键配置加密 DNS”(推荐设置 DNS 分流,请看《[搭载 mihomo 内核进行 DNS 分流教程-geodata 方案](https://proxy-tutorials.dustinwin.us.kg/posts/dnsbypass-mihomo-geodata)》)
|
||||
- ① 进入 2) DNS 设置 → 9) 修改 DNS 服务器,选择“4) 一键配置加密 DNS”(推荐设置 DNS 分流,请看《[搭载 mihomo 内核进行 DNS 分流教程-geodata 方案](https://proxy-tutorials.dustinwin.cc.cd/posts/dnsbypass-mihomo-geodata)》)
|
||||
- ② 进入 2) 功能设置 → 5) 启用域名嗅探,选择“1) 是”
|
||||
|
||||
4. 进入主菜单 → 4 启动设置,启用“1) 开机自启动”
|
||||
@@ -50,12 +50,12 @@ curl -sS -o /tmp/CrashCore.upx -L https://ghfast.top/https://github.com/DustinWi
|
||||
8. 进入主菜单 → 9) 更新与支持 → 2) 切换/更新内核文件 → 6) 使用自定义内核 → 9) 自定义内核链接,输入导入内核命令里的链接并回车,选择“1) Mihomo(Meta)”
|
||||
9. 进入 9) 更新与支持 → 4) 安装/更新本地Dashboard面板,推荐安装“1) 安装 zashboard 面板”
|
||||
10. 导入配置文件
|
||||
- ① 进入主菜单 → 6) 配置文件管理 → a) 添加提供者 → 1) 设置名称或代号,如输入“mihomo”;后进入 2) 设置链接或路径,粘贴《[生成带有自定义策略组和规则的 mihomo 配置文件直链-ruleset 方案](https://proxy-tutorials.dustinwin.us.kg/posts/link-mihomo-ruleset)》中生成的 .yaml 配置文件直链,选择“a) 保存此提供者”
|
||||
- ① 进入主菜单 → 6) 配置文件管理 → a) 添加提供者 → 1) 设置名称或代号,如输入“mihomo”;后进入 2) 设置链接或路径,粘贴《[生成带有自定义策略组和规则的 mihomo 配置文件直链-ruleset 方案](https://proxy-tutorials.dustinwin.cc.cd/posts/link-mihomo-ruleset)》中生成的 .yaml 配置文件直链,选择“a) 保存此提供者”
|
||||
- ② 进入 6) 配置文件管理 → c) 在线生成配置文件 → 6) 自定义浏览器 UA,选择“2) 不使用 UA”
|
||||
- ③ 进入 6) 配置文件管理 → 1) mihomo,选择“e) 在线获取此配置文件”,启动服务即可
|
||||
|
||||
11. 访问 Dashboard 面板
|
||||
- ① 打开 <http://192.168.31.1:9999/ui/> 后,直接在“[Clash API](https://sing-boxr.dustinwin.us.kg/zh/configuration/experimental/clash-api/)”标签里将“主机”和“端口”分别修改为 `192.168.31.1` 和 `9999`,点击“提交”即可访问 Dashboard 面板
|
||||
- ① 打开 <http://192.168.31.1:9999/ui/> 后,直接在“[Clash API](https://sing-boxr.dustinwin.cc.cd/zh/configuration/experimental/clash-api/)”标签里将“主机”和“端口”分别修改为 `192.168.31.1` 和 `9999`,点击“提交”即可访问 Dashboard 面板
|
||||
<img src="/assets/img/tools/192-9999-dashboard.png" alt="设置部分 2" width="60%" />
|
||||
|
||||
- ② 进入 Dashboard 面板 → 代理 → 代理提供者,点击“转圈”图标,可手动更新节点
|
||||
|
||||
@@ -10,9 +10,9 @@ tags: [sing-box, sing-boxr, ShellCrash, ruleset, rule_set, 进阶, DNS, DNS 分
|
||||
{: .prompt-tip }
|
||||
1. [ShellCrash](https://github.com/juewuy/ShellCrash) 搭配 [AdGuard Home](https://github.com/AdguardTeam/AdGuardHome) 并将 AdGuard Home 作为上游时不要使用该方法
|
||||
2. 本教程以 ShellCrash 为例,其它客户端亦可参考
|
||||
3. 本教程搭载 [sing-box 内核 reF1nd-Testing 版](https://github.com/reF1nd/sing-box/tree/reF1nd-testing)(导入内核方法可参考《[ShellCrash 和 AdGuard Home 快速安装教程/导入 mihomo 内核 或 sing-box 内核](https://proxy-tutorials.dustinwin.us.kg/posts/pin-toolsinstall/#%E4%BA%8C-%E5%AF%BC%E5%85%A5-mihomo-%E5%86%85%E6%A0%B8-%E6%88%96-sing-box-%E5%86%85%E6%A0%B8)》)
|
||||
3. 本教程搭载 [sing-box 内核 reF1nd-Testing 版](https://github.com/reF1nd/sing-box/tree/reF1nd-testing)(导入内核方法可参考《[ShellCrash 和 AdGuard Home 快速安装教程/导入 mihomo 内核 或 sing-box 内核](https://proxy-tutorials.dustinwin.cc.cd/posts/pin-toolsinstall/#%E4%BA%8C-%E5%AF%BC%E5%85%A5-mihomo-%E5%86%85%E6%A0%B8-%E6%88%96-sing-box-%E5%86%85%E6%A0%B8)》)
|
||||
4. DNS 分流简单来说就是**指定国内域名走国内 DNS 解析,国外域名走 `fakeip`**。未知域名在匹配 `rule_set:cnip` 规则时会先由国内 DNS 解析,解析出 IP 在国内则直接返回解析结果且走 `国内 IP` 规则,否则走 `fakeip` 且走 `漏网之鱼` 规则
|
||||
5. 部分用户觉得未知域名处理方式会导致 DNS 泄露,可参考《[搭载 sing-boxr 内核配置 DNS 不泄露教程-ruleset 方案](https://proxy-tutorials.dustinwin.us.kg/posts/dnsnoleaks-singboxr-ruleset)》
|
||||
5. 部分用户觉得未知域名处理方式会导致 DNS 泄露,可参考《[搭载 sing-boxr 内核配置 DNS 不泄露教程-ruleset 方案](https://proxy-tutorials.dustinwin.cc.cd/posts/dnsnoleaks-singboxr-ruleset)》
|
||||
|
||||
## 一、 导入规则集合文件
|
||||
`route.rule_set` 须添加 `fakeip-filter`、`proxy`、`cn` 和 `cnip`,如下:
|
||||
|
||||
@@ -10,7 +10,7 @@ tags: [sing-box, sing-boxr, ShellCrash, ruleset, rule_set, 进阶, DNS, DNS 泄
|
||||
{: .prompt-tip }
|
||||
1. 此方案彻底防止了 DNS 泄露(未知域名在匹配 `rule_set:cnip` 规则时会先由国外 DNS 解析且配置 `client_subnet`,解析出 IP 在国内则直接返回解析结果且走 `国内 IP` 规则,否则走 `fakeip` 且走 `漏网之鱼` 规则),兼容性高,可放心使用
|
||||
2. 本教程以 [ShellCrash](https://github.com/juewuy/ShellCrash) 为例,其它客户端亦可参考
|
||||
3. 本教程搭载 [sing-box 内核 reF1nd-Testing 版](https://github.com/reF1nd/sing-box/tree/reF1nd-testing)(导入内核方法可参考《[ShellCrash 和 AdGuard Home 快速安装教程/导入 mihomo 内核 或 sing-box 内核](https://proxy-tutorials.dustinwin.us.kg/posts/pin-toolsinstall/#%E4%BA%8C-%E5%AF%BC%E5%85%A5-mihomo-%E5%86%85%E6%A0%B8-%E6%88%96-sing-box-%E5%86%85%E6%A0%B8)》)
|
||||
3. 本教程搭载 [sing-box 内核 reF1nd-Testing 版](https://github.com/reF1nd/sing-box/tree/reF1nd-testing)(导入内核方法可参考《[ShellCrash 和 AdGuard Home 快速安装教程/导入 mihomo 内核 或 sing-box 内核](https://proxy-tutorials.dustinwin.cc.cd/posts/pin-toolsinstall/#%E4%BA%8C-%E5%AF%BC%E5%85%A5-mihomo-%E5%86%85%E6%A0%B8-%E6%88%96-sing-box-%E5%86%85%E6%A0%B8)》)
|
||||
4. 可进入 <https://ipleak.net> 测试 DNS 是否泄露,“DNS Addresses” 栏目下没有中国国旗(因 `ipleak.net` 属未知域名,默认走 `漏网之鱼` 规则),即代表 DNS 没有发生泄露
|
||||
|
||||
## 一、 导入规则集合文件
|
||||
|
||||
@@ -12,7 +12,7 @@ tags: [sing-box, sing-boxr, 直链, 订阅, ruleset, rule_set, 基础]
|
||||
如:[ShellCrash](https://github.com/juewuy/ShellCrash) 和 [sing-boxr for Android](https://github.com/DustinWin/proxy-tools/releases/tag/sing-box) 等
|
||||
2. 生成的订阅链接地址不会改变,支持更新订阅,**支持国内访问,支持同步机场节点**
|
||||
3. 生成的订阅链接**自带规则集**,规则集来源 [DustinWin/ruleset_geodata/ruleset](https://github.com/DustinWin/ruleset_geodata#%E4%BA%8C-ruleset-%E8%A7%84%E5%88%99%E9%9B%86%E6%96%87%E4%BB%B6%E8%AF%B4%E6%98%8E)
|
||||
4. 本教程必须使用支持[提供者](https://sing-boxr.dustinwin.us.kg/zh/configuration/provider/) `outbound_providers`(类似于 [mihomo 内核](https://github.com/MetaCubeX/mihomo)的[代理集合](https://wiki.metacubex.one/config/proxy-providers/) `proxy-providers`)的 [sing-box reF1nd 版内核](https://github.com/reF1nd/sing-box),请先**确定自己机场的订阅链接是否为 Clash 或 sing-box 订阅链接**,若不是,需前往[肥羊在线订阅转换工具](https://suburl.v1.mk)进行转换,“生成类型”选择“Clash”或“sing-box”,其它参数保持默认即可,转换后的 Clash 订阅链接需要在末尾添加 `&flag=clash`,然后添加到 .json 文件出站提供者 `providers` 的 `url` 中
|
||||
4. 本教程必须使用支持[提供者](https://sing-boxr.dustinwin.cc.cd/zh/configuration/provider/) `outbound_providers`(类似于 [mihomo 内核](https://github.com/MetaCubeX/mihomo)的[代理集合](https://wiki.metacubex.one/config/proxy-providers/) `proxy-providers`)的 [sing-box reF1nd 版内核](https://github.com/reF1nd/sing-box),请先**确定自己机场的订阅链接是否为 Clash 或 sing-box 订阅链接**,若不是,需前往[肥羊在线订阅转换工具](https://suburl.v1.mk)进行转换,“生成类型”选择“Clash”或“sing-box”,其它参数保持默认即可,转换后的 Clash 订阅链接需要在末尾添加 `&flag=clash`,然后添加到 .json 文件出站提供者 `providers` 的 `url` 中
|
||||
5. 推荐使用 [Visual Studio Code](https://code.visualstudio.com/Download) 等专业编辑器来修改配置文件
|
||||
6. ShellCrash 支持本地导入配置文件,可以直接将下方的 .json 直链文件内容复制到 `$CRASHDIR/jsons/config.json`{: .filepath} 文件中,可代替通过 ShellCrash 配置脚本 → 6) 配置文件管理 → a) 添加提供者
|
||||
|
||||
@@ -583,4 +583,4 @@ tags: [sing-box, sing-boxr, 直链, 订阅, ruleset, rule_set, 基础]
|
||||
1. 进入 ShellCrash 配置脚本 → a) 添加提供者 → 1) 设置名称或代号,如输入“sing-boxr”;后进入 2) 设置链接或路径,粘贴最终生成的订阅链接,选择“a) 保存此提供者”
|
||||
2. 进入 6) 配置文件管理 → 6) 配置文件管理 → c) 在线生成配置文件 → 6) 自定义浏览器 UA,选择“2) 不使用 UA”
|
||||
3. 进入 6) 配置文件管理 → 1) sing-boxr,选择“e) 在线获取此配置文件”即可
|
||||
4. 具体设置请参考《[ShellCrash 搭载 sing-boxr 内核的配置-ruleset 方案](https://proxy-tutorials.dustinwin.us.kg/posts/toolsettings-shellcrash-singboxr-ruleset)》
|
||||
4. 具体设置请参考《[ShellCrash 搭载 sing-boxr 内核的配置-ruleset 方案](https://proxy-tutorials.dustinwin.cc.cd/posts/toolsettings-shellcrash-singboxr-ruleset)》
|
||||
|
||||
@@ -12,11 +12,11 @@ tags: [sing-box, sing-boxr, ShellCrash, ruleset, rule_set, 分享, Router]
|
||||
2. 此方案适用于 [ShellCrash](https://github.com/juewuy/ShellCrash)(以 ARM64 架构为例,且安装路径为 `/data/ShellCrash`{: .filepath})
|
||||
3. 本方案绕过了 CNIP 且 IP 在国内的未知域名也会被绕过
|
||||
4. 本方案不搭配 [AdGuard Home](https://github.com/AdguardTeam/AdGuardHome),在 DNS 层拦截广告
|
||||
5. 本人将路由器设置了每天早上 6 点重启,使得《[六](https://proxy-tutorials.dustinwin.us.kg/posts/share-shellcrash-singboxr-ruleset/#%E5%85%AD-%E6%B7%BB%E5%8A%A0%E5%AE%9A%E6%97%B6%E4%BB%BB%E5%8A%A1)》中设置的定时任务生效
|
||||
5. 本人将路由器设置了每天早上 6 点重启,使得《[六](https://proxy-tutorials.dustinwin.cc.cd/posts/share-shellcrash-singboxr-ruleset/#%E5%85%AD-%E6%B7%BB%E5%8A%A0%E5%AE%9A%E6%97%B6%E4%BB%BB%E5%8A%A1)》中设置的定时任务生效
|
||||
6. 本教程搭载 [sing-box 内核 reF1nd-Testing 版](https://github.com/reF1nd/sing-box/tree/reF1nd-testing)
|
||||
|
||||
## 一、 生成配置文件 .json 文件直链
|
||||
具体方法此处不再赘述,请看《[生成带有自定义出站和规则的 sing-boxr 配置文件直链-ruleset 方案](https://proxy-tutorials.dustinwin.us.kg/posts/link-singboxr-ruleset)》,贴一下我使用的配置:
|
||||
具体方法此处不再赘述,请看《[生成带有自定义出站和规则的 sing-boxr 配置文件直链-ruleset 方案](https://proxy-tutorials.dustinwin.cc.cd/posts/link-singboxr-ruleset)》,贴一下我使用的配置:
|
||||
|
||||
```json
|
||||
{
|
||||
@@ -305,7 +305,7 @@ sc
|
||||
{: .prompt-tip }
|
||||
|
||||
注:
|
||||
- ① 本 `dns` 配置中,国内域名走国内 DNS 解析,国外域名走 `fakeip`,未知域名也走 `fakeip`,在匹配 `rule_set:cnip` 规则时会先由国外 DNS 解析且配置 `client_subnet` 提高了兼容性,解析出 IP 在国内则走 `国内 IP` 规则,否则走 `漏网之鱼` 规则(有效解决了“心理 DNS 泄露问题”,详见《[搭载 sing-boxr 内核配置 DNS 不泄露教程-ruleset 方案](https://proxy-tutorials.dustinwin.us.kg/posts/dnsnoleaks-singboxr-ruleset/)》)
|
||||
- ① 本 `dns` 配置中,国内域名走国内 DNS 解析,国外域名走 `fakeip`,未知域名也走 `fakeip`,在匹配 `rule_set:cnip` 规则时会先由国外 DNS 解析且配置 `client_subnet` 提高了兼容性,解析出 IP 在国内则走 `国内 IP` 规则,否则走 `漏网之鱼` 规则(有效解决了“心理 DNS 泄露问题”,详见《[搭载 sing-boxr 内核配置 DNS 不泄露教程-ruleset 方案](https://proxy-tutorials.dustinwin.cc.cd/posts/dnsnoleaks-singboxr-ruleset/)》)
|
||||
- ② 推荐将 `client_subnet` 设置为当前宽带运营商分配的默认 DNS(可进入光猫或路由器拨号页面查看,或者前往[公共 DNS 大全](https://toolb.cn/publicdns)查询)的 IP 段,如默认 DNS 为 `211.137.58.20`,可设置为 `211.137.58.0/24`
|
||||
|
||||
```json
|
||||
@@ -398,10 +398,10 @@ sc
|
||||
按一下 Esc 键(退出键),输入英文冒号 `:`,继续输入 `wq` 并回车
|
||||
|
||||
## 六、 添加定时任务
|
||||
可参考《[ShellCrash 搭载 sing-boxr 内核的配置-ruleset 方案/添加定时任务](https://proxy-tutorials.dustinwin.us.kg/posts/toolsettings-shellcrash-singboxr-ruleset/#%E4%BA%8C-%E6%B7%BB%E5%8A%A0%E5%AE%9A%E6%97%B6%E4%BB%BB%E5%8A%A1)》
|
||||
可参考《[ShellCrash 搭载 sing-boxr 内核的配置-ruleset 方案/添加定时任务](https://proxy-tutorials.dustinwin.cc.cd/posts/toolsettings-shellcrash-singboxr-ruleset/#%E4%BA%8C-%E6%B7%BB%E5%8A%A0%E5%AE%9A%E6%97%B6%E4%BB%BB%E5%8A%A1)》
|
||||
|
||||
## 七、 设置部分
|
||||
1. 设置可参考《[ShellCrash 搭载 sing-boxr 内核的配置-ruleset 方案/设置部分](https://proxy-tutorials.dustinwin.us.kg/posts/toolsettings-shellcrash-singboxr-ruleset/#%E4%B8%89-%E8%AE%BE%E7%BD%AE%E9%83%A8%E5%88%86)》,此处只列举配置的不同之处
|
||||
1. 设置可参考《[ShellCrash 搭载 sing-boxr 内核的配置-ruleset 方案/设置部分](https://proxy-tutorials.dustinwin.cc.cd/posts/toolsettings-shellcrash-singboxr-ruleset/#%E4%B8%89-%E8%AE%BE%E7%BD%AE%E9%83%A8%E5%88%86)》,此处只列举配置的不同之处
|
||||
2. 进入 ShellCrash 配置脚本 → 2) 功能设置 → 2) DNS 设置 → 9) 修改 DNS 服务器,设置如下:
|
||||
<img src="/assets/img/dns/dns-null.png" alt="设置部分 2" width="60%" />
|
||||
|
||||
@@ -431,8 +431,8 @@ sed -i 's/log dns ntp certificate experimental/log dns ntp certificate http_clie
|
||||
```
|
||||
|
||||
## 八、 访问 Dashboard 面板
|
||||
1. 打开 zashboard 在线面板地址 <http://board.zash.run.place> 后,可直接在“[Clash API](https://sing-boxr.dustinwin.us.kg/zh/configuration/experimental/clash-api/)”标签里将“主机”修改为 `192.168.31.1`,点击“提交”即可访问 Dashboard
|
||||
2. 进入设置 → 后端设置,点击“+”图标,切换到“[sing-box API](https://sing-boxr.dustinwin.us.kg/zh/configuration/service/api/)”标签,将“主机”和“端口分别修改为 `192.168.31.1` 和 `9999` 并点击“提交”
|
||||
1. 打开 zashboard 在线面板地址 <http://board.zash.run.place> 后,可直接在“[Clash API](https://sing-boxr.dustinwin.cc.cd/zh/configuration/experimental/clash-api/)”标签里将“主机”修改为 `192.168.31.1`,点击“提交”即可访问 Dashboard
|
||||
2. 进入设置 → 后端设置,点击“+”图标,切换到“[sing-box API](https://sing-boxr.dustinwin.cc.cd/zh/configuration/service/api/)”标签,将“主机”和“端口分别修改为 `192.168.31.1` 和 `9999` 并点击“提交”
|
||||
3. 通过切换后端配置可以分别使用 Clash API(支持“代理提供商”和“规则提供商”的更新)和 sing-box API Dashboard 面板
|
||||
|
||||
> 推荐设置
|
||||
|
||||
@@ -14,11 +14,11 @@ tags: [sing-box, sing-boxr, ShellCrash, AdGuard Home, ruleset, rule_set, 分享,
|
||||
4. 此方案适用于 ShellCrash(以 ARM64 架构为例,且安装路径为 `/data/ShellCrash`{: .filepath})
|
||||
5. 此方案适用于 AdGuard Home(以 ARM64 架构为例,且安装路径为 `/data/AdGuardHome`{: .filepath})
|
||||
6. 此方案不建议启用 ShellCrash 配置脚本 → 2) 功能设置 → 3) 透明路由流量过滤 → 2) 过滤局域网设备,因不经过内核的设备在访问 `漏网之鱼` 域名时会遇到无法访问的情况
|
||||
7. 本人将路由器设置了每天早上 6 点重启,使得《[六](https://proxy-tutorials.dustinwin.us.kg/posts/share-shellcrashadguardhome-singboxr-ruleset/#%E5%85%AD-%E6%B7%BB%E5%8A%A0%E5%AE%9A%E6%97%B6%E4%BB%BB%E5%8A%A1)》中设置的定时任务生效
|
||||
7. 本人将路由器设置了每天早上 6 点重启,使得《[六](https://proxy-tutorials.dustinwin.cc.cd/posts/share-shellcrashadguardhome-singboxr-ruleset/#%E5%85%AD-%E6%B7%BB%E5%8A%A0%E5%AE%9A%E6%97%B6%E4%BB%BB%E5%8A%A1)》中设置的定时任务生效
|
||||
8. 本教程搭载 [sing-box 内核 reF1nd-Testing 版](https://github.com/reF1nd/sing-box/tree/reF1nd-testing)
|
||||
|
||||
## 一、 生成配置文件 .json 文件直链
|
||||
具体方法此处不再赘述,请看《[生成带有自定义出站和规则的 sing-boxr 配置文件直链-ruleset 方案](https://proxy-tutorials.dustinwin.us.kg/posts/link-singboxr-ruleset)》,贴一下我使用的配置:
|
||||
具体方法此处不再赘述,请看《[生成带有自定义出站和规则的 sing-boxr 配置文件直链-ruleset 方案](https://proxy-tutorials.dustinwin.cc.cd/posts/link-singboxr-ruleset)》,贴一下我使用的配置:
|
||||
|
||||
```json
|
||||
{
|
||||
@@ -257,7 +257,7 @@ sc
|
||||
- ① 推荐将 `client_subnet` 设置为当前宽带运营商分配的默认 DNS(可进入光猫或路由器拨号页面查看,或者前往[公共 DNS 大全](https://toolb.cn/publicdns)查询)的 IP 段,如默认 DNS 为 `211.137.58.20`,可设置为 `211.137.58.0/24`
|
||||
- ② 由于 ShellCrash 采用的 DNS 模式为 `mix`,**ShellCrash 传给 AdGuard Home 的国外域名对应 IP 为假 IP**,会导致 AdGuard Home 检查更新和下载更新 DNS 黑名单时失败
|
||||
- ③ `fakeip-filter` 中添加了 AdGuard Home 常用域名,包括:`adguardteam.github.io`(AdGuard Home 自带 DNS 黑名单下载域名)、`adrules.top`(常用广告拦截下载域名)、`anti-ad.net`(常用广告拦截下载域名)和 `static.adtidy.org`(AdGuard Home 检查更新域名)
|
||||
- ④ 不推荐使用自带更新去更新,推荐《[五](https://proxy-tutorials.dustinwin.us.kg/posts/share-shellcrashadguardhome-singboxr-ruleset/#%E4%BA%94-%E6%B7%BB%E5%8A%A0%E5%AE%9A%E6%97%B6%E4%BB%BB%E5%8A%A1)》中通过定时任务去自动更新(AdGuard Home 程序已被压缩,节省空间)
|
||||
- ④ 不推荐使用自带更新去更新,推荐《[五](https://proxy-tutorials.dustinwin.cc.cd/posts/share-shellcrashadguardhome-singboxr-ruleset/#%E4%BA%94-%E6%B7%BB%E5%8A%A0%E5%AE%9A%E6%97%B6%E4%BB%BB%E5%8A%A1)》中通过定时任务去自动更新(AdGuard Home 程序已被压缩,节省空间)
|
||||
<img src="/assets/img/share/update-adguardhome.png" alt="编辑 dns.json 文件" width="60%" />
|
||||
|
||||
```json
|
||||
@@ -309,7 +309,7 @@ sc
|
||||
{: .prompt-tip }
|
||||
|
||||
注:
|
||||
- ① 本 `dns` 配置中,国内域名走国内 DNS 解析,国外域名走 `fakeip`,未知域名也走 `fakeip`,在匹配 `rule_set:cnip` 规则时会先由国外 DNS 解析且配置 `client_subnet` 提高了兼容性,解析出 IP 在国内则走 `国内 IP` 规则,否则走 `漏网之鱼` 规则(有效解决了“心理 DNS 泄露问题”,详见《[搭载 sing-boxr 内核配置 DNS 不泄露教程-ruleset 方案](https://proxy-tutorials.dustinwin.us.kg/posts/dnsnoleaks-singboxr-ruleset/)》)
|
||||
- ① 本 `dns` 配置中,国内域名走国内 DNS 解析,国外域名走 `fakeip`,未知域名也走 `fakeip`,在匹配 `rule_set:cnip` 规则时会先由国外 DNS 解析且配置 `client_subnet` 提高了兼容性,解析出 IP 在国内则走 `国内 IP` 规则,否则走 `漏网之鱼` 规则(有效解决了“心理 DNS 泄露问题”,详见《[搭载 sing-boxr 内核配置 DNS 不泄露教程-ruleset 方案](https://proxy-tutorials.dustinwin.cc.cd/posts/dnsnoleaks-singboxr-ruleset/)》)
|
||||
- ② 推荐将 `client_subnet` 设置为当前宽带运营商分配的默认 DNS(可进入光猫或路由器拨号页面查看,或者前往[公共 DNS 大全](https://toolb.cn/publicdns)查询)的 IP 段,如默认 DNS 为 `211.137.58.20`,可设置为 `211.137.58.0/24`
|
||||
|
||||
```json
|
||||
@@ -408,8 +408,8 @@ sc
|
||||
<img src="/assets/img/share/task-adguardhome.png" alt="添加定时任务" width="60%" />
|
||||
|
||||
## 七、 ShellCrash 设置
|
||||
1. 设置可参考《[ShellCrash 搭载 sing-boxr 内核的配置-ruleset 方案/设置部分](https://proxy-tutorials.dustinwin.us.kg/posts/toolsettings-shellcrash-singboxr-ruleset/#%E4%B8%89-%E8%AE%BE%E7%BD%AE%E9%83%A8%E5%88%86)》,此处只列举配置的不同之处
|
||||
2. 进入 ShellCrash 配置脚本 → 2) 功能设置 → 2) DNS 设置 → 7 DNS 劫持端口,设置为“5353”(须完成《[七](https://proxy-tutorials.dustinwin.us.kg/posts/share-shellcrashadguardhome-singboxr-ruleset/#%E4%B8%83-%E5%AE%89%E8%A3%85-adguard-home)》后才可设置)
|
||||
1. 设置可参考《[ShellCrash 搭载 sing-boxr 内核的配置-ruleset 方案/设置部分](https://proxy-tutorials.dustinwin.cc.cd/posts/toolsettings-shellcrash-singboxr-ruleset/#%E4%B8%89-%E8%AE%BE%E7%BD%AE%E9%83%A8%E5%88%86)》,此处只列举配置的不同之处
|
||||
2. 进入 ShellCrash 配置脚本 → 2) 功能设置 → 2) DNS 设置 → 7 DNS 劫持端口,设置为“5353”(须完成《[七](https://proxy-tutorials.dustinwin.cc.cd/posts/share-shellcrashadguardhome-singboxr-ruleset/#%E4%B8%83-%E5%AE%89%E8%A3%85-adguard-home)》后才可设置)
|
||||
3. 进入 2) DNS 设置 → 9) 修改 DNS 服务器,设置如下:
|
||||
<img src="/assets/img/dns/dns-null.png" alt="设置部分 2" width="60%" />
|
||||
|
||||
@@ -463,11 +463,11 @@ EOF
|
||||
```
|
||||
|
||||
## 八、 AdGuard Home 设置
|
||||
设置可参考《[全网最详细的解锁 SSH ShellCrash 搭载 sing-boxr 内核搭配 AdGuard Home 安装和配置教程/AdGuard Home 配置](https://proxy-tutorials.dustinwin.us.kg/posts/pin-shellcrashadguardhome-singboxr/#2-adguard-home-%E9%85%8D%E7%BD%AE)》
|
||||
设置可参考《[全网最详细的解锁 SSH ShellCrash 搭载 sing-boxr 内核搭配 AdGuard Home 安装和配置教程/AdGuard Home 配置](https://proxy-tutorials.dustinwin.cc.cd/posts/pin-shellcrashadguardhome-singboxr/#2-adguard-home-%E9%85%8D%E7%BD%AE)》
|
||||
|
||||
## 九、 访问 Dashboard 面板
|
||||
1. 打开 zashboard 在线面板地址 <http://board.zash.run.place> 后,可直接在“[Clash API](https://sing-boxr.dustinwin.us.kg/zh/configuration/experimental/clash-api/)”标签里将“主机”修改为 `192.168.31.1`,点击“提交”即可访问 Dashboard
|
||||
2. 进入设置 → 后端设置,点击“+”图标,切换到“[sing-box API](https://sing-boxr.dustinwin.us.kg/zh/configuration/service/api/)”标签,将“主机”和“端口分别修改为 `192.168.31.1` 和 `9999` 并点击“提交”
|
||||
1. 打开 zashboard 在线面板地址 <http://board.zash.run.place> 后,可直接在“[Clash API](https://sing-boxr.dustinwin.cc.cd/zh/configuration/experimental/clash-api/)”标签里将“主机”修改为 `192.168.31.1`,点击“提交”即可访问 Dashboard
|
||||
2. 进入设置 → 后端设置,点击“+”图标,切换到“[sing-box API](https://sing-boxr.dustinwin.cc.cd/zh/configuration/service/api/)”标签,将“主机”和“端口分别修改为 `192.168.31.1` 和 `9999` 并点击“提交”
|
||||
3. 通过切换后端配置可以分别使用 Clash API(支持“代理提供商”和“规则提供商”的更新)和 sing-box API Dashboard 面板
|
||||
4. 打开 <http://miwifi.com:3000> 即可访问 AdGuard Home 面板
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ tags: [sing-box, sing-boxr, Windows, ruleset, rule_set, 分享]
|
||||
3. 本教程搭载 [sing-box 内核 reF1nd-Testing 版](https://github.com/reF1nd/sing-box/tree/reF1nd-testing)
|
||||
|
||||
## 一、 生成配置文件 .json 文件直链
|
||||
具体方法请参考《[生成带有自定义出站和规则的 sing-boxr 配置文件直链-ruleset 方案](https://proxy-tutorials.dustinwin.us.kg/posts/link-singboxr-ruleset)》,贴一下我使用的配置:
|
||||
具体方法请参考《[生成带有自定义出站和规则的 sing-boxr 配置文件直链-ruleset 方案](https://proxy-tutorials.dustinwin.cc.cd/posts/link-singboxr-ruleset)》,贴一下我使用的配置:
|
||||
- 注:推荐将 `client_subnet` 设置为当前宽带运营商分配的默认 DNS(可进入光猫或路由器拨号页面查看,或者前往[公共 DNS 大全](https://toolb.cn/publicdns)查询)的 IP 段,如默认 DNS 为 `211.137.58.20`,可设置为 `211.137.58.0/24`
|
||||
|
||||
```json
|
||||
@@ -289,7 +289,7 @@ tags: [sing-box, sing-boxr, Windows, ruleset, rule_set, 分享]
|
||||
{: .prompt-tip }
|
||||
|
||||
注:
|
||||
- ① 本 `dns` 配置中,国内域名走国内 DNS 解析,国外域名走 `fakeip`,未知域名也走 `fakeip`,在匹配 `rule_set:cnip` 规则时会先由国外 DNS 解析且配置 `client_subnet` 提高了兼容性,解析出 IP 在国内则走 `国内 IP` 规则,否则走 `漏网之鱼` 规则(有效解决了“心理 DNS 泄露问题”,详见《[搭载 sing-boxr 内核配置 DNS 不泄露教程-ruleset 方案](https://proxy-tutorials.dustinwin.us.kg/posts/dnsnoleaks-singboxr-ruleset/)》)
|
||||
- ① 本 `dns` 配置中,国内域名走国内 DNS 解析,国外域名走 `fakeip`,未知域名也走 `fakeip`,在匹配 `rule_set:cnip` 规则时会先由国外 DNS 解析且配置 `client_subnet` 提高了兼容性,解析出 IP 在国内则走 `国内 IP` 规则,否则走 `漏网之鱼` 规则(有效解决了“心理 DNS 泄露问题”,详见《[搭载 sing-boxr 内核配置 DNS 不泄露教程-ruleset 方案](https://proxy-tutorials.dustinwin.cc.cd/posts/dnsnoleaks-singboxr-ruleset/)》)
|
||||
- ② 推荐将 `client_subnet` 设置为当前宽带运营商分配的默认 DNS(可进入光猫或路由器拨号页面查看,或者前往[公共 DNS 大全](https://toolb.cn/publicdns)查询)的 IP 段,如默认 DNS 为 `211.137.58.20`,可设置为 `211.137.58.0/24`
|
||||
|
||||
```json
|
||||
@@ -388,7 +388,7 @@ Windows Registry Editor Version 5.00
|
||||
### 1. 导入内核和配置文件
|
||||
- ① 编辑本文文档,粘贴如下内容:
|
||||
注:
|
||||
- ➊ 将《[一](https://proxy-tutorials.dustinwin.us.kg/posts/share-windows-singboxr-ruleset/#%E4%B8%80-%E7%94%9F%E6%88%90%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6-json-%E6%96%87%E4%BB%B6%E7%9B%B4%E9%93%BE)》中生成的配置文件 .json 文件直链替换下面命令中的 `{.json 配置文件直链}`
|
||||
- ➊ 将《[一](https://proxy-tutorials.dustinwin.cc.cd/posts/share-windows-singboxr-ruleset/#%E4%B8%80-%E7%94%9F%E6%88%90%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6-json-%E6%96%87%E4%BB%B6%E7%9B%B4%E9%93%BE)》中生成的配置文件 .json 文件直链替换下面命令中的 `{.json 配置文件直链}`
|
||||
- ➋ 或删除此条命令,直接进入 `%PROGRAMFILES%\sing-box`{: .filepath} 文件夹,新建 config.json 文件并粘贴配置内容
|
||||
|
||||
```shell
|
||||
@@ -633,8 +633,8 @@ Windows Registry Editor Version 5.00
|
||||
- ➌ 若想开机启动 sing-boxr,可搜索“Windows 添加任务计划”教程自行添加
|
||||
|
||||
## 四、 访问 Dashboard 面板
|
||||
1. 打开 zashboard 在线面板地址 <http://board.zash.run.place> 可直接通过 [Clash API](https://sing-boxr.dustinwin.us.kg/zh/configuration/experimental/clash-api/) 的方式访问 Dashboard 面板
|
||||
2. 进入设置 → 后端设置,点击“+”图标,切换到“[sing-box API](https://sing-boxr.dustinwin.us.kg/zh/configuration/service/api/)”标签,将“端口”修改为 `9999` 并点击“提交”
|
||||
1. 打开 zashboard 在线面板地址 <http://board.zash.run.place> 可直接通过 [Clash API](https://sing-boxr.dustinwin.cc.cd/zh/configuration/experimental/clash-api/) 的方式访问 Dashboard 面板
|
||||
2. 进入设置 → 后端设置,点击“+”图标,切换到“[sing-box API](https://sing-boxr.dustinwin.cc.cd/zh/configuration/service/api/)”标签,将“端口”修改为 `9999` 并点击“提交”
|
||||
<img src="/assets/img/share/172-9090-dashboard-singbox-pc.png" alt="面板设置" width="60%" />
|
||||
|
||||
3. 通过切换后端配置可以分别使用 Clash API(支持“代理提供商”和“规则提供商”的更新)和 sing-box API Dashboard 面板
|
||||
|
||||
@@ -10,14 +10,14 @@ tags: [sing-box, sing-boxr, ShellCrash, ruleset, rule_set, 进阶, 本地, Route
|
||||
{: .prompt-tip }
|
||||
1. 本教程只适用于 [ShellCrash](https://github.com/juewuy/ShellCrash)
|
||||
2. 本教程**仅适合白名单模式**(没有命中规则的网络流量统统使用代理,适用于服务器线路网络质量稳定、快速,不缺服务器流量的用户)
|
||||
3. 本教程最终效果媲美《[生成带有自定义出站和规则的 sing-boxr 配置文件直链-ruleset 方案](https://proxy-tutorials.dustinwin.us.kg/posts/link-singboxr-ruleset)》(出站分组更直观,操作更方便)
|
||||
4. 若仅配置自定义出站和规则,可直接跳过《[二](https://proxy-tutorials.dustinwin.us.kg/posts/toolsettings-shellcrash-singboxr-local-ruleset/#%E4%BA%8C-%E5%AF%BC%E5%85%A5%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6)》
|
||||
3. 本教程最终效果媲美《[生成带有自定义出站和规则的 sing-boxr 配置文件直链-ruleset 方案](https://proxy-tutorials.dustinwin.cc.cd/posts/link-singboxr-ruleset)》(出站分组更直观,操作更方便)
|
||||
4. 若仅配置自定义出站和规则,可直接跳过《[二](https://proxy-tutorials.dustinwin.cc.cd/posts/toolsettings-shellcrash-singboxr-local-ruleset/#%E4%BA%8C-%E5%AF%BC%E5%85%A5%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6)》
|
||||
5. 提供者 providers.json、出站 outbounds.json 和规则 route.json 为合并模式(在基础配置上新增)
|
||||
6. 所有步骤完成后,请连接 SSH 后执行命令 `$CRASHDIR/start.sh restart` 生效
|
||||
7. 推荐使用 [Visual Studio Code](https://code.visualstudio.com/Download) 等专业编辑器来修改配置文件
|
||||
|
||||
## 一、 导入 [sing-box reF1nd 版内核](https://github.com/reF1nd/sing-box)
|
||||
可参考《[ShellCrash 搭载 sing-boxr 内核的配置-ruleset 方案/导入 sing-box reF1nd 版内核](https://proxy-tutorials.dustinwin.us.kg/posts/toolsettings-shellcrash-singboxr-ruleset/#%E4%B8%80-%E5%AF%BC%E5%85%A5-sing-box-reF1nd-%E7%89%88%E5%86%85%E6%A0%B8)》里的步骤进行操作
|
||||
可参考《[ShellCrash 搭载 sing-boxr 内核的配置-ruleset 方案/导入 sing-box reF1nd 版内核](https://proxy-tutorials.dustinwin.cc.cd/posts/toolsettings-shellcrash-singboxr-ruleset/#%E4%B8%80-%E5%AF%BC%E5%85%A5-sing-box-reF1nd-%E7%89%88%E5%86%85%E6%A0%B8)》里的步骤进行操作
|
||||
|
||||
## 二、 导入配置文件
|
||||
1. 进入 ShellCrash → 6 管理配置文件 → 1 在线生成配置文件 → 4 选取在线配置规则模版,选择 4 [ACL4SSR](https://acl4ssr-sub.github.io) 极简版(适合自建节点)
|
||||
|
||||
@@ -40,7 +40,7 @@ curl -sS -o /tmp/CrashCore.upx -L https://ghfast.top/https://github.com/DustinWi
|
||||
- ⑥ 内核加载完成后根据需要是否保留相关数据库文件(此处选择“0) 不保留”)
|
||||
|
||||
3. 进入 2) 功能设置 → 2) DNS 设置 → 9) 修改 DNS 服务器,选择“4) 一键配置加密 DNS”
|
||||
- ① 推荐设置 DNS 分流,请看《[搭载 mihomo 内核进行 DNS 分流教程-geodata 方案](https://proxy-tutorials.dustinwin.us.kg/posts/dnsbypass-mihomo-geodata)》
|
||||
- ① 推荐设置 DNS 分流,请看《[搭载 mihomo 内核进行 DNS 分流教程-geodata 方案](https://proxy-tutorials.dustinwin.cc.cd/posts/dnsbypass-mihomo-geodata)》
|
||||
- ② 进入 2) 功能设置 → 5) 启用域名嗅探,选择“1) 是”
|
||||
|
||||
4. 进入主菜单 → 4 启动设置,启用“1) 开机自启动”
|
||||
@@ -50,15 +50,15 @@ curl -sS -o /tmp/CrashCore.upx -L https://ghfast.top/https://github.com/DustinWi
|
||||
8. 进入主菜单 → 9) 更新与支持 → 2) 切换/更新内核文件 → 6) 使用自定义内核 → 9) 自定义内核链接,输入导入内核命令里的链接并回车,选择“2) Singbox-reF1nd”
|
||||
9. 进入 9) 更新与支持 → 4) 安装/更新本地Dashboard面板,推荐安装“1) 安装 zashboard 面板”
|
||||
10. 导入配置文件
|
||||
- ① 进入主菜单 → 6) 配置文件管理 → a) 添加提供者 → 1) 设置名称或代号,如输入“sing-boxr”;后进入 2) 设置链接或路径,粘贴《[生成带有自定义出站和规则的 sing-boxr 配置文件直链-ruleset 方案](https://proxy-tutorials.dustinwin.us.kg/posts/link-singboxr-ruleset)》中生成的 .yaml 配置文件直链,选择“a) 保存此提供者”
|
||||
- ① 进入主菜单 → 6) 配置文件管理 → a) 添加提供者 → 1) 设置名称或代号,如输入“sing-boxr”;后进入 2) 设置链接或路径,粘贴《[生成带有自定义出站和规则的 sing-boxr 配置文件直链-ruleset 方案](https://proxy-tutorials.dustinwin.cc.cd/posts/link-singboxr-ruleset)》中生成的 .yaml 配置文件直链,选择“a) 保存此提供者”
|
||||
- ② 进入 6) 配置文件管理 → c) 在线生成配置文件 → 6) 自定义浏览器 UA,选择“2) 不使用 UA”
|
||||
- ③ 进入 6) 配置文件管理 → 1) sing-boxr,选择“e) 在线获取此配置文件”,启动服务即可
|
||||
|
||||
11. 访问 Dashboard 面板
|
||||
- ① 打开 <http://192.168.31.1:9090/dashboard/> 后,直接在“[Clash API](https://sing-boxr.dustinwin.us.kg/zh/configuration/experimental/clash-api/)”标签里将“主机”和“端口”分别修改为 `192.168.31.1` 和 `9999`,点击“提交”即可访问 Dashboard 面板
|
||||
- ① 打开 <http://192.168.31.1:9090/dashboard/> 后,直接在“[Clash API](https://sing-boxr.dustinwin.cc.cd/zh/configuration/experimental/clash-api/)”标签里将“主机”和“端口”分别修改为 `192.168.31.1` 和 `9999`,点击“提交”即可访问 Dashboard 面板
|
||||
<img src="/assets/img/tools/192-9999-dashboard-singbox_1.png" alt="设置部分 2" width="60%" />
|
||||
|
||||
- ② 进入 Dashboard 面板 → 设置 → 后端设置,点击“+”图标,切换到“[sing-box API](https://sing-boxr.dustinwin.us.kg/zh/configuration/service/api/)”标签,将“主机”修改为 `192.168.31.1` 并点击“提交”
|
||||
- ② 进入 Dashboard 面板 → 设置 → 后端设置,点击“+”图标,切换到“[sing-box API](https://sing-boxr.dustinwin.cc.cd/zh/configuration/service/api/)”标签,将“主机”修改为 `192.168.31.1` 并点击“提交”
|
||||
<img src="/assets/img/tools/192-9999-dashboard-singbox_2.png" alt="设置部分 3" width="60%" />
|
||||
|
||||
- ③ 通过切换后端配置可以分别使用 Clash API(支持“代理提供商”和“规则提供商”的更新)和 sing-box API Dashboard 面板
|
||||
|
||||
@@ -12,7 +12,7 @@ tags: [Clash, mihomo, Windows, ruleset, rule-set, 分享]
|
||||
2. 此方案采用**裸核**的方式运行,更加精简
|
||||
|
||||
## 一、 生成配置文件 .yaml 文件直链
|
||||
具体方法请参考《[生成带有自定义策略组和规则的 mihomo 配置文件直链-ruleset 方案](https://proxy-tutorials.dustinwin.us.kg/posts/link-mihomo-ruleset)》,贴一下我使用的配置:
|
||||
具体方法请参考《[生成带有自定义策略组和规则的 mihomo 配置文件直链-ruleset 方案](https://proxy-tutorials.dustinwin.cc.cd/posts/link-mihomo-ruleset)》,贴一下我使用的配置:
|
||||
|
||||
```yaml
|
||||
proxy-providers:
|
||||
@@ -290,7 +290,7 @@ rules:
|
||||
{: .prompt-tip }
|
||||
|
||||
注:
|
||||
- ① 本 `dns` 配置中,国内域名走国内 DNS 解析,国外域名走 `fake-ip`,未知域名也走 `fake-ip`,在匹配 `RULE-SET:cn` 规则时会由国外 DNS 解析且配置 `ecs` 提高了兼容性,解析出 IP 在国内则走 `国内 IP` 规则,否则走 `漏网之鱼` 规则(有效解决了“心理 DNS 泄露问题”,详见《[搭载 mihomo 内核配置 DNS 不泄露教程-ruleset 方案](https://proxy-tutorials.dustinwin.us.kg/posts/dnsnoleaks-mihomo-ruleset/)》)
|
||||
- ① 本 `dns` 配置中,国内域名走国内 DNS 解析,国外域名走 `fake-ip`,未知域名也走 `fake-ip`,在匹配 `RULE-SET:cn` 规则时会由国外 DNS 解析且配置 `ecs` 提高了兼容性,解析出 IP 在国内则走 `国内 IP` 规则,否则走 `漏网之鱼` 规则(有效解决了“心理 DNS 泄露问题”,详见《[搭载 mihomo 内核配置 DNS 不泄露教程-ruleset 方案](https://proxy-tutorials.dustinwin.cc.cd/posts/dnsnoleaks-mihomo-ruleset/)》)
|
||||
- ② 推荐将 `ecs` 设置为当前宽带运营商分配的默认 DNS(可进入光猫或路由器拨号页面查看,或者前往[公共 DNS 大全](https://toolb.cn/publicdns)查询)的 IP 段,如默认 DNS 为 `211.137.58.20`,可设置为 `211.137.58.0/24`
|
||||
|
||||
```yaml
|
||||
@@ -388,7 +388,7 @@ Windows Registry Editor Version 5.00
|
||||
### 1. 导入内核和配置文件
|
||||
- ① 编辑本文文档,粘贴如下内容:
|
||||
注:
|
||||
- ➊ 将《[一](https://proxy-tutorials.dustinwin.us.kg/posts/share-windows-mihomo-ruleset/#%E4%B8%80-%E7%94%9F%E6%88%90%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6-yaml-%E6%96%87%E4%BB%B6%E7%9B%B4%E9%93%BE)》中生成的配置文件 .yaml 文件直链替换下面命令中的 `{.yaml 配置文件直链}`
|
||||
- ➊ 将《[一](https://proxy-tutorials.dustinwin.cc.cd/posts/share-windows-mihomo-ruleset/#%E4%B8%80-%E7%94%9F%E6%88%90%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6-yaml-%E6%96%87%E4%BB%B6%E7%9B%B4%E9%93%BE)》中生成的配置文件 .yaml 文件直链替换下面命令中的 `{.yaml 配置文件直链}`
|
||||
- ➋ 或者删除此条命令,直接进入 `%PROGRAMFILES%\mihomo`{: .filepath} 文件夹,新建 config.yaml 文件并粘贴配置内容
|
||||
|
||||
```shell
|
||||
|
||||
Reference in New Issue
Block a user