mirror of
https://github.com/tailscale/tailscale.git
synced 2026-12-01 06:02:32 -08:00
* cmd/k8s-proxy,ipn/ipnlocal,k8s-operator/api-proxy: drop PROXY protocol The API server proxy in cmd/k8s-proxy took the caller's address from the PROXY protocol header on its localhost listener, which any local process could write. This fixes this by removing the header from both sides, and making serve register each non-Funnel TCP forward to a loopback address with the proxy mapper (as netstack does), so WhoIs on the connection's real remote address returns the caller. Updates tailscale/corp#48697 Thank you Winfunc for reporting Signed-off-by: chaosinthecrd <[email protected]> * ipn/ipnlocal,k8s-operator/api-proxy: add WhoIs and forged header tests Adds a test that WhoIs on the backend side of a serve TCP forward returns the source node while the forward is open and fails after it closes, for IPv4, IPv6 and localhost targets, and that a Funnel flow or a backend on a non-loopback address gets no node. Also adds a test that the API server proxy's plain HTTP listener does not take the caller from a PROXY header that a local client writes. Updates tailscale/corp#48697 Signed-off-by: chaosinthecrd <[email protected]> --------- Signed-off-by: chaosinthecrd <[email protected]>