caddy-ext
caddy-ext copied to clipboard
Specify host for layer4
Hi,
Is it possible to specify a host/domain for a service?
I'm using the caddy-docker-proxy module in combination with yours with this label:
labels:
caddy.layer4.:27017.proxy: "{{upstreams 27017}}"
which generates this caddy part:
"layer4": {
"servers": {
"srv0": {
"listen": [":27017"],
"routes": [
{
"handle": [
{
"handler": "proxy",
"upstreams": [{ "dial": ["10.0.22.76:27017"] }]
}
]
}
]
}
}
}
But I would like to specify the host/domain, so I could have multiple services running on the same port. Is it possible?
Check out section 5 of this comment. It tries to multiplex HTTPS and SSH by having layer4 itself listen on 433. It uses SSH and SNI matchers along with the subroute handler; I'm not sure if caddy-ext/layer4 supports those.
@arashsm79 Not sure how the link should help me?