generated from bisco/codex-bootstrap
feat: configure sni tcp routes
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user