vmess

package
v1.4.6 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2024 License: AGPL-3.0 Imports: 36 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LocalizePassages

func LocalizePassages(passages []server.Passage) (psgs []Passage, manager *Passage)

func New

func New(valueCtx context.Context, dialer netproxy.Dialer) (server.Server, error)

func NewJohn added in v1.1.3

func NewJohn(valueCtx context.Context, dialer netproxy.Dialer, sweetLisaHost config.Lisa, arg server.Argument, protocol protocol.Protocol) (server.Server, error)

func NewJohnTCP added in v1.2.0

func NewJohnTCP(valueCtx context.Context, dialer netproxy.Dialer, sweetLisaHost config.Lisa, arg server.Argument) (server.Server, error)

func NewJohnTlsGrpc added in v1.2.0

func NewJohnTlsGrpc(valueCtx context.Context, dialer netproxy.Dialer, sweetLisaHost config.Lisa, arg server.Argument) (server.Server, error)

Types

type Passage

type Passage struct {
	server.Passage
	// contains filtered or unexported fields
}

type Server

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

func (*Server) AddPassages

func (s *Server) AddPassages(passages []server.Passage) (err error)

func (*Server) Close

func (s *Server) Close() error

func (*Server) ContentionCheck

func (s *Server) ContentionCheck(thisIP net.IP, passage *Passage) (err error)

func (*Server) GetUserContextOrInsert added in v1.1.5

func (s *Server) GetUserContextOrInsert(userIP string) *UserContext

func (*Server) Listen

func (s *Server) Listen(addr string) (err error)

func (*Server) Passages

func (s *Server) Passages() (passages []server.Passage)

func (*Server) RemovePassages

func (s *Server) RemovePassages(passages []server.Passage, alsoManager bool) (err error)

func (*Server) SyncPassages

func (s *Server) SyncPassages(passages []server.Passage) (err error)

type UserContext added in v1.1.5

type UserContext lrulist.LruList

UserContext is the context of a user which indicates the preferred servers

func NewUserContext added in v1.1.5

func NewUserContext(passages []Passage) *UserContext

func (*UserContext) Auth added in v1.1.5

func (ctx *UserContext) Auth(probe func(*Passage) ([]byte, bool)) (hit *Passage, content []byte)

func (*UserContext) Close added in v1.1.5

func (ctx *UserContext) Close() error

func (*UserContext) Infra added in v1.1.5

func (ctx *UserContext) Infra() *lrulist.LruList

type UserContextPool added in v1.1.5

type UserContextPool lru.LRU

UserContextPool is a pool which saves the UserContext and eliminates unused UserContext over time

func (*UserContextPool) Infra added in v1.1.5

func (pool *UserContextPool) Infra() *lru.LRU

Jump to

Keyboard shortcuts

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