client

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2025 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Destination

type Destination struct {
	// contains filtered or unexported fields
}

func NewDestination

func NewDestination(cfg DestinationConfig, direct *DirectServer, root *certc.Cert, logger *slog.Logger) (*Destination, error)

func (*Destination) Run

func (d *Destination) Run(ctx context.Context) error

func (*Destination) RunControl

func (d *Destination) RunControl(ctx context.Context, conn quic.Connection) error

func (*Destination) SetDirectAddrs

func (d *Destination) SetDirectAddrs(addrs []netip.AddrPort)

func (*Destination) Status added in v0.4.0

func (d *Destination) Status() (PeerStatus, error)

type DestinationConfig added in v0.5.0

type DestinationConfig struct {
	Forward model.Forward
	Address string
	Route   model.RouteOption
	Proxy   model.ProxyVersion
}

func NewDestinationConfig added in v0.5.0

func NewDestinationConfig(name string, addr string) DestinationConfig

func (DestinationConfig) WithProxy added in v0.5.0

func (DestinationConfig) WithRoute added in v0.5.0

type DirectServer

type DirectServer struct {
	// contains filtered or unexported fields
}

func NewDirectServer

func NewDirectServer(transport *quic.Transport, logger *slog.Logger) (*DirectServer, error)

func (*DirectServer) Run

func (s *DirectServer) Run(ctx context.Context) error

type PeerConnection added in v0.4.0

type PeerConnection struct {
	ID    string `json:"id"`
	Style string `json:"style"`
	Addr  string `json:"addr"`
}

type PeerStatus added in v0.4.0

type PeerStatus struct {
	Relays      []string         `json:"relays"`
	Connections []PeerConnection `json:"connections"`
}

type Source

type Source struct {
	// contains filtered or unexported fields
}

func NewSource

func NewSource(cfg SourceConfig, direct *DirectServer, root *certc.Cert, logger *slog.Logger) (*Source, error)

func (*Source) Run

func (s *Source) Run(ctx context.Context) error

func (*Source) RunControl

func (s *Source) RunControl(ctx context.Context, conn quic.Connection) error

func (*Source) SetDirectAddrs

func (s *Source) SetDirectAddrs(addrs []netip.AddrPort)

func (*Source) Status added in v0.4.0

func (s *Source) Status() (PeerStatus, error)

type SourceConfig added in v0.5.0

type SourceConfig struct {
	Forward model.Forward
	Address string
	Route   model.RouteOption
}

func NewSourceConfig added in v0.5.0

func NewSourceConfig(name string, addr string) SourceConfig

func (SourceConfig) WithRoute added in v0.5.0

func (cfg SourceConfig) WithRoute(route model.RouteOption) SourceConfig

Jump to

Keyboard shortcuts

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