拆分旁路由使用教程为5个平台独立文档(Linux/Windows/macOS/Android/iPhone)

This commit is contained in:
2026-06-04 10:26:18 +08:00
parent 30142a7ba9
commit cdb7bc3508
7 changed files with 399 additions and 23 deletions
+66
View File
@@ -0,0 +1,66 @@
# Linux 旁路由使用指南
> 适用于 Ubuntu、Debian、Fedora 等桌面发行版。
---
## 接入旁路由
### 系统代理(GNOME
1. 打开 **设置 → 网络 → 代理**
2. 选择 **手动**
3. 填写:
| 字段 | 值 |
|------|-----|
| SOCKS 代理 | `127.0.0.1` |
| 端口 | `7890` |
?> DNS 会自动使用 AdGuard(因为旁路由本机 DNS 已设为 `127.0.0.1`)。
### 终端代理(可选)
如果需要在终端里走代理,设置环境变量:
```bash
export ALL_PROXY=socks5://127.0.0.1:7890
```
或者写入 `~/.bashrc` 持久化:
```bash
echo 'alias proxy="export ALL_PROXY=socks5://127.0.0.1:7890"' >> ~/.bashrc
echo 'alias unproxy="unset ALL_PROXY"' >> ~/.bashrc
```
用的时候 `proxy` 开启,`unproxy` 关闭。
---
## 验证
```bash
# 测试代理是否通
curl --socks5 127.0.0.1:7890 https://www.google.com -o /dev/null -s -w '%{http_code}'
# 返回 200 → 正常
# 测试 DNS 去广告
nslookup doubleclick.net
# 返回 0.0.0.0 → 广告域名已被拦截
```
---
## 服务管理
旁路由本机就是服务器,所以日常管理命令也在这里执行:
```bash
sudo systemctl restart sing-box # 重启翻墙
sudo systemctl status sing-box # 查看状态
sudo journalctl -u sing-box -f # 实时日志
docker restart adguardhome # 重启去广告
docker logs adguardhome -f # 去广告日志
```