Using caddy to proxy subdomain to VPN

Has anyone here used Caddy to proxy a vpn via a subdomain?

ie:

Docker VPN Container (openvpn) >< Caddy proxy to port 31194 >< vpn.mydomain.net

would it just be:

vpn.mydomain.net {
    proxy / ip:31194 {
        transparent
        websocket
    }
}

Caddy’s HTTP server only proxies HTTP connections, but the net server type can handle this: https://caddyserver.com/docs/net

Ah, must have missed that in the docs. Ill take a look at the net server. Thanks!

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.