Getting Started
Installation
Install script (Linux)
bash
curl -sSL https://raw.githubusercontent.com/HyBuildNet/quic-relay/master/dist/install.sh | sudo bash
sudo systemctl enable --now quic-relayThis installs the binary to /usr/local/bin/quic-relay and creates a systemd service. Configuration is stored at /etc/quic-relay/config.json.
Docker
bash
docker run -p 5520:5520/udp ghcr.io/hybuildnet/quic-relay:latestWith a custom config:
bash
docker run -p 5520:5520/udp \
-v /path/to/config.json:/data/config.json \
ghcr.io/hybuildnet/quic-relay:latestPodman
bash
podman run -p 5520:5520/udp ghcr.io/hybuildnet/quic-relay:latestBuild from source
bash
git clone https://github.com/HyBuildNet/quic-relay.git
cd quic-relay
make buildThe binary is written to bin/proxy.
Basic configuration
Create a config file that routes connections based on SNI:
json
{
"listen": ":5520",
"handlers": [
{
"type": "sni-router",
"config": {
"routes": {
"play.example.com": "10.0.0.1:5520",
"lobby.example.com": "10.0.0.2:5520"
}
}
},
{
"type": "forwarder"
}
]
}This configuration:
- Listens on UDP port 5520
- Routes
play.example.comto10.0.0.1:5520 - Routes
lobby.example.comto10.0.0.2:5520 - Forwards matched connections to their backends
Reloading configuration
The proxy supports hot-reloading. Send SIGHUP to reload the config without dropping existing connections:
bash
systemctl reload quic-relay
# or
kill -HUP $(pidof quic-relay)