feat: web console with real management operations
Backend APIs added: - POST /api/v1/nodes/kick - disconnect a node - POST /api/v1/connect - trigger P2P tunnel between nodes - GET /api/v1/stats - detailed server statistics Frontend features: - Dashboard: real stats from /api/v1/stats (cone/symm/relay counts) - Node management: table view, kick node, configure tunnels - SDWAN: enable/disable, CIDR config, IP allocation, online status - P2P Connect: create tunnel between two nodes from UI - Event log: tracks all operations
This commit is contained in:
@@ -17,26 +17,26 @@ import (
|
||||
|
||||
// NodeInfo represents a connected client node.
|
||||
type NodeInfo struct {
|
||||
Name string
|
||||
Token uint64
|
||||
User string
|
||||
Version string
|
||||
NATType protocol.NATType
|
||||
PublicIP string
|
||||
PublicPort int
|
||||
LanIP string
|
||||
OS string
|
||||
Mac string
|
||||
ShareBandwidth int
|
||||
RelayEnabled bool
|
||||
SuperRelay bool
|
||||
HasIPv4 int
|
||||
IPv6 string
|
||||
LoginTime time.Time
|
||||
LastHeartbeat time.Time
|
||||
Conn *signal.Conn
|
||||
Apps []protocol.AppConfig
|
||||
mu sync.RWMutex
|
||||
Name string `json:"name"`
|
||||
Token uint64 `json:"-"`
|
||||
User string `json:"user"`
|
||||
Version string `json:"version"`
|
||||
NATType protocol.NATType `json:"natType"`
|
||||
PublicIP string `json:"publicIP"`
|
||||
PublicPort int `json:"publicPort"`
|
||||
LanIP string `json:"lanIP"`
|
||||
OS string `json:"os"`
|
||||
Mac string `json:"mac"`
|
||||
ShareBandwidth int `json:"shareBandwidth"`
|
||||
RelayEnabled bool `json:"relayEnabled"`
|
||||
SuperRelay bool `json:"superRelay"`
|
||||
HasIPv4 int `json:"hasIPv4"`
|
||||
IPv6 string `json:"ipv6"`
|
||||
LoginTime time.Time `json:"loginTime"`
|
||||
LastHeartbeat time.Time `json:"lastHeartbeat"`
|
||||
Conn *signal.Conn `json:"-"`
|
||||
Apps []protocol.AppConfig `json:"apps"`
|
||||
mu sync.RWMutex `json:"-"`
|
||||
}
|
||||
|
||||
// IsOnline checks if node has sent heartbeat recently.
|
||||
|
||||
Reference in New Issue
Block a user