mirror of
https://github.com/Stone-Red-Code/RemoteExec.git
synced 2026-09-04 09:06:20 +02:00
Add authentication and improve server side configuration
This commit is contained in:
@@ -5,5 +5,49 @@
|
||||
"Microsoft.AspNetCore": "Warning"
|
||||
}
|
||||
},
|
||||
"AllowedHosts": "*"
|
||||
"AllowedHosts": "*",
|
||||
|
||||
// Authentication configuration
|
||||
"Authentication": {
|
||||
// List of API keys for authenticating clients
|
||||
// Each entry should contain key identification and validation information
|
||||
"ApiKeys": [
|
||||
// Example:
|
||||
// {
|
||||
// "Key": "your-secret-api-key-here",
|
||||
// "Name": "Client1",
|
||||
// "Enabled": true
|
||||
// }
|
||||
]
|
||||
},
|
||||
|
||||
// Remote execution configuration
|
||||
"Execution": {
|
||||
// Maximum number of tasks that can execute concurrently on the server
|
||||
// null = uses Environment.ProcessorCount * 2 (default)
|
||||
// Increase for CPU-light tasks, decrease for resource-intensive operations
|
||||
"MaxConcurrentTasks": null,
|
||||
|
||||
// Timeout in seconds for loading assemblies from clients
|
||||
// If a client doesn't respond with assembly bytes within this time, the request fails
|
||||
// Default: 30 seconds
|
||||
"AssemblyLoadTimeoutSeconds": 30
|
||||
},
|
||||
|
||||
// Server metrics broadcasting configuration
|
||||
"Metrics": {
|
||||
// Minimum CPU usage difference (in percentage points) required to trigger a metrics broadcast
|
||||
// Lower values = more frequent updates, higher values = less network traffic
|
||||
// Default: 1.0 (1%)
|
||||
"CpuDifferenceThreshold": 1.0,
|
||||
|
||||
// Minimum memory usage difference (in bytes) required to trigger a metrics broadcast
|
||||
// Default: 10485760 (10 MB)
|
||||
"MemoryDifferenceThreshold": 10485760,
|
||||
|
||||
// Interval in milliseconds between metrics broadcasts to all connected clients
|
||||
// Lower values = more real-time updates, higher values = less server load
|
||||
// Default: 5000 (5 seconds)
|
||||
"BroadcastIntervalMs": 5000
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user