listener

package
v0.3.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 11, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	TcpUdpControl_name = map[int32]string{
		0: "tcp_udp_control_all",
		1: "disable_tcp",
		2: "disable_udp",
	}
	TcpUdpControl_value = map[string]int32{
		"tcp_udp_control_all": 0,
		"disable_tcp":         1,
		"disable_udp":         2,
	}
)

Enum value maps for TcpUdpControl.

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 isProtocol_Protocol) (netapi.ProtocolServer, error)

func ErrorTransportFunc added in v0.3.3

func ErrorTransportFunc(err error) func(netapi.Listener) (netapi.Listener, error)

func Listen added in v0.3.3

func Listen(config *Inbound) (netapi.ProtocolServer, error)

func Network added in v0.3.3

func Network(config isInbound_Network) (netapi.Listener, error)

func ParseTLS

func ParseTLS(t *TlsConfig) (*tls.Config, error)

func Protocols added in v0.3.3

func Protocols(lis netapi.Listener, config isInbound_Protocol) (netapi.ProtocolServer, error)

func RegisterNetwork added in v0.3.3

func RegisterNetwork[T isInbound_Network](wrap func(T) (netapi.Listener, error))

func RegisterProtocol

func RegisterProtocol[T isInbound_Protocol](wrap func(T) func(netapi.Listener) (netapi.ProtocolServer, error))

func RegisterProtocolDeprecated deprecated added in v0.3.4

func RegisterProtocolDeprecated[T isProtocol_Protocol](wrap func(T) (netapi.ProtocolServer, error))

Deprecated: RegisterProtocolDeprecated

func RegisterTransport added in v0.3.3

func RegisterTransport[T isTransport_Transport](wrap func(T) func(netapi.Listener) (netapi.Listener, error))

func Transports added in v0.3.3

func Transports(lis netapi.Listener, protocols []*Transport) (netapi.Listener, error)

Types

type Certificate

type Certificate struct {
	Cert         []byte `protobuf:"bytes,1,opt,name=cert,proto3" json:"cert,omitempty"`
	Key          []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
	CertFilePath string `protobuf:"bytes,3,opt,name=cert_file_path,proto3" json:"cert_file_path,omitempty"`
	KeyFilePath  string `protobuf:"bytes,4,opt,name=key_file_path,proto3" json:"key_file_path,omitempty"`
	// contains filtered or unexported fields
}

func (*Certificate) Descriptor deprecated

func (*Certificate) Descriptor() ([]byte, []int)

Deprecated: Use Certificate.ProtoReflect.Descriptor instead.

func (*Certificate) GetCert

func (x *Certificate) GetCert() []byte

func (*Certificate) GetCertFilePath

func (x *Certificate) GetCertFilePath() string

func (*Certificate) GetKey

func (x *Certificate) GetKey() []byte

func (*Certificate) GetKeyFilePath

func (x *Certificate) GetKeyFilePath() string

func (*Certificate) ProtoMessage

func (*Certificate) ProtoMessage()

func (*Certificate) ProtoReflect

func (x *Certificate) ProtoReflect() protoreflect.Message

func (*Certificate) Reset

func (x *Certificate) Reset()

func (*Certificate) String

func (x *Certificate) String() string

func (*Certificate) X509KeyPair

func (c *Certificate) X509KeyPair() (tls.Certificate, error)

type Empty added in v0.3.3

type Empty struct {
	// contains filtered or unexported fields
}

func (*Empty) Descriptor deprecated added in v0.3.3

func (*Empty) Descriptor() ([]byte, []int)

Deprecated: Use Empty.ProtoReflect.Descriptor instead.

func (*Empty) ProtoMessage added in v0.3.3

func (*Empty) ProtoMessage()

func (*Empty) ProtoReflect added in v0.3.3

func (x *Empty) ProtoReflect() protoreflect.Message

func (*Empty) Reset added in v0.3.3

func (x *Empty) Reset()

func (*Empty) String added in v0.3.3

func (x *Empty) String() string

type Grpc

type Grpc struct {

	// Deprecated: Marked as deprecated in config/listener/listener.proto.
	Tls *TlsConfig `protobuf:"bytes,1,opt,name=tls,proto3" json:"tls,omitempty"`
	// contains filtered or unexported fields
}

func (*Grpc) Descriptor deprecated

func (*Grpc) Descriptor() ([]byte, []int)

Deprecated: Use Grpc.ProtoReflect.Descriptor instead.

func (*Grpc) GetTls deprecated

func (x *Grpc) GetTls() *TlsConfig

Deprecated: Marked as deprecated in config/listener/listener.proto.

func (*Grpc) ProtoMessage

func (*Grpc) ProtoMessage()

func (*Grpc) ProtoReflect

func (x *Grpc) ProtoReflect() protoreflect.Message

func (*Grpc) Reset

func (x *Grpc) Reset()

func (*Grpc) String

func (x *Grpc) String() string

type Http

type Http struct {

	// Deprecated: Marked as deprecated in config/listener/listener.proto.
	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) Descriptor() ([]byte, []int)

Deprecated: Use Http.ProtoReflect.Descriptor instead.

func (*Http) GetHost deprecated

func (x *Http) GetHost() string

Deprecated: Marked as deprecated in config/listener/listener.proto.

func (*Http) GetPassword

func (x *Http) GetPassword() string

func (*Http) GetUsername

func (x *Http) GetUsername() string

func (*Http) ProtoMessage

func (*Http) ProtoMessage()

func (*Http) ProtoReflect

func (x *Http) ProtoReflect() protoreflect.Message

func (*Http) Reset

func (x *Http) Reset()

func (*Http) String

