0.1.1
This commit is contained in:
+26
-3
@@ -1,6 +1,29 @@
|
||||
package models
|
||||
|
||||
type PeerManifest struct {
|
||||
IP string `json:"ip" form:"ip" query:"ip"`
|
||||
PubKey string `json:"pubkey" form:"pubkey" query:"pubkey" validate:"required"`
|
||||
import "time"
|
||||
|
||||
type PeerNode struct {
|
||||
// Basic identity
|
||||
PublicKey string `json:"public_key" validate:"required"` // WireGuard/SS public key
|
||||
|
||||
// Network information
|
||||
Endpoint string `json:"endpoint"` // IP:Port or DNS
|
||||
Protocol string `json:"protocol"` // "shadowsocks", "wireguard", etc
|
||||
|
||||
// Performance metrics
|
||||
System string `json:"system"` // "linux", "windows", etc
|
||||
Latency int `json:"latency"` // in milliseconds
|
||||
Bandwidth int `json:"bandwidth"` // in Mbps
|
||||
|
||||
// Geo information
|
||||
Region string `json:"region,omitempty"` // "eu-west", "us-east"
|
||||
Country string `json:"country,omitempty"` // 2-letter ISO code
|
||||
|
||||
// System stats
|
||||
Uptime float64 `json:"uptime"` // 0.0-1.0 percentage
|
||||
Load float64 `json:"load"` // 5-min system load avg
|
||||
|
||||
// Timestamps
|
||||
LastSeen time.Time `json:"last_seen"`
|
||||
FirstSeen time.Time `json:"first_seen"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user