Categorygithub.com/bicistits/buger
modulepackage
0.16.1
Repository: https://github.com/bicistits/buger.git
Documentation: pkg.go.dev

# README

GitHub release codebeat Go Report Card Join the chat at https://gitter.im/buger/gor

Go Replay

https://goreplay.org/

We just released a new version, see announcement https://leonsbox.com/goreplay-v0-16-and-4th-anniversary-5408b1fd72e0

About

GoReplay is the simplest and safest way to test your app using real traffic before you put it into production.

As your application grows, the effort required to test it also grows exponentially. GoReplay offers you the simple idea of reusing your existing traffic for testing, which makes it incredibly powerful. Our state of art technique allows to analyze and record your application traffic without affecting it. This eliminates the risks that come with putting a third party component in the critical path.

GoReplay increases your confidence in code deployments, configuration changes and infrastructure changes. Did we mention that no coding is required?

Here is basic workflow: The listener server catches http traffic and sends it to the replay server or saves to file. The replay server forwards traffic to a given address.

Diagram

Check latest documentation.

Installation

Download latest binary from https://github.com/buger/goreplay/releases or compile by yourself.

Getting started

The most basic setup will be sudo ./gor --input-raw :8000 --output-stdout which acts like tcpdump. If you already have test environment you can start replaying: sudo ./gor --input-raw :8000 --output-http http://staging.env.

See the our documentation and Getting started page for more info.

Newsletter

Subscribe to our newsletter to stay informed about the latest features and changes to Gor project.

Want to Upgrade?

We have created a GoReplay PRO extension which provides additional features such as support for binary protocols like Thrift or ProtocolBuffers, saving and replaying from cloud storage, TCP sessions replication, etc. The PRO version also includes a commercial-friendly license, dedicated support, and it also allows you to support high-quality open source development.

Problems?

If you have a problem, please review the FAQ and Troubleshooting wiki pages. Searching the issues for your problem is also a good idea.

All bug-reports and suggestions should go though Github Issues or our Google Group (you can just send email to [email protected]). If you have a private question feel free to send email to [email protected].

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Companies using Gor

  • GOV.UK - UK Government Digital Service
  • theguardian.com - Most popular online newspaper in the UK
  • TomTom - Global leader in navigation, traffic and map products, GPS Sport Watches and fleet management solutions.
  • 3SCALE - API infrastructure to manage your APIs for internal or external users
  • Optionlab - Optimize customer experience and drive engagement across multiple channels
  • TubeMogul - Software for Brand Advertising
  • Videology - Video advertising platform
  • ForeksMobile - One of the leading financial application development company in Turkey
  • Granify - AI backed SaaS solution that enables online retailers to maximise their sales
  • And many more!

If you are using Gor we are happy add you to the list and share your story, just write to: [email protected]

Author

Leonid Bugaev, @buger, https://leonsbox.com

# Packages

Package byteutils probvides helpers for working with byte slices.
No description provided by the author
Package proto provides byte-level interaction with HTTP request payload.
Package rawSocket provides traffic sniffier using RAW sockets.

# Functions

CopyMulty copies from 1 reader to multiple writers.
Debug gets called only if --verbose flag specified.
InitPlugins specify and initialize all available plugins.
NewDummyInput constructor for DummyInput.
NewDummyOutput constructor for DummyOutput.
NewFileInput constructor for FileInput.
No description provided by the author
NewFileOutput constructor for FileOutput, accepts path.
No description provided by the author
No description provided by the author
NewHTTPInput constructor for HTTPInput.
No description provided by the author
NewHTTPOutput constructor for HTTPOutput Initialize workers.
NewKafkaInput creates instance of kafka consumer client.
NewKafkaOutput creates instance of kafka producer client.
NewLimiter constructor for Limiter, accepts plugin and options `options` allow to sprcify relatve or absolute limiting.
No description provided by the author
NullOutput constructor for NullOutput.
NewRAWInput constructor for RAWInput.
NewTCPInput constructor for TCPInput, accepts address with port.
NewTCPOutput constructor for TCPOutput Initialize 10 workers which hold keep-alive connection.
NewTestInput constructor for TestInput.
NewTestOutput constructor for TestOutput, accepts callback which get called on each incoming Write.
Start initialize loop for sending data from inputs to outputs.

# Constants

Available engines for intercepting traffic.
Available engines for intercepting traffic.
Available engines for intercepting traffic.
https://support.cloudflare.com/hc/en-us/articles/200171916-Error-521-Web-server-is-down.
https://support.cloudflare.com/hc/en-us/articles/200171906-Error-522-Connection-timed-out.
https://support.cloudflare.com/hc/en-us/articles/200171926-Error-524-A-timeout-occurred.
https://support.cloudflare.com/hc/en-us/articles/200171936-Error-520-Web-server-is-returning-an-unknown-error.
https://support.cloudflare.com/hc/en-us/articles/200171946-Error-523-Origin-is-unreachable.
KafkaOutputFrequency in milliseconds.
No description provided by the author
No description provided by the author
No description provided by the author

# Variables

Plugins holds all the plugin objects.
Settings holds Gor configuration.
No description provided by the author

# Structs

AppSettings is the struct of main configuration.
DummyInput used for debugging.
DummyOutput used for debugging, prints all incoming requests.
No description provided by the author
No description provided by the author
No description provided by the author
FileInput can read requests generated by FileOutput.
FileOutput output plugin.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
HTTPInput used for sending requests to Gor via http.
No description provided by the author
HTTPModifierConfig holds configuration options for built-in traffic modifier.
HTTPOutput plugin manage pool of workers which send request to replayed server By default workers pool is dynamic and starts with 10 workers You can specify fixed number of workers using `--output-http-workers`.
HTTPOutputConfig struct for holding http output configuration.
No description provided by the author
InOutPlugins struct for holding references to plugins.
KafkaConfig should contains required information to build producers.
KafkaInput is used for recieving Kafka messages and transforming them into HTTP payloads.
KafkaMessage should contains catched request information that should be passed as Json to Apache Kafka.
KafkaOutput is used for sending payloads to kafka in JSON format.
Limiter is a wrapper for input or output plugin which adds rate limiting.
No description provided by the author
No description provided by the author
NullOutput used for debugging, prints nothing.
RAWInput used for intercepting traffic for given address.
TCPInput used for internal communication.
No description provided by the author
TCPOutput used for sending raw tcp payloads Currently used for internal communication between listener and replay server Can be used for transfering binary payloads like protocol buffers.
No description provided by the author
TestInput used for testing purpose, it allows emitting requests on demand.
TestOutput used in testing to intercept any output into callback.

# Type aliases

No description provided by the author
No description provided by the author
HTTPHeaderFilters holds list of headers and their regexps.
Handling of --http-set-header option .
Handling of --http-allow-method option .
Handling of --http-set-param option .
No description provided by the author
MultiOption allows to specify multiple flags with same name and collects all values into array.
No description provided by the author