Proxy a "regular" http connection to an "http proxy"ed one

1. Caddy version:

v2.6.3 h1:QRVBNIqfpqZ1eJacY44I6eUC1OcxQ8D04EKImzpj7S8= (caddy-l4 actually)

2. How I installed, and run Caddy:

Temporary fetched with

$ xcaddy build --with

a. System environment:

Ubuntu 18.04.6

b. Command:

./caddy proxy.json

c. Service/unit/compose file:

none yet

d. My complete Caddy config:

none yet

3. The problem I’m having:

I need to proxy a “regular” http connection to a backend server, which is accessible only via an http proxy. I know this is not possible via standard caddy server, and I found this variation, which should manage this config, if I understand correctly.

Unfortunately, I cannot find additional documentation other than README, and I cannot read Go code, so at first I was wondering if this is actually possible.

4. Error messages and/or full log output:

none yet

5. What I already tried:

The closest sample config I found on the README is the IMAP ssl proxy example. But I don’t understand how to configure the upstream connection via proxy.

Using cURL, I have to connect this way:

curl -x

6. Links to relevant resources:

Hi @maxxer , thank you for using caddy.

Do you mean you want to reverse proxy to a website, and the reverse proxy will use the specified proxy, so remote website can be easily opened on your website?

Currently caddy-l4 can’t do it, it can only act as a socks proxy server, and we’re working to make reverse proxy to be able to use proxy environment variable here.

Thank you for the reply. I’ll watch the issue and PR to test them. Thanks again

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