feat: configure sni tcp routes

This commit is contained in:
Alfredo Di Stasio
2026-06-30 10:00:45 +02:00
parent 7dfc23d69e
commit b5beb27623
5 changed files with 52 additions and 16 deletions
+11 -5
View File
@@ -12,19 +12,25 @@ Docker Compose deployment for Traefik used as a TCP load balancer with TLS passt
## Configuration
Edit backend targets in `config/dynamic/tcp-services.yml`:
Edit SNI routes and backend targets in `config/dynamic/tcp-services.yml`:
```yaml
tcp:
routers:
lab-younerd:
rule: "HostSNI(`lab.younerd.org`)"
service: lab-younerd
tls:
passthrough: true
services:
ssl-backends:
lab-younerd:
loadBalancer:
servers:
- address: "192.0.2.10:443"
- address: "192.0.2.11:443"
- address: "host.docker.internal:8443"
```
The example addresses use the documentation-only `192.0.2.0/24` range. Replace them with the real backend IP addresses and ports before deploying. If a backend listens on the Docker host itself, use `host.docker.internal:PORT`.
`HostSNI(...)` matches the hostname sent by the client during the TLS handshake. If a backend listens on the Docker host itself, use `host.docker.internal:PORT`.
## Run