Proxy incoming requests to multiple upstreams. Handy for fanning out webhooks to multiple targets simultaneously.
- Simple: Single binary, no heavy dependencies.
- Configurable: Easy-to-use YAML configuration.
- Efficient: Written in Go for high performance and low resource usage.
Ensure you have Go installed on your system.
The quickest way to install splitter is using the Go toolchain. This will download and compile the binary into your $GOPATH/bin directory.
go install github.com/Iandenh/splitter@latestNote: Ensure your
$(go env GOPATH)/bindirectory is added to your system's$PATHso you can run thesplittercommand globally from your terminal.
splitter relies on a YAML configuration file to define the upstream targets.
Use the provided example-config.yaml as a starting point or use splitter init. Here is an example of what your splitter.yaml might look like:
# splitter.yaml
port: 8080
upstreams:
- https://api.target-one.com/webhook
- https://api.target-two.com/webhookStart the proxy server by pointing it to your configuration file:
# will automatically look for splitter.yaml
splitter start
splitter start --config config.yamlOnce running, any HTTP request sent to the splitter (e.g., http://localhost:8080) will be duplicated and proxied to all defined upstreams.
If you prefer to clone the repository and build it manually:
git clone https://github.com/Iandenh/splitter.git
cd splitter
go build -o splitter main.go
./splitter start --config config.yaml