proxy-loadbalancer/README.md

43 lines
1.7 KiB
Markdown
Raw Permalink Normal View History

2024-01-14 14:17:56 -07:00
# proxy-loadbalancer
2024-01-14 15:19:03 -07:00
_A round-robin load balancer for HTTP proxies._
2024-04-16 21:48:06 -06:00
This is a simple proxy load balancer that will route requests to a cluster of proxy backends in a round-robin fashion. This makes it easy to connect your clients to a large number of proxy servers without worrying about implementing anything special clientside.
2024-04-12 01:26:45 -06:00
2024-04-16 21:48:06 -06:00
This proxy server will transparently forward HTTPS requests without terminating them, meaning a self-signed certificate is not required. Downstream HTTPS proxy servers are not supported.
2024-01-14 15:19:03 -07:00
Memory usage sits at around 25M under load.
2024-01-14 15:19:03 -07:00
## Install
2024-04-12 18:34:47 -06:00
1. Download the latest release from [/releases](https://git.evulid.cc/cyberes/proxy-loadbalancer/releases) or run `./build.sh` to build the program locally.
2. `cp config.example.yml config.yml`
3. Edit the config.
4. Start the loadbalancer with `./proxy-loadbalancer --config [path to your config.yml]`
2024-01-14 15:19:03 -07:00
2024-04-12 19:15:37 -06:00
## Use
2024-04-12 18:34:47 -06:00
You can run your own "public IP delivery server" `canihazip` <https://git.evulid.cc/cyberes/canihazip> or use the default `api.ipify.org`
2024-01-14 15:19:03 -07:00
2024-04-12 18:34:47 -06:00
An example systemd service `loadbalancer.service` is provided.
2024-03-20 19:06:06 -06:00
2024-04-16 21:48:06 -06:00
The server displays health, stats, info at `/json`.
2024-04-12 19:15:37 -06:00
2024-04-12 20:50:06 -06:00
```
=== Proxy Load Balancer ===
Usage of ./proxy-loadbalancer:
--config [string]
Path to the config file
-d, --debug
Enable debug mode
--v Print version and exit
-h, --help Print this help message
2024-04-12 20:50:06 -06:00
```
2024-03-20 19:06:06 -06:00
## Special Headers
2024-04-16 21:48:06 -06:00
The load balancer accepts special headers to control its behavior:
2024-03-20 19:06:06 -06:00
2024-04-12 18:34:47 -06:00
- `Thirdparty-Bypass`: don't use any third-party endpoints for this request.
- `Thirdparty-Include-Broken`: use all online endpoints for this request, including third-party ones that failed the special test.