Documentation ¶
Index ¶
- Variables
- func CreateServer(opts *Opts[IsProtocol_Protocol]) (server.Server, error)
- func RegisterProtocol[T isProtocol_Protocol](wrap func(*Opts[T]) (server.Server, error))
- type Config
- type Http
- type IsProtocol_Protocol
- type Opts
- type ProcessDumper
- type Protocol
- func (*Protocol) Descriptor() ([]byte, []int)deprecated
- func (x *Protocol) GetEnabled() bool
- func (x *Protocol) GetHttp() *Http
- func (x *Protocol) GetName() string
- func (m *Protocol) GetProtocol() isProtocol_Protocol
- func (x *Protocol) GetRedir() *Redir
- func (x *Protocol) GetSocks5() *Socks5
- func (x *Protocol) GetTun() *Tun
- func (*Protocol) ProtoMessage()
- func (x *Protocol) ProtoReflect() protoreflect.Message
- func (x *Protocol) Reset()
- func (x *Protocol) String() string
- type Protocol_Http
- type Protocol_Redir
- type Protocol_Socks5
- type Protocol_Tun
- type Redir
- type Socks5
- func (*Socks5) Descriptor() ([]byte, []int)deprecated
- func (x *Socks5) GetHost() string
- func (x *Socks5) GetPassword() string
- func (x *Socks5) GetUsername() string
- func (*Socks5) ProtoMessage()
- func (x *Socks5) ProtoReflect() protoreflect.Message
- func (x *Socks5) Reset()
- func (x *Socks5) String() string
- type Tun
- func (*Tun) Descriptor() ([]byte, []int)deprecated
- func (x *Tun) GetDnsHijacking() bool
- func (x *Tun) GetDriver() TunEndpointDriver
- func (x *Tun) GetGateway() string
- func (x *Tun) GetMtu() int32
- func (x *Tun) GetName() string
- func (x *Tun) GetPortal() string
- func (x *Tun) GetSkipMulticast() bool
- func (*Tun) ProtoMessage()
- func (x *Tun) ProtoReflect() protoreflect.Message
- func (x *Tun) Reset()
- func (x *Tun) String() string
- type TunEndpointDriver
- func (TunEndpointDriver) Descriptor() protoreflect.EnumDescriptor
- func (x TunEndpointDriver) Enum() *TunEndpointDriver
- func (TunEndpointDriver) EnumDescriptor() ([]byte, []int)deprecated
- func (x TunEndpointDriver) Number() protoreflect.EnumNumber
- func (x TunEndpointDriver) String() string
- func (TunEndpointDriver) Type() protoreflect.EnumType
Constants ¶
This section is empty.
Variables ¶
View Source
var ( TunEndpointDriver_name = map[int32]string{ 0: "fdbased", 1: "channel", 2: "system_gvisor", } TunEndpointDriver_value = map[string]int32{ "fdbased": 0, "channel": 1, "system_gvisor": 2, } )
Enum value maps for TunEndpointDriver.
View Source
var File_config_listener_listener_proto protoreflect.FileDescriptor
Functions ¶
func CreateServer ¶
func CreateServer(opts *Opts[IsProtocol_Protocol]) (server.Server, error)
Types ¶
type Config ¶
type Config struct { Servers map[string]*Protocol `` /* 155-byte string literal not displayed */ // contains filtered or unexported fields }
func (*Config) Descriptor
deprecated
func (*Config) GetServers ¶
func (*Config) ProtoMessage ¶
func (*Config) ProtoMessage()
func (*Config) ProtoReflect ¶
func (x *Config) ProtoReflect() protoreflect.Message
type Http ¶
type Http struct { Host string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"` Username string `protobuf:"bytes,3,opt,name=username,proto3" json:"username,omitempty"` Password string `protobuf:"bytes,4,opt,name=password,proto3" json:"password,omitempty"` // contains filtered or unexported fields }
func (*Http) Descriptor
deprecated
func (*Http) GetPassword ¶
func (*Http) GetUsername ¶
func (*Http) ProtoMessage ¶
func (*Http) ProtoMessage()
func (*Http) ProtoReflect ¶
func (x *Http) ProtoReflect() protoreflect.Message
type IsProtocol_Protocol ¶
type IsProtocol_Protocol interface {
// contains filtered or unexported methods
}
type Opts ¶
type Opts[T isProtocol_Protocol] struct { Dialer proxy.Proxy DNSServer server.DNSServer IPv6 bool Protocol T }
func CovertOpts ¶
type ProcessDumper ¶
type Protocol ¶
type Protocol struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Enabled bool `protobuf:"varint,2,opt,name=enabled,proto3" json:"enabled,omitempty"` // Types that are assignable to Protocol: // // *Protocol_Http // *Protocol_Socks5 // *Protocol_Redir // *Protocol_Tun Protocol isProtocol_Protocol `protobuf_oneof:"protocol"` // contains filtered or unexported fields }
func (*Protocol) Descriptor
deprecated
func (*Protocol) GetEnabled ¶
func (*Protocol) GetProtocol ¶
func (m *Protocol) GetProtocol() isProtocol_Protocol
func (*Protocol) ProtoMessage ¶
func (*Protocol) ProtoMessage()
func (*Protocol) ProtoReflect ¶
func (x *Protocol) ProtoReflect() protoreflect.Message
type Protocol_Http ¶
type Protocol_Http struct {
Http *Http `protobuf:"bytes,3,opt,name=http,proto3,oneof"`
}
type Protocol_Redir ¶
type Protocol_Redir struct {
Redir *Redir `protobuf:"bytes,5,opt,name=redir,proto3,oneof"`
}
type Protocol_Socks5 ¶
type Protocol_Socks5 struct {
Socks5 *Socks5 `protobuf:"bytes,4,opt,name=socks5,proto3,oneof"`
}
type Protocol_Tun ¶
type Protocol_Tun struct {
Tun *Tun `protobuf:"bytes,6,opt,name=tun,proto3,oneof"`
}
type Redir ¶
type Redir struct { Host string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"` // contains filtered or unexported fields }
func (*Redir) Descriptor
deprecated
func (*Redir) ProtoMessage ¶
func (*Redir) ProtoMessage()
func (*Redir) ProtoReflect ¶
func (x *Redir) ProtoReflect() protoreflect.Message
type Socks5 ¶
type Socks5 struct { Host string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"` Username string `protobuf:"bytes,3,opt,name=username,proto3" json:"username,omitempty"` Password string `protobuf:"bytes,4,opt,name=password,proto3" json:"password,omitempty"` // contains filtered or unexported fields }
func (*Socks5) Descriptor
deprecated
func (*Socks5) GetPassword ¶
func (*Socks5) GetUsername ¶
func (*Socks5) ProtoMessage ¶
func (*Socks5) ProtoMessage()
func (*Socks5) ProtoReflect ¶
func (x *Socks5) ProtoReflect() protoreflect.Message
type Tun ¶
type Tun struct { // name of the tun device // eg: tun://tun0, fd://123 Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Mtu int32 `protobuf:"varint,2,opt,name=mtu,proto3" json:"mtu,omitempty"` Gateway string `protobuf:"bytes,3,opt,name=gateway,proto3" json:"gateway,omitempty"` DnsHijacking bool `protobuf:"varint,4,opt,name=dns_hijacking,proto3" json:"dns_hijacking,omitempty"` SkipMulticast bool `protobuf:"varint,6,opt,name=skip_multicast,proto3" json:"skip_multicast,omitempty"` Driver TunEndpointDriver `protobuf:"varint,7,opt,name=driver,proto3,enum=yuhaiin.listener.TunEndpointDriver" json:"driver,omitempty"` Portal string `protobuf:"bytes,8,opt,name=portal,proto3" json:"portal,omitempty"` // contains filtered or unexported fields }
func (*Tun) Descriptor
deprecated
func (*Tun) GetDnsHijacking ¶
func (*Tun) GetDriver ¶
func (x *Tun) GetDriver() TunEndpointDriver
func (*Tun) GetGateway ¶
func (*Tun) GetSkipMulticast ¶
func (*Tun) ProtoMessage ¶
func (*Tun) ProtoMessage()
func (*Tun) ProtoReflect ¶
func (x *Tun) ProtoReflect() protoreflect.Message
type TunEndpointDriver ¶
type TunEndpointDriver int32
const ( Tun_fdbased TunEndpointDriver = 0 Tun_channel TunEndpointDriver = 1 Tun_system_gvisor TunEndpointDriver = 2 )
func (TunEndpointDriver) Descriptor ¶
func (TunEndpointDriver) Descriptor() protoreflect.EnumDescriptor
func (TunEndpointDriver) Enum ¶
func (x TunEndpointDriver) Enum() *TunEndpointDriver
func (TunEndpointDriver) EnumDescriptor
deprecated
func (TunEndpointDriver) EnumDescriptor() ([]byte, []int)
Deprecated: Use TunEndpointDriver.Descriptor instead.
func (TunEndpointDriver) Number ¶
func (x TunEndpointDriver) Number() protoreflect.EnumNumber
func (TunEndpointDriver) String ¶
func (x TunEndpointDriver) String() string
func (TunEndpointDriver) Type ¶
func (TunEndpointDriver) Type() protoreflect.EnumType
Click to show internal directories.
Click to hide internal directories.