ARTEX/traffic
BaaRai 7a9b4fdf76 feat(server): rewrite-rule API and compiled snapshot for the proxy
GET, POST, PUT and DELETE /api/traffic/rewrite-rules and
POST /api/traffic/rewrite-rules/{id}/toggle manage the rules behind
requireAuth. A rule is validated on save (400), created disabled, and
validated again before the toggle enables it. The value of a sensitive action
is never returned; an update sent without it keeps the stored value when the
stored rule has a sensitive action of the same type and header name at the
same position.

The manager compiles the enabled rules after traffic.Open and after every
change, and publishes the snapshot with Traffic.SetRewriteRules, an atomic
swap. An enabled rule the validation refuses is left out and reported as
load_error.

The proxy stores the snapshot and does not apply it: a test sends the same
request with and without matching rules and compares what the target
receives, what the client receives and what is recorded.
2026-11-17 00:12:09 +01:00
..
rewrite feat(traffic): add the rewrite-rule engine as a pure package 2026-11-17 00:12:09 +01:00
archive.go 归档 2026-08-28 12:56:29 +08:00
archive_test.go 归档 2026-08-28 12:56:29 +08:00
evidence.go Translate all Chinese text to English 2026-10-08 23:14:34 +02:00
external.go Traffic ingest: capture operator browsing via a browser extension 2026-10-11 14:53:08 +02:00
external_test.go Traffic ingest: capture operator browsing via a browser extension 2026-10-11 14:53:08 +02:00
pace.go feat(traffic): pace Bash requests at the capture proxy 2026-11-15 00:57:13 +01:00
pace_test.go feat(traffic): pace Bash requests at the capture proxy 2026-11-15 00:57:13 +01:00
passthrough_test.go chore: ARTEX 初始化 2026-07-26 04:27:45 -04:00
proxy_test.go fix(traffic): 流量录制代理默认只监听 127.0.0.1,避免默认开放代理暴露 (#129) (#130) 2026-09-16 09:36:32 +08:00
reclaim_test.go Translate all Chinese text to English 2026-10-08 23:14:34 +02:00
replay.go docs(traffic): correct why a replay Host override is refused 2026-11-16 16:50:06 +01:00
replay_test.go fix(traffic): replay reports recorded and headers, drops Connection-named headers, 413 for large bodies 2026-11-16 16:17:55 +01:00
rewrite_rules_test.go feat(server): rewrite-rule API and compiled snapshot for the proxy 2026-11-17 00:12:09 +01:00
stream.go fix(traffic): bound stream message pages, spill before the transaction, seconds timestamps 2026-11-16 08:21:38 +01:00
stream_test.go fix(traffic): bound stream message pages, spill before the transaction, seconds timestamps 2026-11-16 08:21:38 +01:00
traffic.go feat(server): rewrite-rule API and compiled snapshot for the proxy 2026-11-17 00:12:09 +01:00
traffic_store_test.go Translate all Chinese text to English 2026-10-08 23:14:34 +02:00
traffic_test.go feat(traffic): record WebSocket and SSE stream messages 2026-11-16 07:47:25 +01:00
upgrade_test.go Translate all Chinese text to English 2026-10-08 23:14:34 +02:00