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: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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