Via scripts
The scripting engine is the preferred way to serve local files. Usectx.respondWith in an onRequest hook.
Via CLI
You can also define map local rules in a JSON file and pass it at startup.Rules JSON format
The file contains an array of rule objects.| Field | Required | Description |
|---|---|---|
pattern | Yes | URL pattern to match. Supports * wildcards. |
local_path | Yes | Absolute path to the local file to serve. |
status_code | No | HTTP status code to return. Defaults to 200. |
TUI manager
PressM to open the map local manager.
| Key | Action |
|---|---|
n | Add a new rule (pattern + local path, Tab to switch fields) |
d | Delete a rule (with confirmation) |
Esc | Close the manager |
How it works
When a request matches a map local rule, httpmon returns the local file’s content directly to the client without contacting the upstream server. The content type is auto-detected from the file extension. Flows served from local files show a[L] indicator in the flow list so you can tell them apart from upstream responses.


