Zodiac is a low-footprint high-performance reverse proxy and load balancer for Gemini, written in C++. Think of it like an nginx for Gemini, meant to connect to FastCGI-like local servers, or backends.
This project:
- Soothes the Gemini backend creation, since they don't need to worry about:
- TLS
- Timeouts
- CRLF, meaning that it's guaranteed to be there
- Performs demultiplexing of requests via SNI.
- Returns status code 43 (
PROXY ERROR
) in case the backend doesn't answer. - Can handle many simultaneous connections with very little resources.
The configuration file defaults to ./zodiac.conf
, but a different one can be specified via the ZODIAC_CONFIG
environment variable.
An example config is given in the example.conf file at the root of the repository.
The backend receives <URL><CR><LF><Client's IP><CR><LF>
. This way, the proxy is transparent while the specification is not broken, since the second line can be ignored.
A Dockerfile is available at the root of this repository. It is automatically built and pushed to the Docker Hub on each release, with the name jlxip/zodiac. To use it, run something along the lines of:
docker volume create zodiac_config
sudo cp yourconfig.conf /var/lib/docker/volumes/zodiac_config/_data/zodiac.conf
docker run -d -p 1965:1965 --name myserver --restart=unless-stopped -v zodiac_config:/config jlxip/zodiac:latest
- The first version was written in 4 hours, one hour after knowing Gemini exists.
- Zodiac follows Semantic Versioning 2.0.0.
- Dependencies: openssl, iniparser, and ssockets.
- bsgemini, by me, for static servers, written in C++.
- Timeouts
- Multiple capsules
- Worker threads
- More config (listening IP, port, timeouts)
- RR load balancing
- Config file in other place (
$ZODIAC_CONFIG
) - Move to epoll
- CI/CD
- Docker image