User Connection Statistics
Overview
The User Connection Statistics system provides detailed insights into user's VPN usage, connection metrics, and server preferences.
API Queries
User Connection Dashboard
query MyConnectionDashboard {
myConnectionDashboard {
currentConnection {
id
serverId
serverName
connectionStart
connectionEnd
dataTransferred
cpuUsage
memoryUsage
uploadSpeed
downloadSpeed
networkSpeed
responseTime
latency
tokensCost
tokensEarned
}
recentConnections {
# Same fields as currentConnection
}
totalDataTransferred
averageMetrics {
averageUploadSpeed
averageDownloadSpeed
averageNetworkSpeed
averageResponseTime
averageLatency
}
serverHistory {
serverId
serverName
totalConnections
totalTime
totalDataTransferred
averagePerformance
lastUsed
}
}
}
Connection History
query MyConnectionStats(
$from: DateTime
$to: DateTime
$page: Int = 0
$size: Int = 10
) {
myConnectionStats(from: $from, to: $to, page: $page, size: $size) {
content {
id
serverId
serverName
connectionStart
connectionEnd
dataTransferred
# ... performance metrics
}
totalElements
totalPages
number
size
}
}
Server Usage Statistics
query MyServerUsageStats($serverId: ID!, $from: DateTime, $to: DateTime) {
myServerUsageStats(serverId: $serverId, from: $from, to: $to) {
serverId
serverName
totalConnections
totalTime
totalDataTransferred
averagePerformance {
averageUploadSpeed
averageDownloadSpeed
averageNetworkSpeed
averageResponseTime
averageLatency
}
lastUsed
}
}
UI Components
A. Connection Dashboard
1. Current Connection Card
- Active connection status
- Server name and location
- Connection duration
- Real-time performance metrics
- Token earnings/costs
2. Connection Metrics
- Upload/Download speeds
- Network performance
- Response time and latency
- Data transfer statistics