News

Inspect your traffic live, no restart

The traffic inspector now toggles on and off with a single key on a running tunnel, no reconnect and no new URL.

viaduct has always been able to show you the requests flowing through a tunnel: add --inspect and every request prints with its method, path, status, and timing. The catch was that you had to decide up front. If a tunnel was already running and you wanted to watch it, you had to stop it and start again with the flag.

That is a real annoyance, because a plain tunnel gets a random URL, so restarting to add --inspect could hand you a different address and break anything already pointed at it. So now it is a live toggle. Press i on a running tunnel and the traffic inspector flips on; press it again and it goes quiet. Same tunnel, same URL, no reconnect.

viaduct http 3000
 tunnel live

  https://sunny-otter.viaduct.sh
  → http://localhost:3000

  ○ traffic inspector off · press i to turn on
  press q to quit (this terminates the tunnel)

  ● traffic inspector ON · logging each request · press i to turn off
04:17:58 GET    /api/hello  200 3ms
04:17:59 GET    /health  200 1ms
04:18:01 GET    /slow  200 1503ms
04:18:03 POST   /submit  200 2ms
04:18:05 GET    /missing  404 0ms
04:18:07 GET    /boom  500 1ms

Press i to start watching. Press it again to stop. The URL never changes.

It costs nothing when it is off

The tunnel itself is a raw byte splice with no HTTP parsing, and the inspector does not change that. When it is on, it peeks at the first packet of each request and response to read the request line and the status code, once, and prints a line. It never buffers the body and never slows the transfer. When it is off, the code path is identical to running without --inspect at all, so leaving the toggle available adds nothing to a tunnel you are not watching.

Using it

Start a tunnel as usual and press i whenever you want to see traffic:

viaduct http 8080

Prefer it on from the first request? Start with the flag, and you can still toggle it later:

viaduct http 8080 --inspect

It is ideal for debugging webhooks: point a service at your tunnel, flip the inspector on, and watch the callbacks land in real time. More in the docs.

Available in viaduct 1.3.1. Already installed? Run viaduct upgrade to get it.

← All news