fleet-client-address-1348
Fleet apps see the client the hub saw, not the hub (#1348)
Fleet and -tunnel apps behind a hub saw the hub's address as the client, so Rails request.remote_ip, Rack::Attack and per-IP limits treated every visitor as one. The hub already writes X-Forwarded-For itself for every request it sends down a tunnel (tunnelRewrite); the box's edge threw it away and wrote the tunnel peer.
Now, for a request that arrived over a tunnel the box dialled (tunnelclient's own context mark):
- the app gets the hub's chain when every entry is an IP (hubVisitor, the rule linked deployments already used), else the peer as before;
- the password gate's attempt limiter keys on the chain's last entry.
Off a tunnel nothing changes. The hub is unchanged; only fleet boxes need the new build.
Docs: rootfs "The visitor's address", Rails guide pointer (Luna copy pass, delegated). Census proposal fleet-client-address-1348. Tests: internal/edge/tunnelclientaddr_test.go (real hub edge, tunnel loop, box edge; plain HTTP and a WebSocket upgrade; fallbacks and gate keys).
🤖 Generated with Claude Code
Discussions
- No discussions on this branch yet.
Tasks
- No tasks yet.
Activity
- paul@keymail.dev pushed ed9d66c31 Merge remote-tracking branch 'origin/main' into fleet-client-address-1348
- paul@keymail.dev pushed 20aa33e95 Merge remote-tracking branch 'origin/main' into fleet-client-address-1348
- paul@keymail.dev pushed 2a7178532 Merge remote-tracking branch 'origin/main' into fleet-client-address-1348
- paul@keymail.dev pushed 186554301 edge tests: gate bucket checks fire their attempts at once (#1348)
- paul@keymail.dev pushed 867cb78e1 edge: hop acceptance and the tunnel visitor in one helper (#1348)
- paul@keymail.dev pushed e53b5841c review: Astra round 1 for #1348, READY
- paul@keymail.dev pushed 69f84d5cd review: Astra brief for #1348, round 1
- paul@keymail.dev pushed 387a5e379 docs, census: what a fleet app's visitor address is (#1348)
- paul@keymail.dev pushed 4171cb10a edge: tunnelled apps see the client the hub saw (#1348)