mholt / caddy-l4

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

Multiple Postgres Servers #243

Open maxbec opened 1 month ago

maxbec commented 1 month ago

Hey guys,

how can i serve multiple postgres DBs with Caddy as reverse proxy? Cant get it to work with the opnsense plugin. Example: db1.example.com => local:8446 db2.example.com => local:8447

Any ideas?

coolaj86 commented 6 days ago

You'll need to upgrade psql to Postgres 17 and use sslnegotiation=direct. Search other issues here for some recipes for how to do it with earlier versions, or tls sni alpn routing in general.