mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-04-29 16:58:34 +00:00
API: Add user IPs and access times tracking (#4360)
This commit is contained in:
parent
1982c2366e
commit
e893fa1828
8 changed files with 263 additions and 62 deletions
|
@ -2,6 +2,7 @@ package stats
|
|||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
"github.com/xtls/xray-core/common"
|
||||
"github.com/xtls/xray-core/common/errors"
|
||||
|
@ -30,6 +31,8 @@ type OnlineMap interface {
|
|||
AddIP(string)
|
||||
// List is the current OnlineMap ip list.
|
||||
List() []string
|
||||
// IpTimeMap return client ips and their last access time.
|
||||
IpTimeMap() map[string]time.Time
|
||||
}
|
||||
|
||||
// Channel is the interface for stats channel.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue