http-request-forwarder

command module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 11, 2018 License: MIT Imports: 12 Imported by: 0

README

http-request-forwarder

Go Report Card

A reverse HTTP proxy to duplicate incoming HTTP traffic to given hosts.

Useful for replicating production traffic to run tests on the development environment or simply to transmit an HTTP request to multiple servers using a single HTTP request.

Usage

In order to forward the incoming traffic on port 8080 to ports 8081, 8082 and 8083 on the same host:

$ ./http-request-forwarder -l 8080 -h "localhost:8081,localhost:8082,localhost:8083"

You may also provide a timeout duration in milliseconds using the -t flag, which defaults to 3 seconds:

$ ./http-request-forwarder -l 8080 -h "localhost:8081,localhost:8082,localhost:8083" -t 1000

Notes

Requests always return the status code 200 OK as different target hosts may return different status codes. This behavior may change in later versions.

Changelog

0.1.0

  • Initial release.

Author

Mert Yazıcıoğlu - Website · GitHub · Twitter

License

This project is released under the MIT License. See the LICENSE file for details.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL