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 <[email protected]>
This commit is contained in:
Adrian Dewhurst authored and Adrian Dewhurst committed 2026-08-04 14:43:31 -04:00
1 parent 21a3f6413a
commit 616dcd5378
1 file changed
+2 -1
+2 -1
View File
@@ -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)
}