inbound

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2022 License: MPL-2.0 Imports: 32 Imported by: 42

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_proxy_vless_inbound_config_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Config

type Config struct {
	Clients []*protocol.User `protobuf:"bytes,1,rep,name=clients,proto3" json:"clients,omitempty"`
	// Decryption settings. Only applies to server side, and only accepts "none"
	// for now.
	Decryption string      `protobuf:"bytes,2,opt,name=decryption,proto3" json:"decryption,omitempty"`
	Fallbacks  []*Fallback `protobuf:"bytes,3,rep,name=fallbacks,proto3" json:"fallbacks,omitempty"`
	// contains filtered or unexported fields
}

func (*Config) Descriptor deprecated

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

Deprecated: Use Config.ProtoReflect.Descriptor instead.

func (*Config) GetClients

func (x *Config) GetClients() []*protocol.User

func (*Config) GetDecryption

func (x *Config) GetDecryption() string

func (*Config) GetFallbacks

func (x *Config) GetFallbacks() []*Fallback

func (*Config) ProtoMessage

func (*Config) ProtoMessage()

func (*Config) ProtoReflect

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

func (*Config) Reset

func (x *Config) Reset()

func (*Config) String

func (x *Config) String() string

type Fallback

type Fallback struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Alpn string `protobuf:"bytes,2,opt,name=alpn,proto3" json:"alpn,omitempty"`
	Path string `protobuf:"bytes,3,opt,name=path,proto3" json:"path,omitempty"`
	Type string `protobuf:"bytes,4,opt,name=type,proto3" json:"type,omitempty"`
	Dest string `protobuf:"bytes,5,opt,name=dest,proto3" json:"dest,omitempty"`
	Xver uint64 `protobuf:"varint,6,opt,name=xver,proto3" json:"xver,omitempty"`
	// contains filtered or unexported fields
}

func (*Fallback) Descriptor deprecated

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

Deprecated: Use Fallback.ProtoReflect.Descriptor instead.

func (*Fallback) GetAlpn

func (x *Fallback) GetAlpn() string

func (*Fallback) GetDest

func (x *Fallback) GetDest() string

func (*Fallback) GetName added in v1.2.2

func (x *Fallback) GetName() string

func (*Fallback) GetPath

func (x *Fallback) GetPath() string

func (*Fallback) GetType

func (x *Fallback) GetType() string

func (*Fallback) GetXver

func (x *Fallback) GetXver() uint64

func (*Fallback) ProtoMessage

func (*Fallback) ProtoMessage()

func (*Fallback) ProtoReflect

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

func (*Fallback) Reset

func (x *Fallback) Reset()

func (*Fallback) String

func (x *Fallback) String() string

type Handler

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

Handler is an inbound connection handler that handles messages in VLess protocol.

func New

func New(ctx context.Context, config *Config, dc dns.Client) (*Handler, error)

New creates a new VLess inbound handler.

func (*Handler) AddUser

func (h *Handler) AddUser(ctx context.Context, u *protocol.MemoryUser) error

AddUser implements proxy.UserManager.AddUser().

func (*Handler) Close

func (h *Handler) Close() error

Close implements common.Closable.Close().

func (*Handler) Network

func (*Handler) Network() []net.Network

Network implements proxy.Inbound.Network().

func (*Handler) Process

func (h *Handler) Process(ctx context.Context, network net.Network, connection stat.Connection, dispatcher routing.Dispatcher) error

Process implements proxy.Inbound.Process().

func (*Handler) RemoveUser

func (h *Handler) RemoveUser(ctx context.Context, e string) error

RemoveUser implements proxy.UserManager.RemoveUser().

Jump to

Keyboard shortcuts

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