diff --git a/projects/25464650-ed5d-440e-b362-190f2852d451/Checkpoint 2026-09-30 02-44-56 UTC [0aad732800].md b/projects/25464650-ed5d-440e-b362-190f2852d451/Checkpoint 2026-09-30 02-44-56 UTC [0aad732800].md new file mode 100644 index 0000000..e670371 --- /dev/null +++ b/projects/25464650-ed5d-440e-b362-190f2852d451/Checkpoint 2026-09-30 02-44-56 UTC [0aad732800].md @@ -0,0 +1,40 @@ +--- +title: Checkpoint 2026-09-30 02:44:56 UTC [0aad732800] +type: checkpoint +permalink: main/projects/25464650-ed5d-440e-b362-190f2852d451/checkpoint-2026-09-30-02-44-56-utc-0aad732800 +stable_id: 2734590b-d531-434a-8dce-1d6098829ae3 +scope: project +memory_type: checkpoint +project_id: 25464650-ed5d-440e-b362-190f2852d451 +usage_profile_id: 0c9feb46-d06e-43cd-9ef0-c5813c84a998 +status: active +revision: 1 +request_id: fix2-register-ip-20260930-checkpoint +created_at: '2026-09-30T02:44:56.888336+00:00' +updated_at: '2026-09-30T02:44:56.888336+00:00' +tags: +- ready-to-merge +- fix-2 +- feat/fix-2-register-ip +--- + +# fix issue #2 · 自助注册接入 trusted_proxies + +## 完成 +- 分支 `feat/fix-2-register-ip`,commit `73ee4e74c7bcd493891c655f2f9315b6e7850dea`,已推送 origin(未合 main、未关 issue)。 +- 工作树 `e:\\code\\NixMsg-wt\\fix2`,基线 `origin/main@479a08e`。 + +## 修法 +`cmd/nixmsg/serve.go` 在 `identity.New` 注入与管理接口相同的 `httpx.ClientIP(r, trustedNets)`,注册安全码锁定按真实客户端 IP 计;非信任代理不采信 XFF。不改锁定阈值与注册语义。 + +## 文件 +- `cmd/nixmsg/serve.go` +- `internal/app/identity/register_test.go`(`TestRegisterTrustedProxyClientIPLock`) +- `docs/DEVIATIONS.md`(追加 `### fix-issue-2`) + +## 验证 +`go test ./internal/app/identity/ ./internal/httpx/ ./cmd/nixmsg/ -count=1` 全绿。未跑全仓 task check。 + +## 给下个会话 +- 总控可审阅后 ff-only 合 main;勿强推 main。 +- 主工作区 `e:\\code\\NixMsg` 未改。