Versions in this module Expand all Collapse all v4 v4.23.2 Apr 17, 2020 Changes in this version + const TCP_FASTOPEN — darwin/amd64, linux/amd64, windows/amd64 + const TCP_FASTOPEN_CLIENT — darwin/amd64 + const TCP_FASTOPEN_CONNECT — linux/amd64 + const TCP_FASTOPEN_SERVER — darwin/amd64 + 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 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 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 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) + type MemoryStreamConfig struct + ProtocolName string + ProtocolSettings interface{} + SecuritySettings interface{} + SecurityType string + SocketSettings *SocketConfig + func ToMemoryStreamConfig(s *StreamConfig) (*MemoryStreamConfig, error) + type PacketHeader interface + Serialize func([]byte) + Size func() int32 + func CreatePacketHeader(config interface{}) (PacketHeader, error) + type ProxyConfig struct + Tag string + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func (*ProxyConfig) Descriptor() ([]byte, []int) + func (*ProxyConfig) ProtoMessage() + func (c *ProxyConfig) HasTag() bool + func (m *ProxyConfig) GetTag() string + func (m *ProxyConfig) Reset() + func (m *ProxyConfig) String() string + func (m *ProxyConfig) XXX_DiscardUnknown() + func (m *ProxyConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *ProxyConfig) XXX_Merge(src proto.Message) + func (m *ProxyConfig) XXX_Size() int + func (m *ProxyConfig) XXX_Unmarshal(b []byte) error + type SimpleSystemDialer struct + func (v *SimpleSystemDialer) Dial(ctx context.Context, src net.Address, dest net.Destination, ...) (net.Conn, error) + type SocketConfig struct + BindAddress []byte + BindPort uint32 + Mark int32 + ReceiveOriginalDestAddress bool + Tfo SocketConfig_TCPFastOpenState + Tproxy SocketConfig_TProxyMode + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func (*SocketConfig) Descriptor() ([]byte, []int) + func (*SocketConfig) ProtoMessage() + func (m *SocketConfig) GetBindAddress() []byte + func (m *SocketConfig) GetBindPort() uint32 + func (m *SocketConfig) GetMark() int32 + func (m *SocketConfig) GetReceiveOriginalDestAddress() bool + func (m *SocketConfig) GetTfo() SocketConfig_TCPFastOpenState + func (m *SocketConfig) GetTproxy() SocketConfig_TProxyMode + func (m *SocketConfig) Reset() + func (m *SocketConfig) String() string + func (m *SocketConfig) XXX_DiscardUnknown() + func (m *SocketConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *SocketConfig) XXX_Merge(src proto.Message) + func (m *SocketConfig) XXX_Size() int + func (m *SocketConfig) XXX_Unmarshal(b []byte) error + type SocketConfig_TCPFastOpenState int32 + const SocketConfig_AsIs + const SocketConfig_Disable + const SocketConfig_Enable + func (SocketConfig_TCPFastOpenState) EnumDescriptor() ([]byte, []int) + func (x SocketConfig_TCPFastOpenState) String() string + type SocketConfig_TProxyMode int32 + const SocketConfig_Off + const SocketConfig_Redirect + const SocketConfig_TProxy + func (SocketConfig_TProxyMode) EnumDescriptor() ([]byte, []int) + func (m SocketConfig_TProxyMode) IsEnabled() bool + func (x SocketConfig_TProxyMode) String() string + type StatCouterConnection struct + Downlink stats.Counter + Uplink 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 []*serial.TypedMessage + SecurityType string + SocketSettings *SocketConfig + TransportSettings []*TransportConfig + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + 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 (m *StreamConfig) GetProtocol() TransportProtocol + func (m *StreamConfig) GetProtocolName() string + func (m *StreamConfig) GetSecuritySettings() []*serial.TypedMessage + func (m *StreamConfig) GetSecurityType() string + func (m *StreamConfig) GetSocketSettings() *SocketConfig + func (m *StreamConfig) GetTransportSettings() []*TransportConfig + func (m *StreamConfig) Reset() + func (m *StreamConfig) String() string + func (m *StreamConfig) XXX_DiscardUnknown() + func (m *StreamConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *StreamConfig) XXX_Merge(src proto.Message) + func (m *StreamConfig) XXX_Size() int + func (m *StreamConfig) XXX_Unmarshal(b []byte) error + 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 TransportConfig struct + Protocol TransportProtocol + ProtocolName string + Settings *serial.TypedMessage + XXX_NoUnkeyedLiteral struct{} + XXX_sizecache int32 + XXX_unrecognized []byte + func (*TransportConfig) Descriptor() ([]byte, []int) + func (*TransportConfig) ProtoMessage() + func (c *TransportConfig) GetTypedSettings() (interface{}, error) + func (c *TransportConfig) GetUnifiedProtocolName() string + func (m *TransportConfig) GetProtocol() TransportProtocol + func (m *TransportConfig) GetProtocolName() string + func (m *TransportConfig) GetSettings() *serial.TypedMessage + func (m *TransportConfig) Reset() + func (m *TransportConfig) String() string + func (m *TransportConfig) XXX_DiscardUnknown() + func (m *TransportConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) + func (m *TransportConfig) XXX_Merge(src proto.Message) + func (m *TransportConfig) XXX_Size() int + func (m *TransportConfig) XXX_Unmarshal(b []byte) error + type TransportProtocol int32 + const TransportProtocol_DomainSocket + const TransportProtocol_HTTP + const TransportProtocol_MKCP + const TransportProtocol_TCP + const TransportProtocol_UDP + const TransportProtocol_WebSocket + func (TransportProtocol) EnumDescriptor() ([]byte, []int) + func (x TransportProtocol) String() string Other modules containing this package github.com/unifyproxy/v2ray-core