Documentation
¶
Overview ¶
Package client implements WireHop client startup and session ownership.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrInvalidConfig indicates missing address, authentication, timing, or queue configuration. ErrInvalidConfig = errors.New("invalid client configuration") // ErrUnexpectedServerResponse indicates a valid but contextually impossible handshake response. ErrUnexpectedServerResponse = errors.New("unexpected server response") // ErrSessionGone indicates that the server no longer retains a session being joined. ErrSessionGone = errors.New("relay session is gone") // ErrStartupTimeout indicates that no configured lane created a session within the startup budget. ErrStartupTimeout = errors.New("relay session startup timed out") // ErrLaneRejected indicates a permanent carrier-specific admission rejection. ErrLaneRejected = errors.New("relay lane rejected") )
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client owns the early-bound local UDP socket and asynchronous relay session.
func Start ¶
Start validates config, binds UDP immediately, and starts carrier session establishment.
type Config ¶
type Config struct {
Lanes []lanespec.Spec
Listen netip.AddrPort
Target target.Endpoint
Reserved wgpacket.Reserved
Token []byte
Clock relay.Clock
WallClock func() time.Time
Dialer *net.Dialer
Proxy func(*http.Request) (*neturl.URL, error)
TLSConfig *tls.Config
Logger *slog.Logger
HandshakeTimeout time.Duration
StartupTimeout time.Duration
MaxLanes int
IngressLimits packetqueue.Limits
LaneLimits packetqueue.Limits
Deadlines relay.DeadlinePolicy
DeduplicationWindow int
}
Config defines the carrier lanes and local WireGuard listener for one relay session.
type RejectionError ¶
type RejectionError struct {
Code protocol.ErrorCode
Class protocol.ErrorClass
Scope protocol.ErrorScope
Diagnostic string
}
RejectionError is an authenticated server rejection.
func (*RejectionError) Error ¶
func (e *RejectionError) Error() string
Error returns the stable rejection diagnostic.
Click to show internal directories.
Click to hide internal directories.