inbound

package
v3.18.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2018 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	User                 []*v2ray_core_common_protocol.User `protobuf:"bytes,1,rep,name=user" json:"user,omitempty"`
	Default              *DefaultConfig                     `protobuf:"bytes,2,opt,name=default" json:"default,omitempty"`
	Detour               *DetourConfig                      `protobuf:"bytes,3,opt,name=detour" json:"detour,omitempty"`
	SecureEncryptionOnly bool                               `protobuf:"varint,4,opt,name=secure_encryption_only,json=secureEncryptionOnly" json:"secure_encryption_only,omitempty"`
}

func (*Config) Descriptor

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

func (*Config) GetDefault

func (m *Config) GetDefault() *DefaultConfig

func (*Config) GetDefaultValue

func (c *Config) GetDefaultValue() *DefaultConfig

GetDefaultValue returns default settings of DefaultConfig.

func (*Config) GetDetour

func (m *Config) GetDetour() *DetourConfig

func (*Config) GetSecureEncryptionOnly

func (m *Config) GetSecureEncryptionOnly() bool

func (*Config) GetUser

func (m *Config) GetUser() []*v2ray_core_common_protocol.User

func (*Config) ProtoMessage

func (*Config) ProtoMessage()

func (*Config) Reset

func (m *Config) Reset()

func (*Config) String

func (m *Config) String() string

type DefaultConfig

type DefaultConfig struct {
	AlterId uint32 `protobuf:"varint,1,opt,name=alter_id,json=alterId" json:"alter_id,omitempty"`
	Level   uint32 `protobuf:"varint,2,opt,name=level" json:"level,omitempty"`
}

func (*DefaultConfig) Descriptor

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

func (*DefaultConfig) GetAlterId

func (m *DefaultConfig) GetAlterId() uint32

func (*DefaultConfig) GetLevel

func (m *DefaultConfig) GetLevel() uint32

func (*DefaultConfig) ProtoMessage

func (*DefaultConfig) ProtoMessage()

func (*DefaultConfig) Reset

func (m *DefaultConfig) Reset()

func (*DefaultConfig) String

func (m *DefaultConfig) String() string

type DetourConfig

type DetourConfig struct {
	To string `protobuf:"bytes,1,opt,name=to" json:"to,omitempty"`
}

func (*DetourConfig) Descriptor

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

func (*DetourConfig) GetTo

func (m *DetourConfig) GetTo() string

func (*DetourConfig) ProtoMessage

func (*DetourConfig) ProtoMessage()

func (*DetourConfig) Reset

func (m *DetourConfig) Reset()

func (*DetourConfig) String

func (m *DetourConfig) String() string

type Handler

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

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

func New

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

New creates a new VMess inbound handler.

func (*Handler) AddUser

func (h *Handler) AddUser(ctx context.Context, user *protocol.User) error

func (*Handler) Close

func (h *Handler) Close() error

Close implements common.Closable.

func (*Handler) GetUser

func (h *Handler) GetUser(email string) *protocol.User

func (*Handler) Network

func (*Handler) Network() net.NetworkList

Network implements proxy.Inbound.Network().

func (*Handler) Process

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

Process implements proxy.Inbound.Process().

func (*Handler) RemoveUser

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

Jump to

Keyboard shortcuts

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