fix: 全面修订技术文档 — 修复 P0/P1/P2 共 16 项审查问题

P0(必须修复):
- 技术/index.md: Web 服务 NPM → Caddy,补充服务列表和域名
- 旁路由部署.md: VPS OS CentOS → Debian,补全安装命令
- 旁路由部署.md: 新增 systemd-resolved DNS 端口冲突解决步骤
- mkdocs.yml: 删除冗余 index.md 子项,空分类用简单链接
- artalk评论系统.md: docker-compose.yml 补全环境变量

P1(建议修复):
- Linux.md: 区分旁路由本机 vs 局域网其他机器两种场景
- Android.md: 移除不支持的 Clash Meta,添加私人 DNS 冲突警告
- macOS.md: 终端命令补注视说明占位符需替换
- 旅行/index.md: 添加赛里木湖 2026 游记链接
- mkdocs部署.md: 补充 Docker 网络创建、首次启动、LE 邮箱配置
- artalk评论系统.md: 修正环境变量与配置文件矛盾说明

P2(优化):
- 首页: 添加评论区说明、修正 Immich 链接为公网域名
- 旁路由部署.md: 加固有章节目录(无锚点纯文本)
- 摄影/3D打印/日记 index.md: 充实引导内容
- 新增 Immich 部署文档
- 统一 callout 风格: ?> 改为 !!! tip
- GitHub Stars 加时间限定 (截至 2026 年 6 月)
This commit is contained in:
2026-06-04 11:58:36 +08:00
parent 155b347d3f
commit 88967a238f
15 changed files with 295 additions and 61 deletions
+52 -6
View File
@@ -2,6 +2,20 @@
> 用一台 Ubuntu 机器做旁路由,实现全家翻墙 + DNS 去广告。基于 sing-boxVLESS + Reality)和 AdGuard Home。
## 目录
1. **概述** — 什么是旁路由、架构图
2. **一、部署教程** — 6 步完成旁路由搭建
- 1.1 前置条件
- 1.2 本机网络配置(静态 IP、IP 转发)
- 1.3 VPS 服务端(sing-box 安装、Reality 配置)
- 1.4 本机客户端(sing-box 入站 + 路由规则)
- 1.5 DNS 端口冲突解决(systemd-resolved
- 1.6 AdGuard HomeDocker 部署、过滤规则)
- 1.7 各设备接入
3. **二、使用教程** — 日常管理、故障排查
4. **三、踩坑笔记** — TProxy 为什么不用、DNS 劫持等
---
## 概述
@@ -52,7 +66,7 @@ graph TD
### 1.1 前置条件
- 一台 24 小时开机的 Linux 设备(本例 Ubuntu 24.04),已接入局域网
- 一台境外 VPS(本例香港 CentOS Stream 9
- 一台境外 VPS(本例 Debian 12,位于香港
- 一个域名(用于 Reality 伪装,本例 `www.microsoft.com` 作为 SNI
### 1.2 步骤一:配置旁路由本机网络
@@ -97,12 +111,22 @@ sudo sysctl -p /etc/sysctl.d/99-bypass.conf
#### 安装 sing-box
```bash
# VPS 上执行(CentOS Stream 9 示例
# 官方安装脚本
# VPS 上执行(Debian 12,其他发行版参见官方文档
# 安装依赖
sudo apt update && sudo apt install -y curl ca-certificates
# 添加官方源
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://sing-box.app/gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/sing-box.gpg
# 具体安装方式参见 https://sing-box.sagernet.org/installation/
echo "deb [signed-by=/etc/apt/keyrings/sing-box.gpg] https://sing-box.app/deb /" | sudo tee /etc/apt/sources.list.d/sing-box.list
# 安装并启用
sudo apt update && sudo apt install -y sing-box
sudo systemctl enable sing-box
```
> 其他发行版(CentOS/Fedora)的安装方式参见 [sing-box 官方文档](https://sing-box.sagernet.org/installation/)。
#### 生成 Reality 密钥
```bash
@@ -243,7 +267,29 @@ curl --socks5 127.0.0.1:7890 https://www.google.com -o /dev/null -s -w '%{http_c
# 返回 200 或 301/302 即成功
```
### 1.5 步骤四:部署 AdGuard Home
### 1.5 步骤四:解决 DNS 端口冲突
Ubuntu 24.04 默认运行 `systemd-resolved`,占用 `127.0.0.53:53`。AdGuard Home 需要绑定 `0.0.0.0:53`,必须先释放 53 端口:
```bash
# 禁用 systemd-resolved 的 DNS stub listener
sudo sed -i 's/#DNSStubListener=yes/DNSStubListener=no/' /etc/systemd/resolved.conf
sudo systemctl restart systemd-resolved
# 确认 53 端口已释放(应该无输出)
sudo ss -tuln | grep ':53 '
```
> 如果 `ss` 命令仍有输出(说明其他进程占用 53 端口),用 `sudo lsof -i :53` 排查。
同时确保 `/etc/resolv.conf` 指向有效的 DNS 服务器:
```bash
# 如果 /etc/resolv.conf 指向 127.0.0.53,暂时改为公共 DNS
echo 'nameserver 223.5.5.5' | sudo tee /etc/resolv.conf
```
### 1.6 步骤五:部署 AdGuard Home
用 Docker 启动 AdGuard Home,统一管理局域网 DNS 并过滤广告。
@@ -297,7 +343,7 @@ docker run -d \
https://dns.quad9.net/dns-query
```
### 1.6 步骤:各设备接入
### 1.7 步骤:各设备接入
部署完成后,各终端设备需要配置 DNS 和代理才能使用旁路由。每个平台的设置方式不同,详见各平台使用指南: