Can Caddy be used as a forward proxy?

General question:

We are already using Caddy 2 as a static file server.

Now we need to proxy calls to Okta from multiple user machines. We are considering using HAProxy to do this, but if there is any way for us to use Caddy 2 for this purpose, we would prefer that. Can it be done?

We have seen that there is a forwardproxy plugin, but it’s not clear whether or not it works with Caddy 2.

What would you suggest for a very simple proxy that we don’t want to spend a lot of time on? HAProxy as a second installation, or adding this to Caddy 2?

Thank you!

This branch supports Caddy 2: Support Caddy 2 by mholt · Pull Request #74 · caddyserver/forwardproxy · GitHub

The only remaining question is the quality of the probe resistance, but that’s probably not relevant to your needs.

You can also kind of use Caddy’s reverse proxy with dynamic upstreams. Depends what you requirements are.

1 Like

This topic was automatically closed after 30 days. New replies are no longer allowed.