This commit is contained in:
Mateusz Gruszczyński committed 2026-10-11 22:55:22 +02:00
1 parent 4cc994b3bc
commit 79fd198949
48 files changed
+922 -202

No files matched your search

+81 -1
View File
@@ -2,7 +2,7 @@
"openapi": "3.0.3",
"info": {
"title": "RustProxy Administration API",
"version": "0.31.6",
"version": "0.31.7",
"description": "Administration API for the active panel origin. Sign in through the panel; the same-origin HttpOnly cookie authenticates all private operations. Mutations also require the exact Origin, X-RustProxy-Request: 1 and a session-bound X-CSRF-Token. Loopback HTTP is the default; Settings can enable HTTPS before using a non-loopback administration bind. This document contains no live configuration or credentials. Object schemas marked extensible are summaries: full configuration validation is authoritative in Rust."
},
"servers": [
@@ -662,6 +662,9 @@
},
"user_agent_blocking": {
"$ref": "#/components/schemas/UserAgentBlocking"
},
"rate_limit": {
"$ref": "#/components/schemas/VhostRateLimit"
}
},
"additionalProperties": true,
@@ -5966,6 +5969,83 @@
"description": "Case-insensitive User-Agent block patterns. Plain text matches a substring; * is a wildcard."
}
}
},
"UserAgentRateLimit": {
"type": "object",
"additionalProperties": false,
"required": [
"pattern",
"requests",
"window_seconds",
"burst"
],
"properties": {
"pattern": {
"type": "string",
"minLength": 1,
"maxLength": 256,
"description": "Case-insensitive substring; * wildcard; first matching rule has precedence"
},
"requests": {
"type": "integer",
"minimum": 1,
"maximum": 1000000
},
"window_seconds": {
"type": "integer",
"minimum": 1,
"maximum": 3600
},
"burst": {
"type": "integer",
"minimum": 0,
"maximum": 1000000
}
}
},
"VhostRateLimit": {
"type": "object",
"additionalProperties": false,
"properties": {
"enabled": {
"type": "boolean",
"default": false
},
"requests": {
"type": "integer",
"minimum": 1,
"maximum": 1000000
},
"window_seconds": {
"type": "integer",
"minimum": 1,
"maximum": 3600
},
"burst": {
"type": "integer",
"minimum": 0,
"maximum": 1000000
},
"country_access": {
"type": "object",
"description": "Country access policy"
},
"country_limits": {
"type": "array",
"maxItems": 64,
"items": {
"type": "object"
}
},
"user_agent_limits": {
"type": "array",
"maxItems": 64,
"items": {
"$ref": "#/components/schemas/UserAgentRateLimit"
},
"description": "First matching UA overrides the base and country rate; separate vhost/rule/IP fixed-window counters. Default empty."
}
}
}
}
},