feature/conn25: rename LocalAPI endpoint to conn25/state

Previously it was conn25-state. The new name prepares for the ability to
add new endpoints behind the conn25/ prefix, and prepares for parity for
an upcoming c2n endpoint with the same name.

Updates tailscale/corp#40125

Signed-off-by: Michael Ben-Ami <mzb@tailscale.com>
This commit is contained in:
Michael Ben-Ami
2026-07-22 13:04:41 -04:00
committed by mzbenami
parent 2820b5e99d
commit 8f89d4fb55
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -22,7 +22,7 @@ import (
"tailscale.com/util/testenv"
)
// serveLocalAPIStateGet serves the localapi endpoint /conn25-state.
// serveLocalAPIStateGet serves the localapi endpoint /conn25/state.
// See also [*Conn25.GetActiveState].
func serveLocalAPIStateGet(h *localapi.Handler, w http.ResponseWriter, r *http.Request) {
// TODO(tailscale/corp#39033): Remove for alpha release.
@@ -31,7 +31,7 @@ func serveLocalAPIStateGet(h *localapi.Handler, w http.ResponseWriter, r *http.R
return
}
if !h.PermitRead {
http.Error(w, "conn25-state access denied", http.StatusForbidden)
http.Error(w, "conn25/state access denied", http.StatusForbidden)
return
}
if r.Method != httpm.GET {
+1 -1
View File
@@ -85,7 +85,7 @@ func init() {
})
ipnlocal.RegisterPeerAPIHandler("/v0/connector/transit-ip", handleConnectorTransitIP)
ipnlocal.HookReplyToDNSQueries.Add(handleHookReplyToDNSQueries)
localapi.Register("conn25-state", serveLocalAPIStateGet)
localapi.Register("conn25/state", serveLocalAPIStateGet)
}
func handleConnectorTransitIP(h ipnlocal.PeerAPIHandler, w http.ResponseWriter, r *http.Request) {