inbound

package
v4.6.4+incompatible Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2018 License: MIT Imports: 26 Imported by: 15

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

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

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() []*protocol.User

func (*Config) ProtoMessage

func (*Config) ProtoMessage()

func (*Config) Reset

func (m *Config) Reset()

func (*Config) String

func (m *Config) String() string

func (*Config) XXX_DiscardUnknown

func (m *Config) XXX_DiscardUnknown()

func (*Config) XXX_Marshal

func (m *Config) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Config) XXX_Merge

func (m *Config) XXX_Merge(src proto.Message)

func (*Config) XXX_Size

func (m *Config) XXX_Size() int

func (*Config) XXX_Unmarshal

func (m *Config) XXX_Unmarshal(b []byte) error

type DefaultConfig added in v1.9.1

type DefaultConfig struct {
	AlterId              uint32   `protobuf:"varint,1,opt,name=alter_id,json=alterId,proto3" json:"alter_id,omitempty"`
	Level                uint32   `protobuf:"varint,2,opt,name=level,proto3" json:"level,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

func (*DefaultConfig) XXX_DiscardUnknown

func (m *DefaultConfig) XXX_DiscardUnknown()

func (*DefaultConfig) XXX_Marshal

func (m *DefaultConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DefaultConfig) XXX_Merge

func (m *DefaultConfig) XXX_Merge(src proto.Message)

func (*DefaultConfig) XXX_Size

func (m *DefaultConfig) XXX_Size() int

func (*DefaultConfig) XXX_Unmarshal

func (m *DefaultConfig) XXX_Unmarshal(b []byte) error

type DetourConfig added in v1.9.1

type DetourConfig struct {
	To                   string   `protobuf:"bytes,1,opt,name=to,proto3" json:"to,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

func (*DetourConfig) XXX_DiscardUnknown

func (m *DetourConfig) XXX_DiscardUnknown()

func (*DetourConfig) XXX_Marshal

func (m *DetourConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DetourConfig) XXX_Merge

func (m *DetourConfig) XXX_Merge(src proto.Message)

func (*DetourConfig) XXX_Size

func (m *DetourConfig) XXX_Size() int

func (*DetourConfig) XXX_Unmarshal

func (m *DetourConfig) XXX_Unmarshal(b []byte) error

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.MemoryUser) error

func (*Handler) Close

func (h *Handler) Close() error

Close implements common.Closable.

func (*Handler) GetUser

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

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 internet.Connection, dispatcher routing.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