summaryrefslogtreecommitdiffhomepage
path: root/ipn/localapi
diff options
context:
space:
mode:
authorBrad Fitzpatrick <bradfitz@tailscale.com>2024-03-06 15:06:59 -0800
committerBrad Fitzpatrick <bradfitz@tailscale.com>2024-03-07 20:57:33 -0800
commit3570a10e908f3abacecc975289413e2572510337 (patch)
tree4f8d31f91f5b4c475fa57c4204ecb21d9b4d28f8 /ipn/localapi
parent74e33b9c508566b188eeadf18087de6f14c96e95 (diff)
downloadtailscale-brafitz/remote-config.tar.xz
tailscale-brafitz/remote-config.zip
cmd/tailscale, ipn: add start of remote-config supportbrafitz/remote-config
Updates tailscale/corp#18043 Change-Id: I1d19e7ccb16ade93468cbc5698171e04f9539b76 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
Diffstat (limited to 'ipn/localapi')
-rw-r--r--ipn/localapi/localapi.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/ipn/localapi/localapi.go b/ipn/localapi/localapi.go
index f68f0a282..dd5b0c7bb 100644
--- a/ipn/localapi/localapi.go
+++ b/ipn/localapi/localapi.go
@@ -153,6 +153,16 @@ func NewHandler(b *ipnlocal.LocalBackend, logf logger.Logf, netMon *netmon.Monit
return &Handler{b: b, logf: logf, netMon: netMon, backendLogID: logID, clock: tstime.StdClock{}}
}
+func init() {
+ ipnlocal.NewC2NLocalAPIHandler = func(b *ipnlocal.LocalBackend, logf logger.Logf, netMon *netmon.Monitor, logID logid.PublicID) http.Handler {
+ h := NewHandler(b, logf, netMon, logID)
+ h.PermitRead, h.PermitWrite = true, true
+ h.PermitCert = false
+ h.ConnIdentity = &ipnauth.ConnIdentity{}
+ return h
+ }
+}
+
type Handler struct {
// RequiredPassword, if non-empty, forces all HTTP
// requests to have HTTP basic auth with this password.