From e4b527b2c9ac6f5b6b2aa0a8cb6e313216a17d22 Mon Sep 17 00:00:00 2001 From: wangjia <809946525@qq.com> Date: Thu, 23 Jul 2026 07:45:38 +0800 Subject: [PATCH] =?UTF-8?q?docs(agent):=20=E4=B8=8A=E7=BA=BF=E9=AA=8C?= =?UTF-8?q?=E6=94=B6=E8=A1=A5=E3=80=8Clive=20=E7=94=9F=E6=95=88=E6=A0=B8?= =?UTF-8?q?=E5=AE=9E=E3=80=8D=E4=B8=8E=E3=80=8C=E5=9F=9F=E5=90=8D+?= =?UTF-8?q?=E8=A3=B8IP=20=E5=8F=8C=E5=BD=A2=E5=BC=8F=E6=B5=8B=E5=8F=A6?= =?UTF-8?q?=E4=B8=80=E8=B4=A6=E5=8F=B7=E8=A2=AB=E6=8B=92=E3=80=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit C1 指出 config.json 内容正常不等于线上生效——SIGHUP 走 sing-box 自身校验,若 新配置被拒,它会保留旧实例继续跑,agent 侧仍记"渲染成功"。第 4 步补 systemctl is-active sing-box + journalctl -u sing-box -n5 | grep -v FATAL。 I3 表明 ip_cidr 目的地存在域名形式绕过口子(已修),第 6 步"另一账号被拒"补充 必须分别用域名和裸 IP 两种目的地表达形式各测一遍,只测一种形式验证不到位。 Co-Authored-By: Claude Opus 4.8 --- docs/superpowers/plans/2026-07-23-private-dest-acl.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/superpowers/plans/2026-07-23-private-dest-acl.md b/docs/superpowers/plans/2026-07-23-private-dest-acl.md index bfe16d7..68df1ef 100644 --- a/docs/superpowers/plans/2026-07-23-private-dest-acl.md +++ b/docs/superpowers/plans/2026-07-23-private-dest-acl.md @@ -1231,9 +1231,12 @@ git commit -m "docs(agent): 私有目的地 ACL 配置样例与常驻校验测 ``` 2. 写 `/etc/pangolin-agent/acl.json`(权限 `0600`,属主 `pangolin`),`systemctl reload pangolin-agent`。 3. `journalctl -u pangolin-agent -n 30` 确认已重渲染、无 `[acl] ERROR` / `[acl] ALERT`。 -4. `sudo python3 -c "import json;print(json.load(open('/etc/sing-box/config.json'))['route'])"` 确认规则顺序为 sniff → 放行 → 拒绝 → warp。 +4. `sudo python3 -c "import json;print(json.load(open('/etc/sing-box/config.json'))['route'])"` 确认规则顺序为 sniff → resolve → 放行 → 拒绝 → warp(resolve 见 I3:堵住 ip_cidr 目的地的域名形式绕过)。 + **`config.json` 内容正常不等于线上生效**——SIGHUP 走的是 sing-box 自身校验,若新配置被 sing-box 拒绝,它会保留旧实例继续跑,agent 侧仍记"渲染成功"。reload 后必须额外确认: + - `systemctl is-active sing-box` → `active`; + - `journalctl -u sing-box -n5 | grep -v FATAL`(有 FATAL 说明 sing-box 拒绝了新配置,旧实例还在跑,config.json 上的内容其实没生效)。 5. **我的设备**:brain 首页 200、DSM 5001 可登录、`ssh nas-r` 通。 -6. **另一账号的设备**:以上全部被拒(连接被 reject,不是超时)。 +6. **另一账号的设备**:以上全部被拒(连接被 reject,不是超时)。**分别用域名和裸 IP 两种形式各测一遍**(如 `curl https://brain.51yanmei.com` 与 `curl --resolve brain.51yanmei.com:443:103.119.13.48 https://brain.51yanmei.com`;DSM 同理分别用 `nas.51yanmei.com:5001` 与 `182.92.213.171:5001`)——I3 表明目的地表达形式(域名 vs IP)会走到不同的 sing-box 匹配路径,只测一种形式验证不到位。 7. **公开站不受影响**:jiu / travel / sudoku / pay 在两个账号下均正常。 8. **WARP 未被破坏**:reddit 仍走 warp 出口。 9. **fail-closed 实证**:把 `acl.json` 改坏 → `systemctl reload pangolin-agent` → 规则仍在、日志有 ERROR;恢复文件。