Versions in this module Expand all Collapse all v1 v1.0.0 Dec 9, 2024 Changes in this version + const IPV6_UNICAST_IF — windows/amd64 + const IP_UNICAST_IF — windows/amd64 + const TCP_FASTOPEN — linux/amd64, windows/amd64 + const TCP_FASTOPEN_CLIENT — darwin/amd64 + const TCP_FASTOPEN_CONNECT — linux/amd64 + const TCP_FASTOPEN_SERVER — darwin/amd64 + var File_transport_internet_config_proto protoreflect.FileDescriptor + var MPTCPState_name = map[int32]string + var MPTCPState_value = map[string]int32 + var SocketConfig_TCPFastOpenState_name = map[int32]string + var SocketConfig_TCPFastOpenState_value = map[string]int32 + var SocketConfig_TProxyMode_name = map[int32]string + var SocketConfig_TProxyMode_value = map[string]int32 + var TransportProtocol_name = map[int32]string + var TransportProtocol_value = map[string]int32 + func ApplyGlobalTransportSettings(settings []*TransportConfig) error + func CreateTransportConfig(name string) (interface{}, error) + func DialSystem(ctx context.Context, dest net.Destination, sockopt *SocketConfig) (net.Conn, error) + func DialTaggedOutbound(ctx context.Context, dest net.Destination, tag string) (net.Conn, error) + func ListenSystem(ctx context.Context, addr net.Addr, sockopt *SocketConfig) (net.Listener, error) + func ListenSystemPacket(ctx context.Context, addr net.Addr, sockopt *SocketConfig) (net.PacketConn, error) + func RegisterDialerController(ctl func(network, address string, fd uintptr) error) error + func RegisterListenerController(controller func(network, address string, fd uintptr) error) error + func RegisterProtocolConfigCreator(name string, creator ConfigCreator) error + func RegisterTransportDialer(protocol string, dialer dialFunc) error + func RegisterTransportListener(protocol string, listener ListenFunc) error + func UseAlternativeSystemDialer(dialer SystemDialer) + type AbstractPacketConn interface + type AbstractPacketConnReader interface + ReadFrom func(p []byte) (n int, addr net.Addr, err error) + type AbstractPacketConnWriter interface + WriteTo func(p []byte, addr net.Addr) (n int, err error) + type ConfigCreator func() interface + type ConnHandler func(Connection) + type Connection interface + func Dial(ctx context.Context, dest net.Destination, streamSettings *MemoryStreamConfig) (Connection, error) + type ConnectionAuthenticator interface + Client func(net.Conn) net.Conn + Server func(net.Conn) net.Conn + func CreateConnectionAuthenticator(config interface{}) (ConnectionAuthenticator, error) + type DefaultListener struct + func (dl *DefaultListener) Listen(ctx context.Context, addr net.Addr, sockopt *SocketConfig) (net.Listener, error) + func (dl *DefaultListener) ListenPacket(ctx context.Context, addr net.Addr, sockopt *SocketConfig) (net.PacketConn, error) + type DefaultSystemDialer struct + func (d *DefaultSystemDialer) Dial(ctx context.Context, src net.Address, dest net.Destination, ...) (net.Conn, error) + type Dialer interface + Address func() net.Address + Dial func(ctx context.Context, destination net.Destination) (Connection, error) + type FileLocker struct + func (fl *FileLocker) Acquire() error + func (fl *FileLocker) Release() + type ListenFunc func(ctx context.Context, address net.Address, port net.Port, ...) (Listener, error) + type Listener interface + Addr func() net.Addr + Close func() error + func ListenTCP(ctx context.Context, address net.Address, port net.Port, ...) (Listener, error) + func ListenUnix(ctx context.Context, address net.Address, settings *MemoryStreamConfig, ...) (Listener, error) + type MPTCPState int32 + const MPTCPState_AsIs + const MPTCPState_Disable + const MPTCPState_Enable + func (MPTCPState) Descriptor() protoreflect.EnumDescriptor + func (MPTCPState) EnumDescriptor() ([]byte, []int) + func (MPTCPState) Type() protoreflect.EnumType + func (x MPTCPState) Enum() *MPTCPState + func (x MPTCPState) Number() protoreflect.EnumNumber + func (x MPTCPState) String() string + type MemoryStreamConfig struct + ProtocolName string + ProtocolSettings interface{} + SecuritySettings interface{} + SecurityType string + SocketSettings *SocketConfig + func ToMemoryStreamConfig(s *StreamConfig) (*MemoryStreamConfig, error) + type PacketConn interface + type PacketHeader interface + Serialize func([]byte) + Size func() int32 + func CreatePacketHeader(config interface{}) (PacketHeader, error) + type ProxyConfig struct + Tag string + TransportLayerProxy bool + func (*ProxyConfig) Descriptor() ([]byte, []int) + func (*ProxyConfig) ProtoMessage() + func (c *ProxyConfig) HasTag() bool + func (x *ProxyConfig) GetTag() string + func (x *ProxyConfig) GetTransportLayerProxy() bool + func (x *ProxyConfig) ProtoReflect() protoreflect.Message + func (x *ProxyConfig) Reset() + func (x *ProxyConfig) String() string + type SimpleSystemDialer struct + func (v *SimpleSystemDialer) Dial(ctx context.Context, src net.Address, dest net.Destination, ...) (net.Conn, error) + type SocketConfig struct + AcceptProxyProtocol bool + BindAddress []byte + BindPort uint32 + BindToDevice string + ForceBufSize bool + Mark uint32 + Mptcp MPTCPState + ReceiveOriginalDestAddress bool + RxBufSize int64 + TcpKeepAliveIdle int32 + TcpKeepAliveInterval int32 + Tfo SocketConfig_TCPFastOpenState + TfoQueueLength uint32 + Tproxy SocketConfig_TProxyMode + TxBufSize int64 + func (*SocketConfig) Descriptor() ([]byte, []int) + func (*SocketConfig) ProtoMessage() + func (x *SocketConfig) GetAcceptProxyProtocol() bool + func (x *SocketConfig) GetBindAddress() []byte + func (x *SocketConfig) GetBindPort() uint32 + func (x *SocketConfig) GetBindToDevice() string + func (x *SocketConfig) GetForceBufSize() bool + func (x *SocketConfig) GetMark() uint32 + func (x *SocketConfig) GetMptcp() MPTCPState + func (x *SocketConfig) GetReceiveOriginalDestAddress() bool + func (x *SocketConfig) GetRxBufSize() int64 + func (x *SocketConfig) GetTcpKeepAliveIdle() int32 + func (x *SocketConfig) GetTcpKeepAliveInterval() int32 + func (x *SocketConfig) GetTfo() SocketConfig_TCPFastOpenState + func (x *SocketConfig) GetTfoQueueLength() uint32 + func (x *SocketConfig) GetTproxy() SocketConfig_TProxyMode + func (x *SocketConfig) GetTxBufSize() int64 + func (x *SocketConfig) ProtoReflect() protoreflect.Message + func (x *SocketConfig) Reset() + func (x *SocketConfig) String() string + type SocketConfig_TCPFastOpenState int32 + const SocketConfig_AsIs + const SocketConfig_Disable + const SocketConfig_Enable + func (SocketConfig_TCPFastOpenState) Descriptor() protoreflect.EnumDescriptor + func (SocketConfig_TCPFastOpenState) EnumDescriptor() ([]byte, []int) + func (SocketConfig_TCPFastOpenState) Type() protoreflect.EnumType + func (x SocketConfig_TCPFastOpenState) Enum() *SocketConfig_TCPFastOpenState + func (x SocketConfig_TCPFastOpenState) Number() protoreflect.EnumNumber + func (x SocketConfig_TCPFastOpenState) String() string + type SocketConfig_TProxyMode int32 + const SocketConfig_Off + const SocketConfig_Redirect + const SocketConfig_TProxy + func (SocketConfig_TProxyMode) Descriptor() protoreflect.EnumDescriptor + func (SocketConfig_TProxyMode) EnumDescriptor() ([]byte, []int) + func (SocketConfig_TProxyMode) Type() protoreflect.EnumType + func (m SocketConfig_TProxyMode) IsEnabled() bool + func (x SocketConfig_TProxyMode) Enum() *SocketConfig_TProxyMode + func (x SocketConfig_TProxyMode) Number() protoreflect.EnumNumber + func (x SocketConfig_TProxyMode) String() string + type StatCouterConnection struct + ReadCounter stats.Counter + WriteCounter stats.Counter + func (c *StatCouterConnection) Read(b []byte) (int, error) + func (c *StatCouterConnection) Write(b []byte) (int, error) + type StreamConfig struct + Protocol TransportProtocol + ProtocolName string + SecuritySettings []*anypb.Any + SecurityType string + SocketSettings *SocketConfig + TransportSettings []*TransportConfig + func (*StreamConfig) Descriptor() ([]byte, []int) + func (*StreamConfig) ProtoMessage() + func (c *StreamConfig) GetEffectiveProtocol() string + func (c *StreamConfig) GetEffectiveSecuritySettings() (interface{}, error) + func (c *StreamConfig) GetEffectiveTransportSettings() (interface{}, error) + func (c *StreamConfig) GetTransportSettingsFor(protocol string) (interface{}, error) + func (c *StreamConfig) HasSecuritySettings() bool + func (x *StreamConfig) GetProtocol() TransportProtocol + func (x *StreamConfig) GetProtocolName() string + func (x *StreamConfig) GetSecuritySettings() []*anypb.Any + func (x *StreamConfig) GetSecurityType() string + func (x *StreamConfig) GetSocketSettings() *SocketConfig + func (x *StreamConfig) GetTransportSettings() []*TransportConfig + func (x *StreamConfig) ProtoReflect() protoreflect.Message + func (x *StreamConfig) Reset() + func (x *StreamConfig) String() string + type SystemDialer interface + Dial func(ctx context.Context, source net.Address, destination net.Destination, ...) (net.Conn, error) + func WithAdapter(dialer SystemDialerAdapter) SystemDialer + type SystemDialerAdapter interface + Dial func(network string, address string) (net.Conn, error) + type SystemListener interface + Listen func(ctx context.Context, addr net.Addr, sockopt *SocketConfig) (net.Listener, error) + ListenPacket func(ctx context.Context, addr net.Addr, sockopt *SocketConfig) (net.PacketConn, error) + type TransportConfig struct + Protocol TransportProtocol + ProtocolName string + Settings *anypb.Any + func (*TransportConfig) Descriptor() ([]byte, []int) + func (*TransportConfig) ProtoMessage() + func (c *TransportConfig) GetTypedSettings() (interface{}, error) + func (c *TransportConfig) GetUnifiedProtocolName() string + func (x *TransportConfig) GetProtocol() TransportProtocol + func (x *TransportConfig) GetProtocolName() string + func (x *TransportConfig) GetSettings() *anypb.Any + func (x *TransportConfig) ProtoReflect() protoreflect.Message + func (x *TransportConfig) Reset() + func (x *TransportConfig) String() string + type TransportProtocol int32 + const TransportProtocol_DomainSocket + const TransportProtocol_HTTP + const TransportProtocol_MKCP + const TransportProtocol_TCP + const TransportProtocol_UDP + const TransportProtocol_WebSocket + func (TransportProtocol) Descriptor() protoreflect.EnumDescriptor + func (TransportProtocol) EnumDescriptor() ([]byte, []int) + func (TransportProtocol) Type() protoreflect.EnumType + func (x TransportProtocol) Enum() *TransportProtocol + func (x TransportProtocol) Number() protoreflect.EnumNumber + func (x TransportProtocol) String() string