Repository navigation
feat: the system proxy, resend and edit, and recipes for every runtime (0.7.0) - #21
Merged
Merged
Conversation
System proxy, a choice off by default and kept in settings.json: while
FormNET runs, macOS (networksetup on every enabled service) and Windows
(the user's Internet Settings, then WinINET is told) point at this
run's real proxy address, the moved one included. The previous settings
are saved to <data>/sysproxy.json before anything changes and put back
when FormNET stops by any route; at the next start after a crash they
come back first, unless the person changed the proxy since. formnet
sysproxy restore does it with no server. FormNET never runs sudo or asks
for a password; a refusal leaves every service as it was. On other
systems the status says why and points to Setup's lines.
Resend: POST /api/flows/{id}/resend sends an http flow's request again,
as captured or edited, through the proxy's own exchange and its guard,
so FormNET's own addresses stay refused. The new flow carries
resent_from, edited, and FormNET as its client. A body FormNET kept only
in part cannot be resent unedited (409).
Recipes: GET /api/recipes gives the lines that send curl, Node.js,
Python, Java, Go and git through this run's proxy with its root, quoted
for sh and PowerShell.
Run on Linux: gofmt, go vet for three systems, go test, the five
cross-compiles; sysproxy reporting unsupported and refusing cleanly; a
POST resent unedited and edited to a local echo server; a resend to
FormNET's own address refused; a truncated body 409; recipes with a
data folder whose path has a space.
Not run: networksetup on macOS, the registry and WinINET on Windows
(TEST_PLAN).
Preferences > Capture opens with a System Proxy card: the switch "Point this computer's proxy at FormNET while it runs", a state line in plain words (on and pointing at FormNET, on but not active and why, not supported and why with the switch disabled, the system preferring its automatic configuration), the services it changed, and how the previous settings come back. Setup shows the state and a button to that card. Setup's "Point a program at the proxy" block shows the server's recipes: a choice of shell (PowerShell on Windows, sh elsewhere) and of program, the lines with Copy, and the note, built once at a fixed size so switching moves nothing below it. The lines are data and are never translated. The flow detail of an http flow has Resend and Edit and resend. Resend selects the new flow; when FormNET kept only part of the body, the server's sentence offers Edit and resend. The dialog edits the method, the URL, the header list and the body, and sends only what changed. Resent rows carry a mark with "Resent from [time]" (and "edited"), and the detail links back to the original. The new strings read in English in the other languages until the translation pass. web/HASHOUT_LOG.md has the reasons. Measured in Chromium with the CPU throttled 4x, layout-shift entries: Setup with both shells and six programs, Home's Setup page, Preferences at Capture from Setup, a resend and its selection, the edit dialog, an edited resend, a bad URL, the 409 path, Flows with 44 resent rows arriving: 0 each (0.0004 inside the dialog's header box when a row is removed by script, 0 by click). The window test 6 of 6.
Every version site moves to 0.7.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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feat: the system proxy, resend and edit, and recipes for every runtime (0.7.0)
Built on 0.6.0 (
feat/agents-0.6.0). If the earlier pull requests are not merged yet, this zip carries their commits too.Summary
<data>/sysproxy.jsonbefore anything changes and put back when FormNET stops by any route, and at the next start after a crash unless the person changed the proxy since;formnet sysproxy restoredoes it without a server. No sudo, no password prompt; a refusal leaves every service as it was. Preferences > Capture has the switch and its state; Setup shows the state with a button to it.POST /api/flows/{id}/resendsends an http flow's request again, as captured or edited, through the proxy's own exchange and guard. The flow detail has Resend and Edit and resend (method, URL, headers, body); resent rows are marked and link back. A body kept only in part cannot be resent unedited, and the page offers the edit instead.GET /api/recipesand Setup's block: copyable lines for curl, Node.js, Python, Java, Go and git through this run's proxy and root, for sh and PowerShell.Commits
Hashes change when the commits are signed.
Version
v0.7.0 (release commit is last). Bumped:
Makefile, the README badge,web/package.jsonand its lock,src-tauri/tauri.conf.json,src-tauri/Cargo.tomland its lock.Checks
Run on Linux:
npm ci,npm audit(0 found),make check,make test,make build, the four cross-compiles, the window test (6 of 6),cargo check --lockedfor the Linux, Windows and both macOS targets (no Rust warning). Each commit builds, vets and type-checks on its own.Not run: networksetup on macOS, the registry and WinINET on Windows, the PowerShell lines in a PowerShell. The new strings read in English in the other languages until the translation pass. The steps are in
TEST_PLAN.mdin the planning sidecar.Merging
Merge with a merge commit so each commit and its signature stays. Do not squash.