v2ray

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2021 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InjectV2rayMiddleware

func InjectV2rayMiddleware(v2 *V2ray) func(next echo.HandlerFunc) echo.HandlerFunc

Types

type ContextKey

type ContextKey string
const ContextV2rayKey ContextKey = "v2"

type V2ray

type V2ray struct {
	Server *core.Instance
	// contains filtered or unexported fields
}

func New

func New(users []models.V2rayUser) (v2 *V2ray, err error)

func (*V2ray) AddUser

func (v2 *V2ray) AddUser(user models.V2rayUser) (err error)

func (*V2ray) RemoveUser

func (v2 *V2ray) RemoveUser(id string) (err error)

type V2rayControl

type V2rayControl interface {
	AddUser(user models.V2rayUser) error
	RemoveUser(id string) error
}

func FromContext

func FromContext(ctx context.Context) V2rayControl

Directories

Path Synopsis
Package websocket implements Websocket transport
Package websocket implements Websocket transport

Jump to

Keyboard shortcuts

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