tailscale.comtailscale.com/control/controlhttp/controlhttpserver Index | Files

package controlhttpserver

import "tailscale.com/control/controlhttp/controlhttpserver"

Package controlhttpserver contains the HTTP server side of the ts2021 control protocol.

Index

Functions

func AcceptHTTP

func AcceptHTTP(ctx context.Context, w http.ResponseWriter, r *http.Request, private key.MachinePrivate, earlyWrite func(protocolVersion int, w io.Writer) error) (*controlbase.Conn, error)

AcceptHTTP upgrades the HTTP request given by w and r into a Tailscale control protocol base transport connection.

AcceptHTTP always writes an HTTP response to w. The caller must not attempt their own response after calling AcceptHTTP.

earlyWrite optionally specifies a func to write to the noise connection (encrypted). It receives the negotiated version and a writer to write to, if desired.

Source Files

controlhttpserver.go

Version
v1.84.0 (latest)
Published
May 21, 2025
Platform
linux/amd64
Imports
15 packages
Last checked
1 day ago

Tools for package owners.