1
0
Fork 0
mirror of https://github.com/XTLS/Xray-core.git synced 2025-06-23 19:54:15 +00:00

API: Add user IPs and access times tracking ()

This commit is contained in:
Maxim Plotnikov 2025-02-07 07:19:47 -05:00 committed by GitHub
parent 1982c2366e
commit e893fa1828
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 263 additions and 62 deletions
features/stats

View file

@ -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.