From 616dcd53784e80711284e6223a8975fa16fe5d8b Mon Sep 17 00:00:00 2001 From: Adrian Dewhurst Date: Fri, 31 Jul 2026 16:54:23 -0400 Subject: [PATCH] feature/conn25: add app name to DoH query string To prepare for enforcing permission to access an app, it is extremely helpful if the client reports which app it expects the query is for, instead of making the connector check all possible matching apps. Updates tailscale/corp#40076 Change-Id: Ib41e0af4c0134d06dc4acda97a39c0a3adb88968 Signed-off-by: Adrian Dewhurst --- feature/conn25/conn25.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/feature/conn25/conn25.go b/feature/conn25/conn25.go index b3e8d21bc..b507b998b 100644 --- a/feature/conn25/conn25.go +++ b/feature/conn25/conn25.go @@ -17,6 +17,7 @@ import ( "iter" "net/http" "net/netip" + "net/url" "slices" "strings" "sync" @@ -180,7 +181,7 @@ func (e *extension) installHooks(dph *datapathHandler) error { if urlBase == "" { return "", nil } - return urlBase + "/dns-query", nil + return fmt.Sprintf("%s/dns-query?app=%s", urlBase, url.QueryEscape(app.Name)), nil }); err != nil { return fmt.Errorf("could not register DNS resolver scheme: %w", err) }