mirror of
https://github.com/Stone-Red-Code/RemoteExec.git
synced 2026-09-04 00:56:17 +02:00
99 lines
3.4 KiB
JSON
99 lines
3.4 KiB
JSON
{
|
|
"Logging": {
|
|
"LogLevel": {
|
|
"Default": "Information",
|
|
"Microsoft.AspNetCore": "Warning"
|
|
}
|
|
},
|
|
"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,
|
|
|
|
// Type of execution environment to use
|
|
// Options: "AssemblyLoadContext", "DockerContainer"
|
|
// - AssemblyLoadContext: Lighter weight, per-connection assembly isolation
|
|
// - DockerContainer: Maximum isolation, ephemeral containers per task
|
|
// Default: "AssemblyLoadContext"
|
|
"ExecutionEnvironment": "AssemblyLoadContext"
|
|
},
|
|
|
|
// Docker execution configuration (only used when ExecutionEnvironment = "DockerContainer")
|
|
"DockerExecution": {
|
|
// Docker host URL
|
|
// Linux: "unix:///var/run/docker.sock"
|
|
// Windows: "npipe://./pipe/docker_engine"
|
|
"DockerHost": "unix:///var/run/docker.sock",
|
|
|
|
// Docker worker image name to use for task execution
|
|
// Must be built and available on the Docker host
|
|
// Default: "remoteexec-worker:latest"
|
|
"WorkerImageName": "remoteexec-worker:latest",
|
|
|
|
// Maximum execution time per container in seconds
|
|
// Containers exceeding this time will be forcefully terminated
|
|
// Default: 300 (5 minutes)
|
|
"ContainerTimeoutSeconds": 300,
|
|
|
|
// Memory limit per container in MB
|
|
// Prevents containers from consuming excessive memory
|
|
// Default: 512 MB
|
|
"ContainerMemoryLimitMb": 512,
|
|
|
|
// CPU shares allocated to each container (relative weight)
|
|
// Higher values = more CPU priority
|
|
// Default: 1024
|
|
"ContainerCpuShares": 1024,
|
|
|
|
// Disable network access in containers for security
|
|
// Set to false if tasks require network connectivity
|
|
// Default: true
|
|
"DisableNetwork": true,
|
|
|
|
// Make container filesystem read-only
|
|
// Enhances security by preventing file modifications
|
|
// Default: true
|
|
"ReadOnlyFilesystem": true
|
|
},
|
|
|
|
// 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
|
|
}
|
|
}
|