Skills2026年5月16日·1 分钟阅读

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 就绪

先审查再安装

这个资产需要先审查。复制的指令会要求 Agent dry-run、列出写入项,确认后再继续。

Needs Confirmation · 64/100策略:需确认
Agent 入口
任意 MCP/CLI Agent
类型
Skill
安装
Single
信任
信任等级:Established
入口
GoReplay Overview
先审查命令
npx -y tokrepo@latest install fc4891f3-5120-11f1-9bc6-00163e2b0d79 --target codex

先 dry-run,确认写入项后再运行此命令。

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

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产