mholt / caddy-l4

Layer 4 (TCP/UDP) app for Caddy
Apache License 2.0
937 stars 71 forks source link

Can support Dynamic upstreams ? #117

Open New2Niu opened 1 year ago

New2Niu commented 1 year ago

{ "apps": {
"layer4": {
"servers": {
"example": {
"listen": [":443"],
"routes": [{
"match": [{
"tls": {
"sni": ["*.google.com.hk"]
}
}],
"handle": [{
"handler": "proxy",
"dynamic_upstreams": {
"dial_timeout": 10000000000,
"name": "{sni}",
"port": "443",
"source": "a"
}
}]
}]
}
}
}
}
}
when i config wildcard tls sni, handler can support dynamic_upstreams?

francislavoie commented 1 year ago

The proxy handler in caddy-l4 is a completely separate piece of code from vanilla Caddy's reverse_proxy. So no, it's not supported right now. But it probably could be. PRs welcome.

New2Niu commented 1 year ago

The proxy handler in caddy-l4 is a completely separate piece of code from vanilla Caddy's reverse_proxy. So no, it's not supported right now. But it probably could be. PRs welcome.

nice