mirror of
https://github.com/XTLS/Xray-core.git
synced 2024-12-12 23:06:04 +03:00
2c72864935
* add statsUserOnline bool to policy * add OnlineMap struct to stats * apply UserOnline functionality to dispatcher * add statsonline api command * fix comments * Update app/stats/online_map.go Co-authored-by: mmmray <142015632+mmmray@users.noreply.github.com> * improve AddIP * regenerate pb --------- Co-authored-by: mmmray <142015632+mmmray@users.noreply.github.com>
32 lines
635 B
Go
32 lines
635 B
Go
package api
|
|
|
|
import (
|
|
"github.com/xtls/xray-core/main/commands/base"
|
|
)
|
|
|
|
// CmdAPI calls an API in an Xray process
|
|
var CmdAPI = &base.Command{
|
|
UsageLine: "{{.Exec}} api",
|
|
Short: "Call an API in an Xray process",
|
|
Long: `{{.Exec}} {{.LongName}} provides tools to manipulate Xray via its API.
|
|
`,
|
|
Commands: []*base.Command{
|
|
cmdRestartLogger,
|
|
cmdGetStats,
|
|
cmdQueryStats,
|
|
cmdSysStats,
|
|
cmdBalancerInfo,
|
|
cmdBalancerOverride,
|
|
cmdAddInbounds,
|
|
cmdAddOutbounds,
|
|
cmdRemoveInbounds,
|
|
cmdRemoveOutbounds,
|
|
cmdInboundUser,
|
|
cmdInboundUserCount,
|
|
cmdAddRules,
|
|
cmdRemoveRules,
|
|
cmdSourceIpBlock,
|
|
cmdOnlineStats,
|
|
},
|
|
}
|