-
Notifications
You must be signed in to change notification settings - Fork 0
Networking Modes
🇬🇧 English · 🇫🇷 Français
Each engine reaches the swarm one of four ways. Pick per your setup; they're per-engine, so a monolith's race and hoard can differ.
Set listen_port and forward it on your router. Nothing else. This is what the
template ships.
Set socks5_outbound_host / socks5_outbound_port. Outbound peer and tracker
traffic exits through the proxy; inbound is still direct (so you still forward
listen_port). Good for routing egress through a VPS without touching inbound.
Put the companion hydra-relay on
a cheap VPS. Inbound peers hit the VPS (haproxy + PROXY protocol v2) and land on
Hydra with their real IP preserved; socks5_outbound_* sends egress out the
same VPS. Net effect: your seedbox advertises the VPS IP, in both directions,
with no L3/VPN tunnel — just 12 bytes of PROXY-v2 header, no MTU or kernel
module cost.
Keys: listen_port_proxy_v2, listen_addr_proxy_v2, proxy_v2_trusted_sources
(the relay's IP, so the header is trusted).
Why it beats a WireGuard tunnel for this job: no tunnel to keep up, no MTU issues, and peers' real IPs survive (a plain SOCKS/VPN egress hides them).
Run an engine inside a VPN container whose forwarded port rotates. Hydra rebinds the listener without a restart — torrents and live peer connections stay up. Two ways to push the new port, no extra component:
- CLI (works on any node, including a headless
--agent-onlywith no HTTP API):hydra set-listen-port <engine-socket> <port> - HTTP (monolith / front):
POST /api/{race,hoard}/listen-port {"port":N}
Wire it to gluetun's own hook, exactly like people do for qBittorrent:
# gluetun service
environment:
- VPN_PORT_FORWARDING=on
- VPN_PORT_FORWARDING_UP_COMMAND=/bin/sh -c 'hydra set-listen-port /config/hoard.sock {{PORTS}}'
⚠️ One forwarded port serves one engine. Two engines are two processes and cannot share an inbound TCP port. If your VPN forwards only a single port, do not point it at both — run one engine per gluetun instead (Deployment Topologies).
Advanced keys (listen_port_proxy_v2, socks5_outbound_*, …) are opt-in and
off by default.
Hydra · 🇬🇧
Understand
Install & set up
- Installation & First Run
- Bare-metal Install
- Windows install
- Networking Modes
- Gluetun (VPN)
- Deployment Topologies
Use day-to-day
Reference
Hydra · 🇫🇷
Comprendre
Installer & mettre en place
- Installation & premier démarrage
- Installation bare-metal
- Installation Windows
- Modes réseau
- Gluetun (VPN)
- Topologies de déploiement
Utiliser au quotidien
Référence