Closed U201413497 closed 1 year ago
May I know what is your multi-user configuration like exactly, and why would it be complex in caddy v2? 😊 I think some examples may help others understand the situation, so that they can consider on the necessity to add support for caddy v1.
caddy v1 like this,basicauth add username1 and password1,add username2 and password2,it works
domain.com:8443 { tls /path/certificate.crt /path/private.key forwardproxy { basicauth username1 password1 basicauth username2 password2 hide_ip hide_via probe_resistance secert.localhost upstream http://127.0.0.1:8080 } proxy / https://example.com }
caddy v2 like this,all content of the forward_proxy module needs to be refilled. :443, domin.com tls example@example.com route { forward_proxy { basic_auth username1 password1 hide_ip hide_via probe_resistance } forward_proxy { basic_auth username2 password2 hide_ip hide_via probe_resistance } reverse_proxy https://example.com { header_up Host {upstream_hostport} header_up X-Forwarded-Host {host} } }
so caddy v1 just adds username and password in basicauth, it is simple.
Thanks for your sharing! I tested on my machine and the current version does fail to read and apply multiple user credentials.
It looks like the upstream forwardproxy
is said to be supporting multi-user configuration in its README, but actually lacks it. I think we could fix the forwardproxy
module than building for caddy v1, since supporting a legacy version usually needs extra efforts, although I have to admit that it may take some time for the upstream to fix the issue.
P.S. For ones who might be interested:
forwardproxy
is based on the master
branch of the upstream, but actually it seems to be based on the caddy2
branch. And it falls behind a little from the upstream.caddy2
branch changelog: https://github.com/caddyserver/forwardproxy/compare/master...caddy2.There is no plan to support this setup with Caddy v1.
Multiple auth is fixed here https://github.com/klzgrad/forwardproxy/releases/tag/v2.7.6-naive
excuse me. The project linked with https://github.com/klzgrad/forwardproxy doesn't provide the option for the Issue, can you provide a version of caddy compiled with naive plugin using caddy v1? It is too complicated to configure multi-users in caddy v2. Thank you so much.