Documentation
¶
Index ¶
- type AppSet
- type BufferPolicy
- type ConnHandler
- type DeadlineRW
- type DefaultInterfaceChangeObserver
- type DefaultInterfaceChangeSubject
- type DefaultInterfaceInfo
- type Dialer
- type DialerListener
- type DnsResolver
- type DnsServer
- type DomainSet
- type ECHResolver
- type FakeDnsPool
- type FlowConn
- type FlowHandler
- type GeoHelper
- type Handler
- type HandlerErrorObserver
- type HandlerWith6Info
- type IPResolver
- type IPSet
- type IPv6SupportChangeObserver
- type IPv6SupportChangeSubject
- type IpToDomain
- type Listener
- type OnDefaultInterfaceChanged
- type Outbound
- type OutboundManager
- type PacketHandler
- type PacketListener
- type PortSelector
- type ProxyDialer
- type ProxyPacketListener
- type ReadDeadline
- type Router
- type StatsSetting
- type TimeoutSetting
- type UnauthorizedReport
- type User
- type UserValidator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BufferPolicy ¶
type ConnHandler ¶
type ConnHandler interface {
HandleConn(ctx context.Context, dst net.Destination, rw io.ReadWriter) error
}
type DeadlineRW ¶
type DeadlineRW interface {
buf.ReaderWriter
ReadDeadline
}
type DefaultInterfaceChangeObserver ¶
type DefaultInterfaceChangeObserver interface {
OnDefaultInterfaceChanged()
}
type DefaultInterfaceChangeSubject ¶
type DefaultInterfaceChangeSubject interface {
Register(observer DefaultInterfaceChangeObserver)
Unregister(observer DefaultInterfaceChangeObserver)
Notify()
}
type DefaultInterfaceInfo ¶
type DefaultInterfaceInfo interface {
// Name of the default ipv4 interface
DefaultInterface4() uint32
DefaultInterface6() uint32
// Name of the default ipv4 interface
DefaultInterfaceName4() string
DefaultInterfaceName6() string
// Dns servers of the default ipv4 interface
DefaultDns4() []netip.Addr
DefaultDns6() []netip.Addr
// whether the default interface actually support ipv6
// -1: no; 0: unknown for now, is checking; 1: yes
SupportIPv6() int
// whether the default interface has global ipv6 address
// as determined by netip.Addr.IsGlobalUnicast()
HasGlobalIPv6() (bool, error)
DefaultInterfaceChangeSubject
}
type DialerListener ¶
type DialerListener interface {
Dialer
PacketListener
}
type DnsResolver ¶
type DnsResolver interface {
IPResolver
ECHResolver
}
type ECHResolver ¶
type FakeDnsPool ¶
type FlowConn ¶
type FlowConn interface {
buf.ReaderWriter
Close() error
}
type FlowHandler ¶
type FlowHandler interface {
// Read request data from rw; meanwhile write response data to rw.
// Returns when there is no more data from rw (io.EOF) and no more response data; or when an
// error occurs; or when ctx is canceled.
// rw.CloseWrite() will be called when no more respone data;
// When an error occurs and it returns, rw might still be used by some goroutines
// for reading or writing.
HandleFlow(ctx context.Context, dst net.Destination, rw buf.ReaderWriter) error
}
type Handler ¶
type Handler interface {
FlowHandler
PacketHandler
}
type HandlerErrorObserver ¶
type HandlerWith6Info ¶
type IPResolver ¶
type IPv6SupportChangeObserver ¶
type IPv6SupportChangeObserver interface {
OnIPv6SupportChanged()
}
type IPv6SupportChangeSubject ¶
type IPv6SupportChangeSubject interface {
Register(observer IPv6SupportChangeObserver)
Unregister(observer IPv6SupportChangeObserver)
Notify()
}
type IpToDomain ¶
type OnDefaultInterfaceChanged ¶
type OnDefaultInterfaceChanged func()
func (OnDefaultInterfaceChanged) OnDefaultInterfaceChanged ¶
func (f OnDefaultInterfaceChanged) OnDefaultInterfaceChanged()
type OutboundManager ¶
type PacketHandler ¶
type PacketHandler interface {
// Read request data from rw; meanwhile write response data to rw.
// Returns when there is no request for a while; or when an
// error occurs; or when ctx is canceled.
HandlePacketConn(ctx context.Context, dst net.Destination, p udp.PacketReaderWriter) error
}
type PacketListener ¶
type PortSelector ¶
type PortSelector interface {
SelectPort() uint16
}
type ProxyDialer ¶
type ProxyDialer interface {
ProxyDial(ctx context.Context, dst net.Destination, initialData buf.MultiBuffer) (FlowConn, error)
}
type ProxyPacketListener ¶
type ReadDeadline ¶
type StatsSetting ¶
type TimeoutSetting ¶
type UnauthorizedReport ¶
type UnauthorizedReport interface {
}
type UserValidator ¶
Click to show internal directories.
Click to hide internal directories.