core

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2024 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterCore

func RegisterCore(t string, f func(c *conf.CoreConfig) (Core, error))

func RegisteredCore

func RegisteredCore() []string

Types

type AddUsersParams

type AddUsersParams struct {
	Tag   string
	Users []panel.UserInfo
	*panel.NodeInfo
}

type Core

type Core interface {
	Start() error
	Close() error
	AddNode(tag string, info *panel.NodeInfo, config *conf.Options) error
	DelNode(tag string) error
	AddUsers(p *AddUsersParams) (added int, err error)
	GetUserTraffic(tag, uuid string, reset bool) (up int64, down int64)
	DelUsers(users []panel.UserInfo, tag string) error
	Protocols() []string
	Type() string
}

func NewCore

func NewCore(c []conf.CoreConfig) (Core, error)

func NewSelector

func NewSelector(c []conf.CoreConfig) (Core, error)

type Selector

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

func (*Selector) AddNode

func (s *Selector) AddNode(tag string, info *panel.NodeInfo, option *conf.Options) error

func (*Selector) AddUsers

func (s *Selector) AddUsers(p *AddUsersParams) (added int, err error)

func (*Selector) Close

func (s *Selector) Close() error

func (*Selector) DelNode

func (s *Selector) DelNode(tag string) error

func (*Selector) DelUsers

func (s *Selector) DelUsers(users []panel.UserInfo, tag string) error

func (*Selector) GetUserTraffic

func (s *Selector) GetUserTraffic(tag, uuid string, reset bool) (up int64, down int64)

func (*Selector) Protocols

func (s *Selector) Protocols() []string

func (*Selector) Start

func (s *Selector) Start() error

func (*Selector) Type

func (s *Selector) Type() string

Directories

Path Synopsis
app
Package app contains the third-party app used to replace the default app in xray-core
Package app contains the third-party app used to replace the default app in xray-core

Jump to

Keyboard shortcuts

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