ConfigsMay 16, 2026·3 min read

GoReplay — Capture and Replay HTTP Traffic for Testing

An open-source tool for capturing live HTTP traffic and replaying it into test environments to validate deployments, configuration changes, and infrastructure updates with real production data.

Agent ready

This asset can be read and installed directly by agents

TokRepo exposes a universal CLI command, install contract, metadata JSON, adapter-aware plan, and raw content links so agents can judge fit, risk, and next actions.

Needs Confirmation · 64/100Policy: confirm
Agent surface
Any MCP/CLI agent
Kind
Skill
Install
Single
Trust
Trust: Established
Entrypoint
GoReplay Overview
Universal CLI install command
npx tokrepo install fc4891f3-5120-11f1-9bc6-00163e2b0d79

Introduction

GoReplay captures live HTTP traffic from production servers and replays it against staging or test environments without requiring code changes, proxies, or complex infrastructure. It operates at the network level, giving teams confidence that deployments behave correctly under real traffic patterns.

What GoReplay Does

  • Captures HTTP requests at the network layer using raw sockets or pcap
  • Replays captured traffic to one or multiple target servers in real-time or from recorded files
  • Supports traffic filtering by URL patterns, headers, and HTTP methods
  • Allows rate-limiting and speed-adjustment of replayed traffic
  • Provides middleware support for modifying requests during replay via stdin/stdout piping

Architecture Overview

GoReplay runs as a single binary that attaches to a network interface via raw sockets (Linux) or libpcap. It reconstructs TCP streams into HTTP requests, then forwards them to configured outputs: files, HTTP endpoints, or Kafka topics. The middleware system pipes each request through an external process for transformation before replay, enabling header rewriting, authentication injection, or data masking.

Self-Hosting & Configuration

  • Download a prebuilt binary from GitHub releases; no dependencies required
  • Requires root/sudo for raw socket access on the capture side
  • Configure input (raw port, file, or TCP) and output (http, file, kafka, stdout) via CLI flags
  • Use --http-allow-url and --http-disallow-url regex filters to scope captured traffic
  • Set --output-http-workers to control concurrency of replay connections

Key Features

  • Zero-dependency single binary that requires no code instrumentation
  • Real-time replay with configurable speed multiplier (1x, 2x, or throttled)
  • Multi-output support: replay to multiple staging environments simultaneously
  • Middleware pipeline for request transformation via any language
  • Kafka integration for buffering and distributed replay architectures

Comparison with Similar Tools

  • tcpreplay — replays raw packets at layer 2/3; GoReplay operates at HTTP layer with request-level intelligence
  • Locust/k6 — synthetic load generators; GoReplay uses actual production traffic patterns
  • mitmproxy — interactive proxy requiring client configuration; GoReplay is transparent and non-intrusive
  • Vegeta — constant-rate HTTP load testing; GoReplay preserves realistic traffic distribution

FAQ

Q: Does GoReplay affect production server performance? A: Minimal impact. It reads packets passively from raw sockets without proxying or modifying production traffic flow.

Q: Can I replay HTTPS traffic? A: GoReplay captures encrypted traffic if you provide the TLS private key, or you can terminate TLS before the capture point.

Q: How do I handle authentication tokens that expire? A: Use the middleware system to rewrite Authorization headers during replay, injecting valid staging credentials.

Q: Does it support HTTP/2? A: GoReplay primarily targets HTTP/1.1. HTTP/2 support is experimental and requires h2c (cleartext) connections.

Sources

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.

Related Assets