Files
ARTEX/extension/popup.html
T
BaaRai d8f47d4359 Traffic ingest: capture operator browsing via a browser extension
Closes #33. The MITM proxy only sees the agent's own actions, so
anything behind a human gate (signup captcha, email OTP, 2FA, SSO)
left the authenticated surface dark. The operator's browser becomes a
capture source instead:

- traffic: exported RecordExternal storing an externally captured
  exchange through the same spill/blob/FTS path as proxy traffic
  (insert logic shared with record()); rejects unparsable URLs and
  empty methods
- server: POST /api/traffic/ingest inside the authenticated API group,
  batch capped at 50 entries, bodies truncated at 256 KiB, per-entry
  ingested/failed counts
- extension/: Manifest V3 Chrome/Edge extension driving the
  chrome.debugger Network domain on the chosen tab, batching text
  exchanges to the ingest endpoint with the operator's URL + JWT in
  chrome.storage.local; binary bodies skipped; flush on batch/stop
- tests for both layers, README section
2026-10-11 14:53:08 +02:00

44 lines
1.5 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<style>
body { font: 13px system-ui, sans-serif; width: 320px; margin: 0; padding: 12px; }
h1 { font-size: 14px; margin: 0 0 10px; }
label { display: block; margin: 8px 0 2px; color: #444; }
input { width: 100%; box-sizing: border-box; padding: 5px; }
button { margin-top: 10px; padding: 6px 12px; cursor: pointer; }
#start { background: #1d4ed8; color: #fff; border: 0; border-radius: 4px; }
#stop { background: #eee; border: 1px solid #ccc; border-radius: 4px; }
#status { margin-top: 10px; line-height: 1.5; color: #333; }
#error { color: #b91c1c; white-space: pre-wrap; }
.muted { color: #777; font-size: 11px; margin-top: 10px; line-height: 1.4; }
</style>
</head>
<body>
<h1>ARTEX Traffic Capture</h1>
<label for="serverUrl">ARTEX URL</label>
<input id="serverUrl" placeholder="http://localhost:8787" />
<label for="token">Token</label>
<input id="token" type="password" placeholder="ARTEX JWT (localStorage artex_token)" />
<button id="save">Save settings</button>
<button id="start">Start capture</button>
<button id="stop">Stop</button>
<button id="flush">Flush now</button>
<div id="status"></div>
<div id="error"></div>
<p class="muted">
Start on the tab you are browsing, log in and use the app normally;
captured text requests/responses land in your local ARTEX traffic store
(Traffic page) as evidence. Stop when done. Binary bodies (images, fonts)
are skipped.
</p>
<script src="popup.js"></script>
</body>
</html>