client

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2025 License: Apache-2.0 Imports: 30 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) Accept added in v0.6.0

func (d *Destination) Accept() (net.Conn, 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
	Route            model.RouteOption
	Proxy            model.ProxyVersion
	RelayEncryptions []model.EncryptionScheme
}

func NewDestinationConfig added in v0.5.0

func NewDestinationConfig(name string) DestinationConfig

func (DestinationConfig) WithProxy added in v0.5.0

func (DestinationConfig) WithRelayEncryptions added in v0.6.0

func (cfg DestinationConfig) WithRelayEncryptions(schemes ...model.EncryptionScheme) DestinationConfig

func (DestinationConfig) WithRoute added in v0.5.0

type DestinationServer added in v0.6.0

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

func NewDestinationServer added in v0.6.0

func NewDestinationServer(dst *Destination, fwd model.Forward, addr string, logger *slog.Logger) *DestinationServer

func (*DestinationServer) Run added in v0.6.0

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

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) Dial added in v0.6.0

func (s *Source) Dial(network, address string) (net.Conn, error)

func (*Source) DialContext added in v0.6.0

func (s *Source) DialContext(ctx context.Context, network, address string) (net.Conn, 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
	Route            model.RouteOption
	RelayEncryptions []model.EncryptionScheme
}

func NewSourceConfig added in v0.5.0

func NewSourceConfig(name string) SourceConfig

func (SourceConfig) WithRelayEncryptions added in v0.6.0

func (cfg SourceConfig) WithRelayEncryptions(schemes ...model.EncryptionScheme) SourceConfig

func (SourceConfig) WithRoute added in v0.5.0

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

type SourceServer added in v0.6.0

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

func NewSourceServer added in v0.6.0

func NewSourceServer(src *Source, fwd model.Forward, addr string, logger *slog.Logger) *SourceServer

func (*SourceServer) Run added in v0.6.0

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

Jump to

Keyboard shortcuts

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