direct

package
v0.149.3 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HandoffClaims

type HandoffClaims struct {
	jwt.RegisteredClaims
	Email    string `json:"email,omitempty"`
	OrgRole  string `json:"org_role,omitempty"`
	TokenUse string `json:"token_use"`
}

HandoffClaims are the JWT claims for browser direct-mode connections.

type Server

type Server struct {
	OnPTY ws.PTYHandler
	// contains filtered or unexported fields
}

Server is a lightweight HTTP server for direct-mode wing connections. Browsers connect directly to the wing via WebSocket, bypassing the relay for PTY I/O.

func (*Server) Addr added in v0.145.0

func (s *Server) Addr() net.Addr

Addr returns the bound address after Start or StartAsync succeeds.

func (*Server) Close

func (s *Server) Close() error

Close stops the listener and every upgraded direct WebSocket.

func (*Server) SetRelayPublicKey added in v0.145.0

func (s *Server) SetRelayPublicKey(key *ecdsa.PublicKey)

SetRelayPublicKey atomically publishes the coordinator key used to verify short-lived browser handoff tokens.

func (*Server) Start

func (s *Server) Start(addr string) error

Start begins listening on the given address.

func (*Server) StartAsync added in v0.145.0

func (s *Server) StartAsync(addr string) error

StartAsync binds synchronously, then serves in the background. Callers can safely defer Close after this returns without racing a not-yet-created listener.

Jump to

Keyboard shortcuts

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