func (x *Http) String() string

type Http2

type Http2 struct {

	// Deprecated: Marked as deprecated in config/listener/listener.proto.
	Tls *TlsConfig `protobuf:"bytes,1,opt,name=tls,proto3" json:"tls,omitempty"`
	// contains filtered or unexported fields
}

func (*Http2) Descriptor deprecated

func (*Http2) Descriptor() ([]byte, []int)

Deprecated: Use Http2.ProtoReflect.Descriptor instead.

func (*Http2) GetTls deprecated

func (x *Http2) GetTls() *TlsConfig

Deprecated: Marked as deprecated in config/listener/listener.proto.

func (*Http2) ProtoMessage

func (*Http2) ProtoMessage()

func (*Http2) ProtoReflect

func (x *Http2) ProtoReflect() protoreflect.Message

func (*Http2) Reset

func (x *Http2) Reset()

func (*Http2) String

func (x *Http2) String() string

type Inbound added in v0.3.3

type Inbound struct {
	Name    string `protobuf:"bytes,13,opt,name=name,proto3" json:"name,omitempty"`
	Enabled bool   `protobuf:"varint,14,opt,name=enabled,proto3" json:"enabled,omitempty"`
	IPv6    bool   `protobuf:"varint,17,opt,name=IPv6,proto3" json:"IPv6,omitempty"`
	// Types that are assignable to Network:
	//
	//	*Inbound_Empty
	//	*Inbound_Tcpudp
	//	*Inbound_Quic
	Network   isInbound_Network `protobuf_oneof:"network"`
	Transport []*Transport      `protobuf:"bytes,2,rep,name=transport,proto3" json:"transport,omitempty"`
	// Types that are assignable to Protocol:
	//
	//	*Inbound_Http
	//	*Inbound_Socks5
	//	*Inbound_Yuubinsya
	//	*Inbound_Mix
	//	*Inbound_Socks4A
	//	*Inbound_Tproxy
	//	*Inbound_Redir
	//	*Inbound_Tun
	Protocol isInbound_Protocol `protobuf_oneof:"protocol"`
	// contains filtered or unexported fields
}

func (*Inbound) Descriptor deprecated added in v0.3.3

func (*Inbound) Descriptor() ([]byte, []int)

Deprecated: Use Inbound.ProtoReflect.Descriptor instead.

func (*Inbound) GetEmpty added in v0.3.3

func (x *Inbound) GetEmpty() *Empty

func (*Inbound) GetEnabled added in v0.3.3

func (x *Inbound) GetEnabled() bool

func (*Inbound) GetHttp added in v0.3.3

func (x *Inbound) GetHttp() *Http

func (*Inbound) GetIPv6 added in v0.3.3

func (x *Inbound) GetIPv6() bool

func (*Inbound) GetMix added in v0.3.3

func (x *Inbound) GetMix() *Mixed

func (*Inbound) GetName added in v0.3.3

func (x *Inbound) GetName() string

func (*Inbound) GetNetwork added in v0.3.3

func (m *Inbound) GetNetwork() isInbound_Network

func (*Inbound) GetProtocol added in v0.3.3

func (m *Inbound) GetProtocol() isInbound_Protocol

func (*Inbound) GetQuic added in v0.3.3

func (x *Inbound) GetQuic() *Quic2

func (*Inbound) GetRedir added in v0.3.3

func (x *Inbound) GetRedir() *Redir

func (*Inbound) GetSocks4A added in v0.3.3

func (x *Inbound) GetSocks4A() *Socks4A

func (*Inbound) GetSocks5 added in v0.3.3

func (x *Inbound) GetSocks5() *Socks5

func (*Inbound) GetTcpudp added in v0.3.3

func (x *Inbound) GetTcpudp() *Tcpudp

func (*Inbound) GetTproxy added in v0.3.3

func (x *Inbound) GetTproxy() *Tproxy

func (*Inbound) GetTransport added in v0.3.3

func (x *Inbound) GetTransport() []*Transport

func (*Inbound) GetTun added in v0.3.3

func (x *Inbound) GetTun() *Tun

func (*Inbound) GetYuubinsya added in v0.3.3

func (x *Inbound) GetYuubinsya() *Yuubinsya

func (*Inbound) ProtoMessage added in v0.3.3

func (*Inbound) ProtoMessage()

func (*Inbound) ProtoReflect added in v0.3.3

func (x *Inbound) ProtoReflect() protoreflect.Message

func (*Inbound) Reset added in v0.3.3

func (x *Inbound) Reset()

func (*Inbound) String added in v0.3.3

func (x *Inbound) String() string

type InboundConfig

type InboundConfig struct {
	HijackDns       bool `protobuf:"varint,2,opt,name=hijack_dns,proto3" json:"hijack_dns,omitempty"`
	HijackDnsFakeip bool `protobuf:"varint,3,opt,name=hijack_dns_fakeip,proto3" json:"hijack_dns_fakeip,omitempty"`
	// Deprecated: Marked as deprecated in config/listener/listener.proto.
	Servers  map[string]*Protocol `` /* 155-byte string literal not displayed */
	Inbounds map[string]*Inbound  `` /* 157-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*InboundConfig) Descriptor deprecated

func (*InboundConfig) Descriptor() ([]byte, []int)

Deprecated: Use InboundConfig.ProtoReflect.Descriptor instead.

func (*InboundConfig) GetHijackDns added in v0.3.3

func (x *InboundConfig) GetHijackDns() bool

func (*InboundConfig) GetHijackDnsFakeip added in v0.3.3

func (x *InboundConfig) GetHijackDnsFakeip() bool

func (*InboundConfig) GetInbounds added in v0.3.3

func (x *InboundConfig) GetInbounds() map[string]*Inbound

func (*InboundConfig) GetServers deprecated

func (x *InboundConfig) GetServers() map[string]*Protocol

Deprecated: Marked as deprecated in config/listener/listener.proto.

func (*InboundConfig) ProtoMessage

func (*InboundConfig) ProtoMessage()

func (*InboundConfig) ProtoReflect

func (x *InboundConfig) ProtoReflect() protoreflect.Message

func (*InboundConfig) Reset

func (x *InboundConfig) Reset()

func (*InboundConfig) String

func (x *InboundConfig) String() string

type Inbound_Empty added in v0.3.3

type Inbound_Empty struct {
	Empty *Empty `protobuf:"bytes,21,opt,name=empty,proto3,oneof"`
}

type Inbound_Http added in v0.3.3

type Inbound_Http struct {
	Http *Http `protobuf:"bytes,3,opt,name=http,proto3,oneof"`
}

type Inbound_Mix added in v0.3.3

type Inbound_Mix struct {
	Mix *Mixed `protobuf:"bytes,8,opt,name=mix,json=mixed,proto3,oneof"`
}

type Inbound_Quic added in v0.3.3

type Inbound_Quic struct {
	Quic *Quic2 `protobuf:"bytes,16,opt,name=quic,proto3,oneof"`
}

type Inbound_Redir added in v0.3.3

type Inbound_Redir struct {
	Redir *Redir `protobuf:"bytes,18,opt,name=redir,proto3,oneof"`
}

type Inbound_Socks4A added in v0.3.3

type Inbound_Socks4A struct {
	Socks4A *Socks4A `protobuf:"bytes,9,opt,name=socks4a,proto3,oneof"`
}

type Inbound_Socks5 added in v0.3.3

type Inbound_Socks5 struct {
	Socks5 *Socks5 `protobuf:"bytes,4,opt,name=socks5,proto3,oneof"`
}

type Inbound_Tcpudp added in v0.3.3

type Inbound_Tcpudp struct {
	Tcpudp *Tcpudp `protobuf:"bytes,15,opt,name=tcpudp,proto3,oneof"`
}

type Inbound_Tproxy added in v0.3.3

type Inbound_Tproxy struct {
	Tproxy *Tproxy `protobuf:"bytes,20,opt,name=tproxy,proto3,oneof"`
}

type Inbound_Tun added in v0.3.3

type Inbound_Tun struct {
	Tun *Tun `protobuf:"bytes,19,opt,name=tun,proto3,oneof"`
}

type Inbound_Yuubinsya added in v0.3.3

type Inbound_Yuubinsya struct {
	Yuubinsya *Yuubinsya `protobuf:"bytes,7,opt,name=yuubinsya,proto3,oneof"`
}

type Mixed

type Mixed struct {

	// Deprecated: Marked as deprecated in config/listener/listener.proto.
	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 (*Mixed) Descriptor deprecated

func (*Mixed) Descriptor() ([]byte, []int)

Deprecated: Use Mixed.ProtoReflect.Descriptor instead.

func (*Mixed) GetHost deprecated

func (x *Mixed) GetHost() string

Deprecated: Marked as deprecated in config/listener/listener.proto.

func (*Mixed) GetPassword

func (x *Mixed) GetPassword() string

func (*Mixed) GetUsername

func (x *Mixed) GetUsername() string

func (*Mixed) ProtoMessage

func (*Mixed) ProtoMessage()

func (*Mixed) ProtoReflect

func (x *Mixed) ProtoReflect() protoreflect.Message

func (*Mixed) Reset

func (x *Mixed) Reset()

func (*Mixed) String

func (x *Mixed) String() string

type Mux added in v0.3.3

type Mux struct {
	// contains filtered or unexported fields
}

func (*Mux) Descriptor deprecated added in v0.3.3

func (*Mux) Descriptor() ([]byte, []int)

Deprecated: Use Mux.ProtoReflect.Descriptor instead.

func (*Mux) ProtoMessage added in v0.3.3

func (*Mux) ProtoMessage()

func (*Mux) ProtoReflect added in v0.3.3

func (x *Mux) ProtoReflect() protoreflect.Message

func (*Mux) Reset added in v0.3.3

func (x *Mux) Reset()

func (*Mux) String added in v0.3.3

func (x *Mux) String() string

type Normal

type Normal struct {
	// contains filtered or unexported fields
}

func (*Normal) Descriptor deprecated

func (*Normal) Descriptor() ([]byte, []int)

Deprecated: Use Normal.ProtoReflect.Descriptor instead.

func (*Normal) ProtoMessage

func (*Normal) ProtoMessage()

func (*Normal) ProtoReflect

func (x *Normal) ProtoReflect() protoreflect.Message

func (*Normal) Reset

func (x *Normal) Reset()

func (*Normal) String

func (x *Normal) String() string

type ProcessDumper

type ProcessDumper interface {
	ProcessName(network string, src, dst netapi.Address) (string, error)
}

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_Yuubinsya
	//	*Protocol_Mix
	//	*Protocol_Socks4A
	//	*Protocol_Tproxy
	Protocol isProtocol_Protocol `protobuf_oneof:"protocol"`
	// contains filtered or unexported fields
}

func (*Protocol) Descriptor deprecated

func (*Protocol) Descriptor() ([]byte, []int)

Deprecated: Use Protocol.ProtoReflect.Descriptor instead.

func (*Protocol) GetEnabled

func (x *Protocol) GetEnabled() bool

func (*Protocol) GetHttp

func (x *Protocol) GetHttp() *Http

func (*Protocol) GetMix

func (x *Protocol) GetMix() *Mixed

func (*Protocol) GetName

func (x *Protocol) GetName() string

func (*Protocol) GetProtocol

func (m *Protocol) GetProtocol() isProtocol_Protocol

func (*Protocol) GetRedir

func (x *Protocol) GetRedir() *Redir

func (*Protocol) GetSocks4A

func (x *Protocol) GetSocks4A() *Socks4A

func (*Protocol) GetSocks5

func (x *Protocol) GetSocks5() *Socks5

func (*Protocol) GetTproxy

func (x *Protocol) GetTproxy() *Tproxy

func (*Protocol) GetTun

func (x *Protocol) GetTun() *Tun

func (*Protocol) GetYuubinsya

func (x *Protocol) GetYuubinsya() *Yuubinsya

func (*Protocol) ProtoMessage

func (*Protocol) ProtoMessage()

func (*Protocol) ProtoReflect

func (x *Protocol) ProtoReflect() protoreflect.Message

func (*Protocol) Reset

func (x *Protocol) Reset()

func (*Protocol) String

func (x *Protocol) String() string

type Protocol_Http

type Protocol_Http struct {
	Http *Http `protobuf:"bytes,3,opt,name=http,proto3,oneof"`
}

type Protocol_Mix

type Protocol_Mix struct {
	Mix *Mixed `protobuf:"bytes,8,opt,name=mix,json=mixed,proto3,oneof"`
}

type Protocol_Redir

type Protocol_Redir struct {
	Redir *Redir `protobuf:"bytes,5,opt,name=redir,proto3,oneof"`
}

type Protocol_Socks4A

type Protocol_Socks4A struct {
	Socks4A *Socks4A `protobuf:"bytes,9,opt,name=socks4a,proto3,oneof"`
}

type Protocol_Socks5

type Protocol_Socks5 struct {
	Socks5 *Socks5 `protobuf:"bytes,4,opt,name=socks5,proto3,oneof"`
}

type Protocol_Tproxy

type Protocol_Tproxy struct {
	Tproxy *Tproxy `protobuf:"bytes,10,opt,name=tproxy,proto3,oneof"`
}

type Protocol_Tun

type Protocol_Tun struct {
	Tun *Tun `protobuf:"bytes,6,opt,name=tun,proto3,oneof"`
}

type Protocol_Yuubinsya

type Protocol_Yuubinsya struct {
	Yuubinsya *Yuubinsya `protobuf:"bytes,7,opt,name=yuubinsya,proto3,oneof"`
}

type Quic

type Quic struct {
	Tls *TlsConfig `protobuf:"bytes,1,opt,name=tls,proto3" json:"tls,omitempty"`
	// contains filtered or unexported fields
}

func (*Quic) Descriptor deprecated

func (*Quic) Descriptor() ([]byte, []int)

Deprecated: Use Quic.ProtoReflect.Descriptor instead.

func (*Quic) GetTls

func (x *Quic) GetTls() *TlsConfig

func (*Quic) ProtoMessage

func (*Quic) ProtoMessage()

func (*Quic) ProtoReflect

func (x *Quic) ProtoReflect() protoreflect.Message

func (*Quic) Reset

func (x *Quic) Reset()

func (*Quic) String

func (x *Quic) String() string

type Quic2 added in v0.3.3

type Quic2 struct {
	Host string     `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"`
	Tls  *TlsConfig `protobuf:"bytes,3,opt,name=tls,proto3" json:"tls,omitempty"`
	// contains filtered or unexported fields
}

func (*Quic2) Descriptor deprecated added in v0.3.3

func (*Quic2) Descriptor() ([]byte, []int)

Deprecated: Use Quic2.ProtoReflect.Descriptor instead.

func (*Quic2) GetHost added in v0.3.3

func (x *Quic2) GetHost() string

func (*Quic2) GetTls added in v0.3.3

func (x *Quic2) GetTls() *TlsConfig

func (*Quic2) ProtoMessage added in v0.3.3

func (*Quic2) ProtoMessage()

func (*Quic2) ProtoReflect added in v0.3.3

func (x *Quic2) ProtoReflect() protoreflect.Message

func (*Quic2) Reset added in v0.3.3

func (x *Quic2) Reset()

func (*Quic2) String added in v0.3.3

func (x *Quic2) String() string

type Reality

type Reality struct {
	ShortId    []string `protobuf:"bytes,1,rep,name=short_id,proto3" json:"short_id,omitempty"`
	ServerName []string `protobuf:"bytes,2,rep,name=server_name,proto3" json:"server_name,omitempty"`
	Dest       string   `protobuf:"bytes,3,opt,name=dest,proto3" json:"dest,omitempty"`
	PrivateKey string   `protobuf:"bytes,4,opt,name=private_key,proto3" json:"private_key,omitempty"`
	Debug      bool     `protobuf:"varint,5,opt,name=debug,proto3" json:"debug,omitempty"`
	// contains filtered or unexported fields
}

func (*Reality) Descriptor deprecated

func (*Reality) Descriptor() ([]byte, []int)

Deprecated: Use Reality.ProtoReflect.Descriptor instead.

func (*Reality) GetDebug

func (x *Reality) GetDebug() bool

func (*Reality) GetDest

func (x *Reality) GetDest() string

func (*Reality) GetPrivateKey

func (x *Reality) GetPrivateKey() string

func (*Reality) GetServerName

func (x *Reality) GetServerName() []string

func (*Reality) GetShortId

func (x *Reality) GetShortId() []string

func (*Reality) ProtoMessage

func (*Reality) ProtoMessage()

func (*Reality) ProtoReflect

func (x *Reality) ProtoReflect() protoreflect.Message

func (*Reality) Reset

func (x *Reality) Reset()

func (*Reality) String

func (x *Reality) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Redir.ProtoReflect.Descriptor instead.

func (*Redir) GetHost

func (x *Redir) GetHost() string

func (*Redir) ProtoMessage

func (*Redir) ProtoMessage()

func (*Redir) ProtoReflect

func (x *Redir) ProtoReflect() protoreflect.Message

func (*Redir) Reset

func (x *Redir) Reset()

func (*Redir) String

func (x *Redir) String() string

type Route added in v0.3.4

type Route struct {
	Routes   []string `protobuf:"bytes,1,rep,name=routes,proto3" json:"routes,omitempty"`
	Excludes []string `protobuf:"bytes,2,rep,name=excludes,proto3" json:"excludes,omitempty"`
	// contains filtered or unexported fields
}

func (*Route) Descriptor deprecated added in v0.3.4

func (*Route) Descriptor() ([]byte, []int)

Deprecated: Use Route.ProtoReflect.Descriptor instead.

func (*Route) GetExcludes added in v0.3.4

func (x *Route) GetExcludes() []string

func (*Route) GetRoutes added in v0.3.4

func (x *Route) GetRoutes() []string

func (*Route) ProtoMessage added in v0.3.4

func (*Route) ProtoMessage()

func (*Route) ProtoReflect added in v0.3.4

func (x *Route) ProtoReflect() protoreflect.Message

func (*Route) Reset added in v0.3.4

func (x *Route) Reset()

func (*Route) String added in v0.3.4

func (x *Route) String() string

type Socks4A

type Socks4A struct {

	// Deprecated: Marked as deprecated in config/listener/listener.proto.
	Host     string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"`
	Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"`
	// contains filtered or unexported fields
}

func (*Socks4A) Descriptor deprecated

func (*Socks4A) Descriptor() ([]byte, []int)

Deprecated: Use Socks4A.ProtoReflect.Descriptor instead.

func (*Socks4A) GetHost deprecated

func (x *Socks4A) GetHost() string

Deprecated: Marked as deprecated in config/listener/listener.proto.

func (*Socks4A) GetUsername

func (x *Socks4A) GetUsername() string

func (*Socks4A) ProtoMessage

func (*Socks4A) ProtoMessage()

func (*Socks4A) ProtoReflect

func (x *Socks4A) ProtoReflect() protoreflect.Message

func (*Socks4A) Reset

func (x *Socks4A) Reset()

func (*Socks4A) String

func (x *Socks4A) String() string

type Socks5

type Socks5 struct {

	// Deprecated: Marked as deprecated in config/listener/listener.proto.
	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"`
	Udp      bool   `protobuf:"varint,5,opt,name=udp,proto3" json:"udp,omitempty"`
	// contains filtered or unexported fields
}

func (*Socks5) Descriptor deprecated

func (*Socks5) Descriptor() ([]byte, []int)

Deprecated: Use Socks5.ProtoReflect.Descriptor instead.

func (*Socks5) GetHost deprecated

func (x *Socks5) GetHost() string

Deprecated: Marked as deprecated in config/listener/listener.proto.

func (*Socks5) GetPassword

func (x *Socks5) GetPassword() string

func (*Socks5) GetUdp added in v0.3.3

func (x *Socks5) GetUdp() bool

func (*Socks5) GetUsername

func (x *Socks5) GetUsername() string

func (*Socks5) ProtoMessage

func (*Socks5) ProtoMessage()

func (*Socks5) ProtoReflect

func (x *Socks5) ProtoReflect() protoreflect.Message

func (*Socks5) Reset

func (x *Socks5) Reset()

func (*Socks5) String

func (x *Socks5) String() string

type TcpUdpControl added in v0.3.4

type TcpUdpControl int32
const (
	TcpUdpControl_tcp_udp_control_all TcpUdpControl = 0
	TcpUdpControl_disable_tcp         TcpUdpControl = 1
	TcpUdpControl_disable_udp         TcpUdpControl = 2
)

func (TcpUdpControl) Descriptor added in v0.3.4

func (TcpUdpControl) Enum added in v0.3.4

func (x TcpUdpControl) Enum() *TcpUdpControl

func (TcpUdpControl) EnumDescriptor deprecated added in v0.3.4

func (TcpUdpControl) EnumDescriptor() ([]byte, []int)

Deprecated: Use TcpUdpControl.Descriptor instead.

func (TcpUdpControl) Number added in v0.3.4

func (TcpUdpControl) String added in v0.3.4

func (x TcpUdpControl) String() string

func (TcpUdpControl) Type added in v0.3.4

type Tcpudp added in v0.3.3

type Tcpudp struct {
	Host    string        `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"`
	Control TcpUdpControl `protobuf:"varint,2,opt,name=control,proto3,enum=yuhaiin.listener.TcpUdpControl" json:"control,omitempty"`
	// contains filtered or unexported fields
}

func (*Tcpudp) Descriptor deprecated added in v0.3.3

func (*Tcpudp) Descriptor() ([]byte, []int)

Deprecated: Use Tcpudp.ProtoReflect.Descriptor instead.

func (*Tcpudp) GetControl added in v0.3.4

func (x *Tcpudp) GetControl() TcpUdpControl

func (*Tcpudp) GetHost added in v0.3.3

func (x *Tcpudp) GetHost() string

func (*Tcpudp) ProtoMessage added in v0.3.3

func (*Tcpudp) ProtoMessage()

func (*Tcpudp) ProtoReflect added in v0.3.3

func (x *Tcpudp) ProtoReflect() protoreflect.Message

func (*Tcpudp) Reset added in v0.3.3

func (x *Tcpudp) Reset()

func (*Tcpudp) String added in v0.3.3

func (x *Tcpudp) String() string

type Tls

type Tls struct {
	Tls *TlsConfig `protobuf:"bytes,1,opt,name=tls,proto3" json:"tls,omitempty"`
	// contains filtered or unexported fields
}

func (*Tls) Descriptor deprecated

func (*Tls) Descriptor() ([]byte, []int)

Deprecated: Use Tls.ProtoReflect.Descriptor instead.

func (*Tls) GetTls

func (x *Tls) GetTls() *TlsConfig

func (*Tls) ProtoMessage

func (*Tls) ProtoMessage()

func (*Tls) ProtoReflect

func (x *Tls) ProtoReflect() protoreflect.Message

func (*Tls) Reset

func (x *Tls) Reset()

func (*Tls) String

func (x *Tls) String() string

type TlsConfig

type TlsConfig struct {
	Certificates          []*Certificate          `protobuf:"bytes,1,rep,name=certificates,proto3" json:"certificates,omitempty"`
	NextProtos            []string                `protobuf:"bytes,3,rep,name=next_protos,proto3" json:"next_protos,omitempty"`
	ServerNameCertificate map[string]*Certificate `` /* 187-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*TlsConfig) Descriptor deprecated

func (*TlsConfig) Descriptor() ([]byte, []int)

Deprecated: Use TlsConfig.ProtoReflect.Descriptor instead.

func (*TlsConfig) GetCertificates

func (x *TlsConfig) GetCertificates() []*Certificate

func (*TlsConfig) GetNextProtos

func (x *TlsConfig) GetNextProtos() []string

func (*TlsConfig) GetServerNameCertificate

func (x *TlsConfig) GetServerNameCertificate() map[string]*Certificate

func (*TlsConfig) ParseCertificates

func (t *TlsConfig) ParseCertificates() []tls.Certificate

func (*TlsConfig) ParseServerNameCertificate

func (t *TlsConfig) ParseServerNameCertificate() *trie.Trie[*tls.Certificate]

func (*TlsConfig) ProtoMessage

func (*TlsConfig) ProtoMessage()

func (*TlsConfig) ProtoReflect

func (x *TlsConfig) ProtoReflect() protoreflect.Message

func (*TlsConfig) Reset

func (x *TlsConfig) Reset()

func (*TlsConfig) String

func (x *TlsConfig) String() string

type TlsConfigManager

type TlsConfigManager struct {
	// contains filtered or unexported fields
}

func NewTlsConfigManager

func NewTlsConfigManager(t *TlsConfig) *TlsConfigManager

func (*TlsConfigManager) Refresh

func (t *TlsConfigManager) Refresh()

type Tproxy

type Tproxy struct {
	Host         string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"`
	DnsHijacking bool   `protobuf:"varint,2,opt,name=dns_hijacking,proto3" json:"dns_hijacking,omitempty"`
	ForceFakeip  bool   `protobuf:"varint,3,opt,name=force_fakeip,proto3" json:"force_fakeip,omitempty"`
	// contains filtered or unexported fields
}

func (*Tproxy) Descriptor deprecated

func (*Tproxy) Descriptor() ([]byte, []int)

Deprecated: Use Tproxy.ProtoReflect.Descriptor instead.

func (*Tproxy) GetDnsHijacking

func (x *Tproxy) GetDnsHijacking() bool

func (*Tproxy) GetForceFakeip

func (x *Tproxy) GetForceFakeip() bool

func (*Tproxy) GetHost

func (x *Tproxy) GetHost() string

func (*Tproxy) ProtoMessage

func (*Tproxy) ProtoMessage()

func (*Tproxy) ProtoReflect

func (x *Tproxy) ProtoReflect() protoreflect.Message

func (*Tproxy) Reset

func (x *Tproxy) Reset()

func (*Tproxy) String

func (x *Tproxy) String() string

type Transport added in v0.3.3

type Transport struct {

	// Types that are assignable to Transport:
	//
	//	*Transport_Normal
	//	*Transport_Tls
	//	*Transport_Mux
	//	*Transport_Http2
	//	*Transport_Websocket
	//	*Transport_Grpc
	//	*Transport_Reality
	Transport isTransport_Transport `protobuf_oneof:"transport"`
	// contains filtered or unexported fields
}

func (*Transport) Descriptor deprecated added in v0.3.3

func (*Transport) Descriptor() ([]byte, []int)

Deprecated: Use Transport.ProtoReflect.Descriptor instead.

func (*Transport) GetGrpc added in v0.3.3

func (x *Transport) GetGrpc() *Grpc

func (*Transport) GetHttp2 added in v0.3.3

func (x *Transport) GetHttp2() *Http2

func (*Transport) GetMux added in v0.3.3

func (x *Transport) GetMux() *Mux

func (*Transport) GetNormal added in v0.3.3

func (x *Transport) GetNormal() *Normal

func (*Transport) GetReality added in v0.3.3

func (x *Transport) GetReality() *Reality

func (*Transport) GetTls added in v0.3.3

func (x *Transport) GetTls() *Tls

func (*Transport) GetTransport added in v0.3.3

func (m *Transport) GetTransport() isTransport_Transport

func (*Transport) GetWebsocket added in v0.3.3

func (x *Transport) GetWebsocket() *Websocket

func (*Transport) ProtoMessage added in v0.3.3

func (*Transport) ProtoMessage()

func (*Transport) ProtoReflect added in v0.3.3

func (x *Transport) ProtoReflect() protoreflect.Message

func (*Transport) Reset added in v0.3.3

func (x *Transport) Reset()

func (*Transport) String added in v0.3.3

func (x *Transport) String() string

type Transport_Grpc added in v0.3.3

type Transport_Grpc struct {
	Grpc *Grpc `protobuf:"bytes,11,opt,name=grpc,proto3,oneof"`
}

type Transport_Http2 added in v0.3.3

type Transport_Http2 struct {
	Http2 *Http2 `protobuf:"bytes,5,opt,name=http2,proto3,oneof"`
}

type Transport_Mux added in v0.3.3

type Transport_Mux struct {
	Mux *Mux `protobuf:"bytes,2,opt,name=mux,proto3,oneof"`
}

type Transport_Normal added in v0.3.3

type Transport_Normal struct {
	Normal *Normal `protobuf:"bytes,12,opt,name=normal,proto3,oneof"`
}

type Transport_Reality added in v0.3.3

type Transport_Reality struct {
	Reality *Reality `protobuf:"bytes,10,opt,name=reality,proto3,oneof"`
}

type Transport_Tls added in v0.3.3

type Transport_Tls struct {
	Tls *Tls `protobuf:"bytes,1,opt,name=tls,proto3,oneof"`
}

type Transport_Websocket added in v0.3.3

type Transport_Websocket struct {
	Websocket *Websocket `protobuf:"bytes,6,opt,name=websocket,proto3,oneof"`
}

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"`
	// Deprecated: Marked as deprecated in config/listener/listener.proto.
	Gateway string `protobuf:"bytes,3,opt,name=gateway,proto3" json:"gateway,omitempty"`
	// Deprecated: Marked as deprecated in config/listener/listener.proto.
	DnsHijacking  bool              `protobuf:"varint,4,opt,name=dns_hijacking,proto3" json:"dns_hijacking,omitempty"`
	ForceFakeip   bool              `protobuf:"varint,9,opt,name=force_fakeip,proto3" json:"force_fakeip,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"`
	PortalV6      string            `protobuf:"bytes,11,opt,name=portal_v6,proto3" json:"portal_v6,omitempty"`
	Route         *Route            `protobuf:"bytes,10,opt,name=route,proto3" json:"route,omitempty"`
	// contains filtered or unexported fields
}

func (*Tun) Descriptor deprecated

func (*Tun) Descriptor() ([]byte, []int)

Deprecated: Use Tun.ProtoReflect.Descriptor instead.

func (*Tun) GetDnsHijacking deprecated

func (x *Tun) GetDnsHijacking() bool

Deprecated: Marked as deprecated in config/listener/listener.proto.

func (*Tun) GetDriver

func (x *Tun) GetDriver() TunEndpointDriver

func (*Tun) GetForceFakeip

func (x *Tun) GetForceFakeip() bool

func (*Tun) GetGateway deprecated

func (x *Tun) GetGateway() string

Deprecated: Marked as deprecated in config/listener/listener.proto.

func (*Tun) GetMtu

func (x *Tun) GetMtu() int32

func (*Tun) GetName

func (x *Tun) GetName() string

func (*Tun) GetPortal

func (x *Tun) GetPortal() string

func (*Tun) GetPortalV6 added in v0.3.4

func (x *Tun) GetPortalV6() string

func (*Tun) GetRoute added in v0.3.4

func (x *Tun) GetRoute() *Route

func (*Tun) GetSkipMulticast

func (x *Tun) GetSkipMulticast() bool

func (*Tun) ProtoMessage

func (*Tun) ProtoMessage()

func (*Tun) ProtoReflect

func (x *Tun) ProtoReflect() protoreflect.Message

func (*Tun) Reset

func (x *Tun) Reset()

func (*Tun) String

func (x *Tun) String() string

type TunEndpointDriver

type TunEndpointDriver int32
const (
	Tun_fdbased       TunEndpointDriver = 0
	Tun_channel       TunEndpointDriver = 1
	Tun_system_gvisor TunEndpointDriver = 2
)

func (TunEndpointDriver) Descriptor

func (TunEndpointDriver) Enum

func (TunEndpointDriver) EnumDescriptor deprecated

func (TunEndpointDriver) EnumDescriptor() ([]byte, []int)

Deprecated: Use TunEndpointDriver.Descriptor instead.

func (TunEndpointDriver) Number

func (TunEndpointDriver) String

func (x TunEndpointDriver) String() string

func (TunEndpointDriver) Type

type Websocket

type Websocket struct {

	// Deprecated: Marked as deprecated in config/listener/listener.proto.
	Tls *TlsConfig `protobuf:"bytes,1,opt,name=tls,proto3" json:"tls,omitempty"`
	// contains filtered or unexported fields
}

func (*Websocket) Descriptor deprecated

func (*Websocket) Descriptor() ([]byte, []int)

Deprecated: Use Websocket.ProtoReflect.Descriptor instead.

func (*Websocket) GetTls deprecated

func (x *Websocket) GetTls() *TlsConfig

Deprecated: Marked as deprecated in config/listener/listener.proto.

func (*Websocket) ProtoMessage

func (*Websocket) ProtoMessage()

func (*Websocket) ProtoReflect

func (x *Websocket) ProtoReflect() protoreflect.Message

func (*Websocket) Reset

func (x *Websocket) Reset()

func (*Websocket) String

func (x *Websocket) String() string

type Yuubinsya

type Yuubinsya struct {

	// Deprecated: Marked as deprecated in config/listener/listener.proto.
	Host                string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"`
	Password            string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
	ForceDisableEncrypt bool   `protobuf:"varint,8,opt,name=force_disable_encrypt,proto3" json:"force_disable_encrypt,omitempty"`
	Mux                 bool   `protobuf:"varint,11,opt,name=mux,proto3" json:"mux,omitempty"`
	// Types that are assignable to Protocol:
	//
	//	*Yuubinsya_Normal
	//	*Yuubinsya_Tls
	//	*Yuubinsya_Quic
	//	*Yuubinsya_Websocket
	//	*Yuubinsya_Grpc
	//	*Yuubinsya_Http2
	//	*Yuubinsya_Reality
	Protocol isYuubinsya_Protocol `protobuf_oneof:"protocol"`
	// contains filtered or unexported fields
}

func (*Yuubinsya) Descriptor deprecated

func (*Yuubinsya) Descriptor() ([]byte, []int)

Deprecated: Use Yuubinsya.ProtoReflect.Descriptor instead.

func (*Yuubinsya) GetForceDisableEncrypt

func (x *Yuubinsya) GetForceDisableEncrypt() bool

func (*Yuubinsya) GetGrpc deprecated

func (x *Yuubinsya) GetGrpc() *Grpc

Deprecated: Marked as deprecated in config/listener/listener.proto.

func (*Yuubinsya) GetHost deprecated

func (x *Yuubinsya) GetHost() string

Deprecated: Marked as deprecated in config/listener/listener.proto.

func (*Yuubinsya) GetHttp2 deprecated

func (x *Yuubinsya) GetHttp2() *Http2

Deprecated: Marked as deprecated in config/listener/listener.proto.

func (*Yuubinsya) GetMux

func (x *Yuubinsya) GetMux() bool

func (*Yuubinsya) GetNormal deprecated

func (x *Yuubinsya) GetNormal() *Normal

Deprecated: Marked as deprecated in config/listener/listener.proto.

func (*Yuubinsya) GetPassword

func (x *Yuubinsya) GetPassword() string

func (*Yuubinsya) GetProtocol

func (m *Yuubinsya) GetProtocol() isYuubinsya_Protocol

func (*Yuubinsya) GetQuic deprecated

func (x *Yuubinsya) GetQuic() *Quic

Deprecated: Marked as deprecated in config/listener/listener.proto.

func (*Yuubinsya) GetReality deprecated

func (x *Yuubinsya) GetReality() *Reality

Deprecated: Marked as deprecated in config/listener/listener.proto.

func (*Yuubinsya) GetTls deprecated

func (x *Yuubinsya) GetTls() *Tls

Deprecated: Marked as deprecated in config/listener/listener.proto.

func (*Yuubinsya) GetWebsocket deprecated

func (x *Yuubinsya) GetWebsocket() *Websocket

Deprecated: Marked as deprecated in config/listener/listener.proto.

func (*Yuubinsya) ProtoMessage

func (*Yuubinsya) ProtoMessage()

func (*Yuubinsya) ProtoReflect

func (x *Yuubinsya) ProtoReflect() protoreflect.Message

func (*Yuubinsya) Reset

func (x *Yuubinsya) Reset()

func (*Yuubinsya) String

func (x *Yuubinsya) String() string

type YuubinsyaProtocolNormal

type YuubinsyaProtocolNormal struct {
	// contains filtered or unexported fields
}

func (*YuubinsyaProtocolNormal) Descriptor deprecated

func (*YuubinsyaProtocolNormal) Descriptor() ([]byte, []int)

Deprecated: Use YuubinsyaProtocolNormal.ProtoReflect.Descriptor instead.

func (*YuubinsyaProtocolNormal) ProtoMessage

func (*YuubinsyaProtocolNormal) ProtoMessage()

func (*YuubinsyaProtocolNormal) ProtoReflect

func (x *YuubinsyaProtocolNormal) ProtoReflect() protoreflect.Message

func (*YuubinsyaProtocolNormal) Reset

func (x *YuubinsyaProtocolNormal) Reset()

func (*YuubinsyaProtocolNormal) String

func (x *YuubinsyaProtocolNormal) String() string

type Yuubinsya_Grpc

type Yuubinsya_Grpc struct {
	// Deprecated: Marked as deprecated in config/listener/listener.proto.
	Grpc *Grpc `protobuf:"bytes,7,opt,name=grpc,proto3,oneof"`
}

type Yuubinsya_Http2

type Yuubinsya_Http2 struct {
	// Deprecated: Marked as deprecated in config/listener/listener.proto.
	Http2 *Http2 `protobuf:"bytes,9,opt,name=http2,proto3,oneof"`
}

type Yuubinsya_Normal

type Yuubinsya_Normal struct {
	// Deprecated: Marked as deprecated in config/listener/listener.proto.
	Normal *Normal `protobuf:"bytes,3,opt,name=normal,proto3,oneof"`
}

type Yuubinsya_Quic

type Yuubinsya_Quic struct {
	// Deprecated: Marked as deprecated in config/listener/listener.proto.
	Quic *Quic `protobuf:"bytes,5,opt,name=quic,proto3,oneof"`
}

type Yuubinsya_Reality

type Yuubinsya_Reality struct {
	// Deprecated: Marked as deprecated in config/listener/listener.proto.
	Reality *Reality `protobuf:"bytes,10,opt,name=reality,proto3,oneof"`
}

type Yuubinsya_Tls

type Yuubinsya_Tls struct {
	// Deprecated: Marked as deprecated in config/listener/listener.proto.
	Tls *Tls `protobuf:"bytes,4,opt,name=tls,proto3,oneof"`
}

type Yuubinsya_Websocket

type Yuubinsya_Websocket struct {
	// Deprecated: Marked as deprecated in config/listener/listener.proto.
	Websocket *Websocket `protobuf:"bytes,6,opt,name=websocket,proto3,oneof"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL