Add MITM hooks for host-specific HTTPS request clamping

This commit is contained in:
viyatb-oai
2026-03-17 13:40:39 -07:00
parent da616136cc
commit d16c7aa41c
15 changed files with 1439 additions and 32 deletions

View File

@@ -670,6 +670,27 @@
}
]
},
"InjectedHeaderConfigSchema": {
"properties": {
"name": {
"default": "",
"type": "string"
},
"prefix": {
"default": null,
"type": "string"
},
"secret_env_var": {
"default": null,
"type": "string"
},
"secret_file": {
"default": null,
"type": "string"
}
},
"type": "object"
},
"MemoriesToml": {
"additionalProperties": false,
"description": "Memories settings loaded from config.toml.",
@@ -724,6 +745,101 @@
},
"type": "object"
},
"MitmHookActionsConfigSchema": {
"properties": {
"inject_request_headers": {
"default": [],
"items": {
"$ref": "#/definitions/InjectedHeaderConfigSchema"
},
"type": "array"
},
"strip_request_headers": {
"default": [],
"items": {
"type": "string"
},
"type": "array"
}
},
"type": "object"
},
"MitmHookConfigSchema": {
"properties": {
"actions": {
"allOf": [
{
"$ref": "#/definitions/MitmHookActionsConfigSchema"
}
],
"default": {
"inject_request_headers": [],
"strip_request_headers": []
}
},
"host": {
"default": "",
"type": "string"
},
"match": {
"allOf": [
{
"$ref": "#/definitions/MitmHookMatchConfigSchema"
}
],
"default": {
"body": null,
"headers": {},
"methods": [],
"path_prefixes": [],
"query": {}
}
}
},
"type": "object"
},
"MitmHookMatchConfigSchema": {
"properties": {
"body": {
"default": null
},
"headers": {
"additionalProperties": {
"items": {
"type": "string"
},
"type": "array"
},
"default": {},
"type": "object"
},
"methods": {
"default": [],
"items": {
"type": "string"
},
"type": "array"
},
"path_prefixes": {
"default": [],
"items": {
"type": "string"
},
"type": "array"
},
"query": {
"additionalProperties": {
"items": {
"type": "string"
},
"type": "array"
},
"default": {},
"type": "object"
}
},
"type": "object"
},
"ModelAvailabilityNuxConfig": {
"additionalProperties": {
"format": "uint32",
@@ -869,6 +985,15 @@
"enabled": {
"type": "boolean"
},
"mitm": {
"type": "boolean"
},
"mitm_hooks": {
"items": {
"$ref": "#/definitions/MitmHookConfigSchema"
},
"type": "array"
},
"mode": {
"$ref": "#/definitions/NetworkModeSchema"
},