Skip to content

feat: add shadow traffic diff mode#45

Open
onoja123 wants to merge 1 commit intooutray-tunnel:mainfrom
onoja123:feat/shadow-traffic-diff
Open

feat: add shadow traffic diff mode#45
onoja123 wants to merge 1 commit intooutray-tunnel:mainfrom
onoja123:feat/shadow-traffic-diff

Conversation

@onoja123
Copy link

Summary

This PR introduces Shadow Traffic Diff mode for HTTP tunnels, allowing requests to be mirrored to a shadow target and automatically compared against the primary response.

Key highlights:

  • Adds shadow traffic + diffing support (mirror requests to a local/remote target and log divergences).
  • Introduces CLI flags and TOML configuration for shadow settings.
  • Exposes shadow options in Vite and Next.js plugins.
  • Documents usage across CLI, observability, and plugin guides.

Details

  • Shadow requests run fully in parallel and never affect the primary response.
  • Diffs are emitted only when status, body, or selected headers diverge.
  • Includes sampling, timeout handling, and body size caps for safety and performance.
  • Designed to safely validate new services or changes in production without impacting live traffic.

Testing

Local smoke test:

  • Start primary server on port 3000
  • Start shadow server on port 4000

Example:

index.js http 3000 --shadow-port 4000

Verified mirrored requests and confirmed diffs are logged when responses differ.

Screenshot 2026-01-26 at 3 32 18 AM

@vercel
Copy link

vercel bot commented Jan 26, 2026

@onoja123 is attempting to deploy a commit to the Akinkunmi Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant