This repository has been archived on 2026-11-24. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
radiance-sycl/core/server
fl0l0u b6acbd69e4 server: name the caller a vouched proxy carried, without arming the guard
An operator running radiance behind a reverse proxy sees one address in
every log line: the proxy's. --trusted-proxy CIDR (repeatable) vouches
for the networks whose sockets may say who they carried. An
X-Forwarded-For from inside a vouched network is walked from the right:
vouched hops are skipped, the first address no vouched CIDR covers is
the caller, a chain of only vouched hops ends at its leftmost, and
anything else falls back to the socket. From an unvouched socket the
header names no one, because it has not been vouched for.

Attribution is not authority, and the split that keeps them apart is
mechanical. HttpRequest carries `peer`, the attributed caller, sanitized
where it is built because a named address arrives in a header and the
log keeps no client text otherwise -- and `raw_peer`, the socket as the
kernel saw it, which is now the only address peer_is_loopback() reads.
A proxy on loopback therefore hands the keyless loopback-only routes to
none of its clients; it only names them where the proxy used to stand.
transport_test pins both halves: the walk at the unit level, and over a
real socket that a vouched proxy plus X-Forwarded-For leaves the
loopback guard answering 200 and the cross-origin 403 untouched.

httplib's own set_trusted_proxies -- new this side of the vendor bump --
is deliberately unarmed. It rewrites req.remote_addr, the very field the
guards would read as the socket peer, so one over-broad vouched network
would move the guard rather than the log line. Radiance reads the header
itself, and ip_in_cidr refuses across families: a vouched ::ffff:0:0/96
vouches for no IPv4 socket. Config rejects anything but a numeric
network with a prefix at startup, because a typo there would silently
unvouch a proxy; the refusals the transport answers before the router
log the attributed caller too, so the audit trail stays one line per
request whoever the socket belongs to.
2026-10-31 07:50:43 +01:00
..
2026-10-24 13:12:28 +02:00
2026-10-30 22:01:01 +01:00
2026-10-30 10:22:53 +01:00
2026-10-16 18:25:18 +02:00
2026-10-16 18:25:18 +02:00
2026-10-30 22:01:01 +01:00
2026-10-30 22:01:01 +01:00
2026-10-12 11:46:14 +02:00
2026-10-29 12:04:24 +01:00
2026-10-20 21:05:16 +02:00
2026-10-20 21:05:16 +02:00
2026-10-30 22:01:01 +01:00
2026-10-18 11:38:37 +02:00
2026-10-16 18:25:18 +02:00
2026-10-16 18:25:18 +02:00
2026-10-16 18:25:18 +02:00
2026-10-30 22:01:01 +01:00
2026-10-30 22:01:01 +01:00
2026-10-18 11:38:37 +02:00
2026-10-18 11:38:37 +02:00