server

package
v1.8.5 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2024 License: GPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Limit added in v1.8.3

type Limit struct {
	DownLink  uint
	UpLink    uint
	Bandwidth uint
}

type SSL

type SSL struct {
	PublicKey  string `json:"cert"` // certificate path
	PrivateKey string `json:"key"`  // certificate key path
}

type Server

type Server struct {
	Listen  string `json:"listen"`
	SSL     *SSL   `json:"ssl,omitempty"`
	Path    string `json:"path,omitempty"` // grpc service name
	Users   Users  `json:"users"`
	Buffer  uint16 `json:"buffer,omitempty"`  // transport buffer size in KB, up to 65535
	IPv6    bool   `json:"ipv6,omitempty"`    // enable ipv6 in tcp network, disable by default
	Forward string `json:"forward,omitempty"` // extra forward-proxy
}

type User

type User struct {
	Remark string `json:"remark,omitempty"`
	UUID   string `json:"uuid"` // user id
	Limit  *Limit `json:"limit,omitempty"`
}

type Users

type Users []User

func (Users) IsNullOrEmpty

func (u Users) IsNullOrEmpty() bool

func (Users) Match

func (u Users) Match(id string) bool

Match returns true if the user id is in the users list may use map for fast lookup in the future

Jump to

Keyboard shortcuts

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