controlhttpserver

package
v1.104.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 20, 2026 License: BSD-3-Clause Imports: 15 Imported by: 5 modules, 2 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

This section is empty.

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.

The provided ctx bounds the handshake: its deadline, if any, applies to the handshake I/O. The returned conn's lifetime is not otherwise bound to ctx; in particular, it survives net/http's cancellation of the request context when the calling handler returns. The caller owns the returned conn and must close it.

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.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL