Documentation ¶
Index ¶
Constants ¶
View Source
const ( AuthenticateTimeout = 10 * time.Second AcceptTimeout = AuthenticateTimeout )
Variables ¶
View Source
var ( ErrUnexpectedVersion = fmt.Errorf("unexpected version") ErrUnexpectedCmdType = fmt.Errorf("unexpected cmd type") ErrAuthenticationFailed = fmt.Errorf("authentication failed") ErrDisabledTrafficType = fmt.Errorf("disabled traffic type") )
View Source
var DefaultUdpEndpointPool = NewUdpEndpointPool()
Functions ¶
This section is empty.
Types ¶
type ContextCancel ¶ added in v0.2.1
type DialOption ¶ added in v0.2.0
type Forwarder ¶ added in v0.2.0
type Forwarder struct { ForwarderOptions // contains filtered or unexported fields }
func NewForwarder ¶ added in v0.2.0
func NewForwarder(opts ForwarderOptions) (*Forwarder, error)
type ForwarderOptions ¶ added in v0.2.0
type InFlightUnderlayKey ¶ added in v0.2.1
type InFlightUnderlayKey struct {
// contains filtered or unexported fields
}
func NewInFlightUnderlayKey ¶ added in v0.2.1
func NewInFlightUnderlayKey(ttl time.Duration) *InFlightUnderlayKey
func (*InFlightUnderlayKey) Evict ¶ added in v0.2.1
func (i *InFlightUnderlayKey) Evict(k [juicity.UnderlaySaltLen]byte) *juicity.UnderlayAuth
func (*InFlightUnderlayKey) Store ¶ added in v0.2.1
func (i *InFlightUnderlayKey) Store(k [juicity.UnderlaySaltLen]byte, auth *juicity.UnderlayAuth)
type Mixed ¶
type Mixed struct {
// contains filtered or unexported fields
}
Mixed struct.
func (*Mixed) ListenAndServe ¶
func (m *Mixed) ListenAndServe()
ListenAndServe listens on server's addr and serves connections.
type UdpEndpoint ¶ added in v0.2.0
type UdpEndpoint struct { NatTimeout time.Duration Dialer netproxy.Dialer Metadata any DialTarget string // contains filtered or unexported fields }
func (*UdpEndpoint) Close ¶ added in v0.2.0
func (ue *UdpEndpoint) Close() error
type UdpEndpointOptions ¶ added in v0.2.0
type UdpEndpointOptions struct { Handler UdpHandler NatTimeout time.Duration // GetTarget is useful only if the underlay does not support Full-cone. GetDialOption func() (option *DialOption, err error) }
type UdpEndpointPool ¶ added in v0.2.0
type UdpEndpointPool struct {
// contains filtered or unexported fields
}
UdpEndpointPool is a full-cone udp conn pool
func NewUdpEndpointPool ¶ added in v0.2.0
func NewUdpEndpointPool() *UdpEndpointPool
func (*UdpEndpointPool) GetOrCreate ¶ added in v0.2.0
func (p *UdpEndpointPool) GetOrCreate(lAddr netip.AddrPort, createOption *UdpEndpointOptions) (udpEndpoint *UdpEndpoint, isNew bool, err error)
func (*UdpEndpointPool) Remove ¶ added in v0.2.0
func (p *UdpEndpointPool) Remove(lAddr netip.AddrPort, udpEndpoint *UdpEndpoint) (err error)
Click to show internal directories.
Click to hide internal directories.