mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-06-12 11:29:36 +03:00
API: Add user online stats (#3637)
* 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>
This commit is contained in:
@ -27,6 +27,8 @@ type Stats struct {
|
||||
UserUplink bool
|
||||
// Whether or not to enable stat counter for user downlink traffic.
|
||||
UserDownlink bool
|
||||
// Whether or not to enable online map for user.
|
||||
UserOnline bool
|
||||
}
|
||||
|
||||
// Buffer contains settings for internal buffer.
|
||||
@ -123,6 +125,7 @@ func SessionDefault() Session {
|
||||
Stats: Stats{
|
||||
UserUplink: false,
|
||||
UserDownlink: false,
|
||||
UserOnline: false,
|
||||
},
|
||||
Buffer: defaultBufferPolicy(),
|
||||
}
|
||||
|
Reference in New Issue
Block a user