Skip to content

fix(egress): allow duplicate undetected addresses#9

Merged
ZaneL1u merged 2 commits into
mainfrom
agent/fix-egress-ip-uniqueness
Jul 13, 2026
Merged

fix(egress): allow duplicate undetected addresses#9
ZaneL1u merged 2 commits into
mainfrom
agent/fix-egress-ip-uniqueness

Conversation

@ZaneL1u

@ZaneL1u ZaneL1u commented Jul 13, 2026

Copy link
Copy Markdown
Owner

变更

  • 新增 SQLite 增量迁移,移除 egress_ips.ip_address 的唯一约束
  • 保留 ip_address 非空约束、全部出口数据、主机绑定和外键行为
  • API 允许尚未检测的空 IP,并拒绝非法的非空 IP
  • 管理后台不再把空 IP 改写为 0.0.0.0

根因

egress_ips.id 已经是资源主键,但 ip_address 仍被错误设为唯一字段。管理后台又会给所有尚未检测的代理线路写入相同的 0.0.0.0,导致第二条线路创建失败;多个线路共享同一真实出口 IP 时也会发生相同冲突。

验证

  • go test ./...
  • go test $(go list ./... | rg -v '/tests/e2e$') -race -shuffle=on -count=1
  • go test ./tests/e2e/... -count=1
  • go vet ./...
  • pnpm test:unit
  • pnpm build

pnpm typecheck 的剩余错误均可在 origin/main 复现,本次未新增类型错误。

@ZaneL1u ZaneL1u merged commit bb6828e into main Jul 13, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant