Skip to content

feat: rules, breakpoints, throttling, and capture from other devices (0.8.0) - #22

Merged
nodemode-ai merged 3 commits into
mainfrom
feat/rules-0.8.0
Nov 25, 2026
Merged

nodemode-ai merged 3 commits into
mainfrom
feat/rules-0.8.0

Conversation

@nodemode-ai

Copy link
Copy Markdown
Contributor

feat: rules, breakpoints, throttling, and capture from other devices (0.8.0)

Built on 0.7.0 (feat/system-proxy-0.7.0). If the earlier pull requests are not merged yet, this zip carries their commits too.

Summary

  • Rules, kept in <data>/rules.json, ordered, each with its own switch and one global switch: rewrite (headers both ways, host, path, query, status, body find and replace), map remote, map local (a file, or a folder confined to itself and never FormNET's data folder), block (403 naming the rule, or drop). One matcher serves every feature. Rules change HTTPS only where it is opened, never tunnels, WebSocket frames or FormNET's own addresses; every flow a rule touched names it.
  • Breakpoints at the request, the response or both: the page sees each pause on the stream and continues it, edited or not, or aborts it. A forgotten one goes on by itself after a timeout, and beyond a limit exchanges pass with a note.
  • Throttling: presets or custom rates and latency, for every host or a list, both for opened HTTP and for tunnels.
  • Capture from other devices (the owner's rule): a switch, off by default, that also opens the proxy alone on this computer's network addresses for an allow list of at least one entry. The API and the page stay on loopback. http://formnet.cert/ serves the root (never the key) so a phone can install it.
  • In the window: Preferences sections for Rules (with the rule editor and the breakpoint settings), Throttle and Other Devices; a Tools menu after Charles's; the Breakpoints panel, which opens without taking focus; marks in Flows; Make a Rule from a flow; status bar chips in reserved slots.
  • The System Proxy switch no longer drops focus out of Preferences.
  • CLAUDE.md and the README say where the one exception to loopback is.

Commits

Hashes change when the commits are signed.

  • feat: rules, breakpoints, throttling, and capture from other devices
  • feat(web): rules, breakpoints, throttling and other devices in the window
  • chore(release): 0.8.0

Version

v0.8.0 (release commit is last). Bumped: Makefile, the README badge, web/package.json and its lock, src-tauri/tauri.conf.json, src-tauri/Cargo.toml and its lock.

Checks

Run on Linux:

  • In a fresh clone of the release commit: npm ci, npm audit (0 found), make check, make test, make build, the four cross-compiles, the window test (6 of 6), cargo check --locked for the Linux, Windows and both macOS targets (no Rust warning). Each commit builds, vets and type-checks on its own.
  • The server, through the proxy: every rule action; map local's escapes (.., encoded .., symlinks out, the data folder) refused; a request breakpoint edited and continued, a response breakpoint aborted, a forgotten one released after its timeout; the throttle at 96,321 B/s down against 100,000 set and 48,153 up against 50,000, 200 ms latency; remote capture from the workspace's own network address, a client outside the list closed unread, formnet.cert answering PEM and DER and refusing the key, the API still on loopback only. A race build under load: 0 races.
  • The window, in Chromium with the CPU throttled 4x: every section from the menus and the chips, one rule of each kind made and run, Enable Rules from the menu and the shortcut, a pause arriving while typing, continue, abort and timeout, Make a Rule, the throttle and other devices: layout shift 0 each.

Not run: a phone; macOS and Windows firewalls; HTTPS rules against a trusted upstream. The new strings read in English in the other languages until the translation pass. The steps are in TEST_PLAN.md in the planning sidecar.

Merging

Merge with a merge commit so each commit and its signature stays. Do not squash.

One matcher (scheme, host glob, port, path glob, method, query) serves
everything below. Rules, kept in <data>/rules.json, ordered, each with
its own switch and one global switch: rewrite (request and response
headers, host, path, query, status, body find and replace on the decoded
body), map remote, map local (a file, or a folder the matched path maps
under, never outside it and never FormNET's data folder), and block (403
naming the rule, or drop). Rules change HTTPS only where it is opened,
never tunnels or WebSocket frames, and never FormNET's own addresses.
Every flow a rule touched names it.

Breakpoints are rules too: a matching exchange pauses at the request,
the response or both; the page sees it on the stream and continues it,
edited or not, or aborts it. A forgotten one goes on by itself after a
timeout (60 s by default) with a note, and beyond a limit (20) matching
exchanges pass with a note, so nothing hangs a program for ever.

Throttling: presets (3G, 4G, slow Wi-Fi) or custom rates and latency,
for every host or a host list, one token bucket per direction, both for
opened HTTP and for tunnels; FormNET's own page is never slowed.

Capture from other devices (the owner's rule): loopback stays the
default. A switch, off by default and needing at least one allowed
address or range, also opens the PROXY on this computer's network
addresses; the API and the page stay on loopback for ever. Any other
client is closed before anything is read, and counted. While it is on,
http://formnet.cert/ through the proxy serves the root certificate (PEM
and DER, never the key) so a phone can install it. Another device may
not reach this computer's loopback addresses.

CLAUDE.md and the README say where the one exception to loopback is.

Run on Linux: gofmt, go vet for three systems, go test, the five
cross-compiles, a race build under load (0 races); every rule action
through the proxy, the map_local escapes refused; a request breakpoint
edited and continued, a response breakpoint aborted, a forgotten one
released after its timeout; the throttle measured at 96 percent of a
custom rate both ways; remote capture from the workspace's own network
address, an address outside the list closed unread, formnet.cert
answering, and the API still on loopback only.
Not run: a phone, macOS and Windows firewalls (TEST_PLAN).
…ndow

Preferences gains three sections. Rules: the global switch, the server's
note when HTTPS is not opened, and the ordered list (each rule's own
switch, drag or up and down, edit, duplicate, delete), with a kind
filter; the rule editor keeps every type's fields in one fixed-size box
and marks the field a refusal names. The breakpoint timeout and limit
sit there too. Throttle: the switch, the presets with their numbers,
custom rates and latency, and a host list. Other devices: the switch,
which cannot turn on with an empty allow list and says why, the list,
the address and port to type into a phone, and plain steps for iPhone,
iPad, Android and another computer to install the root from
http://formnet.cert/.

A Tools menu, after Charles's: Enable Rules (Alt+Cmd+K, Ctrl+Alt+K),
Rewrite, Map Local, Map Remote, Block List, Breakpoints (Alt+Cmd+B,
Ctrl+Alt+B), Breakpoint Rules, Throttle and Other Devices.

The Breakpoints panel opens by itself when an exchange pauses, without
taking focus from what is being typed: the paused list in fixed slots,
a countdown to each deadline, an editor for the request (method, URL,
headers, body) or the response (status, headers, body), Continue with
only the changed fields, Continue unchanged, and Abort; outcomes come
from the server's stream. Flows marks paused, rule-touched and
throttled rows; the detail shows the rules and notes, Make a Rule from a
flow, and Open Breakpoints. Status bar chips in reserved slots (n
paused, Rules, the throttle preset, Other devices) open their panel.

The System Proxy switch no longer disables itself while saving, which
dropped focus out of Preferences so Esc stopped closing it.

The new strings read in English in the other languages until the
translation pass.

Measured in Chromium with the CPU throttled 4x, layout-shift entries:
every section opened from the menus and the chips, one rule of each
kind made and run through the proxy, Enable Rules from the menu and the
shortcut, a pause arriving while typing in the Flows filter, continue,
abort and timeout, Make a Rule, the throttle and other devices: 0 each.
No console errors. The window test 6 of 6.
Every version site moves to 0.8.0: Makefile, the README badge,
web/package.json and its lock, src-tauri/tauri.conf.json, and
src-tauri/Cargo.toml and its lock. CHANGELOG.md has the section for
this version.
@nodemode-ai
nodemode-ai requested a review from gbarnai as a code owner November 25, 2026 07:17
@nodemode-ai
nodemode-ai merged commit 1bc432e into main Nov 25, 2026
5 checks passed
@nodemode-ai
nodemode-ai deleted the feat/rules-0.8.0 branch November 25, 2026 07:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant