forwardproxy
forwardproxy copied to clipboard
The caddy2 version bahaves unexpectly.
I'm trying to simply set up an https proxy which has a basic auth check and proxy everything to a http proxy listening on localhost. In the Caddyfile, I write something like:
https://my.domain:31082 {
route {
forward_proxy {
basic_auth user passwd
upstream http://localhost:31081
}
}
}
However when I do curl -x https://user:[email protected]:31082 https://whatever.site
, it results in an error:1408F10B:SSL routines:ssl3_get_record:wrong version number
. When I do curl -x https://user:[email protected]:31082 http://whatever.site
, it just return an empty 200 response even if the "whatever.site" does not exist.
I have no idea why it behaves like this. Anyone help?