server

package
v1.8.2-1 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 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 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 {
	UUID  string `json:"uuid"` // user id
	Limit *struct {
		DownLink  uint64
		UpLink    uint64
		Bandwidth uint16
	} `json:"limit,omitempty"`
	Remark string `json:"remark,omitempty"`
}

type Users

type Users []User

func (Users) IsNullOrEmpty

func (u Users) IsNullOrEmpty() bool

func (Users) Match

func (u Users) Match(id string) bool

Jump to

Keyboard shortcuts

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