core

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2022 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, userList []panel.UserInfo) error

func (*Core) AddOutbound

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

func (*Core) AddUsers

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

func (*Core) ClearOnlineIps

func (p *Core) ClearOnlineIps(tag string)

func (*Core) Close

func (p *Core) Close()

Close the core

func (*Core) DeleteInboundLimiter

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

func (*Core) GetDetectResult

func (p *Core) GetDetectResult(tag string) ([]panel.DetectResult, error)

func (*Core) GetInboundLimiter

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

func (*Core) GetOnlineIps

func (p *Core) GetOnlineIps(tag string) ([]dispatcher.UserIp, error)

func (*Core) GetUserManager

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

func (*Core) GetUserTraffic

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

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) Start

func (p *Core) Start()

Start the Core

func (*Core) UpdateInboundLimiter

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

func (*Core) UpdateOnlineIps

func (p *Core) UpdateOnlineIps(tag string, ips []dispatcher.UserIp)

func (*Core) UpdateProtocolRule

func (p *Core) UpdateProtocolRule(tag string, newRuleList []string) error

func (*Core) UpdateRule

func (p *Core) UpdateRule(tag string, newRuleList []panel.DetectRule) 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
dispatcher
Package dispather implement the rate limiter and the onlie device counter
Package dispather implement the rate limiter and the onlie device counter
distro
all

Jump to

Keyboard shortcuts

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