Repository navigation
v5.0.0
Turns httpmon from a flat packet logger into a zero-config causal and
protocol-intelligent traffic microscope for developers and AI coding agents —
without adding mandatory flags or new subcommands — and fixes eight security,
MCP, rule and session-lifecycle issues found reviewing 4.1.0.
Added
- Phase waterfall timings and connection/TLS X-ray. Every upstream request
is traced withnet/http/httptrace, recordingtimings(dns_ms,
tcp_ms,tls_ms,send_ms,wait_msTTFB,recv_ms) andconn
(id,reused,remote_addr,alpn,tls_version,cipher_suite,
cert_subject,cert_issuer,cert_days_left). Slow requests dominated
by DNS or TLS surface the bottleneck inline in the summary;query --id,
the TUI and HAR 1.2 export (dns,connect,ssl,send,wait,
receive,serverIPAddress,connection) show the full breakdown. - Native SSE, NDJSON and LLM stream decoding.
text/event-streamand
application/x-ndjson/application/jsonlbodies are decoded into
body.stream(events,ttft_ms, head + tail + error-frame windowing so
trailing errors and usage are never cut off by--max-body, plus
assembled LLM text,model,tool_calls,stop_reasonandusageacross
OpenAI, Anthropic and Gemini streams). - HTTP-200 protocol soft errors (
app_error). Mid-stream SSE error
events, GraphQL200responses carryingerrors[], and JSON-RPC2.0
error objects populateapp_errorand appear directly on summary lines.
--fail-on app_error(andquery --status app_error) matches them as well
as non-zero gRPC statuses. - Tunnel and client-TLS visibility. A
CONNECTtunnel where the client
rejects httpmon's CA is recorded in the session askind: "connect"with
error kindclient_tls_untrustedinstead of vanishing after a console
notice; non-HTTPCONNECTtunnels relayed untouched are recorded as
kind: "tunnel"withbytes_upandbytes_down. - Zero-leak HTTP semantic X-ray (
meta) and multipart dissection.
multipart/*bodies are dissected intobody.parts(field names,
filenames, types, sizes, text previews). Without unmasking secrets,meta
extracts JWT header/expiry claims (expired,alg,iss,sub— flagging
401 jwt_expiredon summary lines), AWS SigV4region/service,
normalisedrate_limitheaders,cachestatus, GraphQL operation names,
and browsercorsmismatches. - Cross-exchange causal engine and one-call session diagnosis. Redirect
chains (redirect_from, flagging cross-hostAuthorizationheader drops),
retry chains (retry_of,attempt), unpooled HTTPS connections (0 reused),
and sequential N+1 request bursts are linked automatically and reported as
!insights on the digest.httpmon query <session> --diagnoseand MCP's
newdiagnose_sessionreturn a complete health report in one call. - Rule query-parameter matching. Mock, fault and header patterns containing
?match againstpath?query(e.g.'GET api.example.com/items?page=2 => 500').
Fixed
- Security: a project
.httpmon.tomlcould read arbitrary host files via
mock = ["* => 200 @/path"], reference other sessions viamock_from, set
credential headers other thanAuthorization/Cookie/Proxy-Authorization,
and affecthttpmon proxystarted in that directory. Project@FILEmocks
are now confined inside the project directory (symlinks included),
mock_fromis restricted to user config/flags, all 13 sensitive headers
are blocked, andhttpmon proxyreads only the user config. - MCP concurrency and isolation:
wait_for_exchangeno longer blocks
concurrent MCP requests (ping,in_flight,add_rule…) on stdin and now
honoursnotifications/cancelled;get_exchange'smax_bodyand
replay_exchangeno longer mutate process-global output state;
diff_sessionshonours.httpmon.tomlignoreand accepts anignore
argument;query_exchangesandwait_for_exchangeacceptrule. - Container / PID-reuse session lock:
Meta.Runningnow checks
live.json's heartbeat timestamp so a dead session whose PID was reused
(such as PID 1 in a restarted container) can be replaced, removed or pruned. - Schema and UTF-8 slicing:
httpmon schemacovers every v4 field
(includingrule, missing in 4.x), guarded by a reflection test; UTF-8
clipping in WebSocket display and MCPget_bodynever splits multi-byte
runes; truncated JSON error bodies still extractErrorHintfrom their
captured prefix. - UI replay & release workflow:
httpmon uireplay sharessendReplay's
empty-body and cleartext-gRPC handling;release.ymlchecks out existing
tags in thereleaseandcontainerjobs onworkflow_dispatch.
Changed
- Breaking: module path is
github.com/hxddh/https-traffic-inspector/v5
(go install github.com/hxddh/https-traffic-inspector/v5/cmd/httpmon@latest). - Exchange record version is now
v: 4;v: 3sessions written by 4.x are
still read seamlessly.