-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstruct.go
More file actions
71 lines (62 loc) · 1.1 KB
/
struct.go
File metadata and controls
71 lines (62 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
package main
import (
"bufio"
"bytes"
"net"
"sync"
"time"
)
type tunnelCon struct {
frameReader *bufio.Reader
packetReader *bytes.Reader
con net.Conn
packets []byte
packetsLength int
packetLock sync.Mutex
lastUsed time.Time
}
type ephemeralData struct {
id int
source string
destPort int
lastUsed time.Time
listener *net.UDPConn
startTime time.Time
bytesIn int64
bytesOut int64
}
type ServerEntry struct {
Name string
Addr string
Port int
}
type PageData struct {
Servers []ServerEntry
CurrentUsers int
PeakUsers int
TotalSessions int
Uptime string
BatchInterval int
Compression int
Sessions []SessionInfo
BytesInTotal int64
BytesOutTotal int64
BytesInTotalStr string
BytesOutTotalStr string
}
type SessionInfo struct {
ID int
DestPort int
Duration string
BytesIn int64
BytesOut int64
BytesInStr string
BytesOutStr string
}
type SavedStats struct {
StartTime time.Time
SessionsTotal int
PeakUsers int
BytesInTotal int64
BytesOutTotal int64
}