Documentation
¶
Overview ¶
Package transport connects pool machines. It carries byte streams; join pinning and mutual TLS are layered above it.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DialContext ¶
DialContext adapts pool transports to net/http without moving TLS below the transport. Pool endpoints always use TCP.
Types ¶
type Tailscale ¶
type Tailscale struct{ Direct }
Tailscale uses system tailscaled (including clients managed by Headscale). It shares Direct's sockets: the OS routes tailnet addresses through the installed client. Userspace-only tailscaled networking is not supported.
func (Tailscale) CheckServe ¶
CheckServe checks the head's connection, MagicDNS and HTTPS capability without changing its Serve configuration or prompting interactively.
func (Tailscale) Serve ¶
Serve has tailscaled serve https://<this machine's tailnet name>:port/ to the tailnet, with a certificate for that name, from http://127.0.0.1:port, until Unserve. It returns that URL.
type Transport ¶
type Transport interface {
Listen(ctx context.Context, addr string) (net.Listener, error)
Dial(ctx context.Context, addr string) (net.Conn, error)
Address(ctx context.Context, port string) (string, error)
}
Transport provides the head's listener, a node's outbound connections, and the local address advertised in join tokens. Closing a listener or connection releases it; cancelling ctx interrupts Listen and Dial setup.
func ForAddress ¶
ForAddress selects the socket transport for an endpoint. System tailscaled handles routing, including DNS aliases and custom Headscale prefixes that look like ordinary TCP addresses. Wildcard listeners serve both LAN and tailnet interfaces without changing the token wire format.