-
Notifications
You must be signed in to change notification settings - Fork 88
Capturing and replaying traffic
Think about Gor more like a network analyzer or tcpdump on steroids, it is not a proxy and does not affect your app anyhow. You specify application port, and it will capture and replay incoming data.
Simplest setup will be:
# Run on servers where you want to catch traffic. You can run it on every `web` machine.
sudo gor --input-raw :80 --output-http http://staging.comIt will record and replay traffic from the same machine. However, it is possible to use Aggregator-forwarder setup, when Gor on your web machines forward traffic to Gor aggregator instance running on the separate server.
You may notice that it require
sudo: to analyze network Gor need permissions which available only to root users. However, it is possible to configure Gor [beign run for non-root users](Running as a non-root user).
You can forward traffic to multiple endpoints.
gor --input-tcp :28020 --output-http "http://staging.com" --output-http "http://dev.com"
By default, it will send same traffic to all outputs, but you have options to equally split it (round-robin) using --split-output option.
gor --input-raw :80 --output-http "http://staging.com" --output-http "http://dev.com" --split-output true
You can read more about Replaying HTTP traffic.
Also you may want to know about Rate limiting, Request rewriting and Request filtering