Versions in this module Expand all Collapse all v2 v2.8.9 Feb 16, 2026 Changes in this version + func GetAccessLogPath() (string, error) + func GetAccessPersistentLogPath() string + func GetAccessPersistentPrevLogPath() string + func GetBinaryName() string + func GetBinaryPath() string + func GetConfigPath() string + func GetGeoipPath() string + func GetGeositePath() string + func GetIPLimitBannedLogPath() string + func GetIPLimitBannedPrevLogPath() string + func GetIPLimitLogPath() string + type ClientTraffic struct + AllTime int64 + Down int64 + Email string + Enable bool + ExpiryTime int64 + Id int + InboundId int + LastOnline int64 + Reset int + SubId string + Total int64 + UUID string + Up int64 + type Config struct + API json_util.RawMessage + BurstObservatory json_util.RawMessage + DNSConfig json_util.RawMessage + FakeDNS json_util.RawMessage + InboundConfigs []InboundConfig + LogConfig json_util.RawMessage + Metrics json_util.RawMessage + Observatory json_util.RawMessage + OutboundConfigs json_util.RawMessage + Policy json_util.RawMessage + Reverse json_util.RawMessage + RouterConfig json_util.RawMessage + Stats json_util.RawMessage + Transport json_util.RawMessage + func (c *Config) Equals(other *Config) bool + type InboundConfig struct + Listen json_util.RawMessage + Port int + Protocol string + Settings json_util.RawMessage + Sniffing json_util.RawMessage + StreamSettings json_util.RawMessage + Tag string + func (c *InboundConfig) Equals(other *InboundConfig) bool + type LogWriter struct + func NewLogWriter() *LogWriter + func (lw *LogWriter) Write(m []byte) (n int, err error) + type Process struct + func NewProcess(xrayConfig *Config) *Process + func (p *Process) GetAPIPort() int + func (p *Process) GetConfig() *Config + func (p *Process) GetOnlineClients() []string + func (p *Process) GetUptime() uint64 + func (p *Process) SetOnlineClients(users []string) + func (p Process) GetErr() error + func (p Process) GetResult() string + func (p Process) GetVersion() string + func (p Process) IsRunning() bool + func (p Process) Start() (err error) + func (p Process) Stop() error + type Traffic struct + Down int64 + IsInbound bool + IsOutbound bool + Tag string + Up int64 + type XrayAPI struct + HandlerServiceClient *command.HandlerServiceClient + StatsServiceClient *statsService.StatsServiceClient + func (x *XrayAPI) AddInbound(inbound []byte) error + func (x *XrayAPI) AddUser(Protocol string, inboundTag string, user map[string]any) error + func (x *XrayAPI) Close() + func (x *XrayAPI) DelInbound(tag string) error + func (x *XrayAPI) GetTraffic(reset bool) ([]*Traffic, []*ClientTraffic, error) + func (x *XrayAPI) Init(apiPort int) error + func (x *XrayAPI) RemoveUser(inboundTag, email string) error