xray

package
v3.1.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2026 License: MPL-2.0 Imports: 39 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(c *conf.CoreConfig) (vCore.Core, error)

Types

type CoreDebugger

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

CoreDebugger 提供 Xray 内核调试功能

func NewCoreDebugger

func NewCoreDebugger(enabled bool, outputDir string) *CoreDebugger

NewCoreDebugger 创建调试器

func (*CoreDebugger) DumpCurrentState

func (d *CoreDebugger) DumpCurrentState()

DumpCurrentState 输出当前状态

func (*CoreDebugger) IsEnabled

func (d *CoreDebugger) IsEnabled() bool

IsEnabled 检查是否启用

func (*CoreDebugger) LogCoreStart

func (d *CoreDebugger) LogCoreStart(coreType string, version string)

LogCoreStart 记录内核启动

func (*CoreDebugger) LogCoreStop

func (d *CoreDebugger) LogCoreStop(coreType string)

LogCoreStop 记录内核停止

func (*CoreDebugger) LogError

func (d *CoreDebugger) LogError(operation string, tag string, err error)

LogError 记录错误

func (*CoreDebugger) LogInboundAdd

func (d *CoreDebugger) LogInboundAdd(tag string, protocol string, port int, config interface{})

LogInboundAdd 记录添加入站

func (*CoreDebugger) LogInboundRemove

func (d *CoreDebugger) LogInboundRemove(tag string)

LogInboundRemove 记录移除入站

func (*CoreDebugger) LogUserAdd

func (d *CoreDebugger) LogUserAdd(tag string, count int, users interface{})

LogUserAdd 记录添加用户

func (*CoreDebugger) LogUserRemove

func (d *CoreDebugger) LogUserRemove(tag string, count int)

LogUserRemove 记录移除用户

func (*CoreDebugger) LogXrayConfig

func (d *CoreDebugger) LogXrayConfig(tag string, inboundConfig interface{})

LogXrayConfig 记录完整的 Xray 配置

type DNSConfig

type DNSConfig struct {
	Servers []interface{} `json:"servers"`
	Tag     string        `json:"tag"`
}

type UserMap

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

type Xray

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

Xray Structure

func (*Xray) AddNode

func (c *Xray) AddNode(tag string, info *panel.NodeInfo, config *conf.Options) error

func (*Xray) AddUsers

func (c *Xray) AddUsers(p *vCore.AddUsersParams) (added int, err error)

func (*Xray) Close

func (c *Xray) Close() error

Close the core

func (*Xray) DelNode

func (c *Xray) DelNode(tag string) error

func (*Xray) DelUsers

func (c *Xray) DelUsers(users []panel.UserInfo, tag string, _ *panel.NodeInfo) error

func (*Xray) GetUserManager

func (c *Xray) GetUserManager(tag string) (proxy.UserManager, error)

func (*Xray) GetUserTrafficSlice

func (x *Xray) GetUserTrafficSlice(tag string, reset bool) ([]panel.UserTraffic, error)

func (*Xray) Protocols

func (c *Xray) Protocols() []string

func (*Xray) Start

func (c *Xray) Start() error

Start the Xray

func (*Xray) Type

func (c *Xray) 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
distro
all

Jump to

Keyboard shortcuts

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