core

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2023 License: MPL-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Core

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

Core Structure

func New

func New(c *conf.Conf) *Core

func (*Core) AddInbound

func (p *Core) AddInbound(config *core.InboundHandlerConfig) error

func (*Core) AddInboundLimiter

func (p *Core) AddInboundLimiter(tag string, nodeInfo *panel.NodeInfo, users []panel.UserInfo) error

func (*Core) AddOutbound

func (p *Core) AddOutbound(config *core.OutboundHandlerConfig) error

func (*Core) AddUserSpeedLimit added in v1.0.0

func (p *Core) AddUserSpeedLimit(tag string, user *panel.UserInfo, speedLimit int, expire int64) error

func (*Core) AddUsers

func (p *Core) AddUsers(users []*protocol.User, tag string) error

func (*Core) ClearOnlineIp added in v0.0.6

func (p *Core) ClearOnlineIp(tag string)

func (*Core) Close

func (p *Core) Close()

Close the core

func (*Core) DeleteInboundLimiter

func (p *Core) DeleteInboundLimiter(tag string) error

func (*Core) GetInboundLimiter

func (p *Core) GetInboundLimiter(tag string) (*dispatcher.InboundInfo, error)

func (*Core) GetUserManager

func (p *Core) GetUserManager(tag string) (proxy.UserManager, error)

func (*Core) GetUserTraffic

func (p *Core) GetUserTraffic(email string, reset bool) (up int64, down int64)

func (*Core) ListOnlineIp added in v0.0.6

func (p *Core) ListOnlineIp(tag string) ([]dispatcher.UserIpList, error)

func (*Core) RemoveInbound

func (p *Core) RemoveInbound(tag string) error

func (*Core) RemoveOutbound

func (p *Core) RemoveOutbound(tag string) error

func (*Core) RemoveUsers

func (p *Core) RemoveUsers(users []string, tag string) error

func (*Core) Restart added in v1.0.0

func (p *Core) Restart(v2bXConfig *conf.Conf) error

func (*Core) Start

func (p *Core) Start() error

Start the Core

func (*Core) UpdateInboundLimiter

func (p *Core) UpdateInboundLimiter(tag string, added []panel.UserInfo, deleted []panel.UserInfo) error

func (*Core) UpdateOnlineIp added in v0.0.6

func (p *Core) UpdateOnlineIp(tag string, ips []dispatcher.UserIpList)

func (*Core) UpdateRule

func (p *Core) UpdateRule(tag string, newRuleList []panel.DestinationRule) error

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
distro
all

Jump to

Keyboard shortcuts

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