All the tests pass. I tried to keep as much as possible the same, but a
few things don't translate well to Caddy 2, notably one test in
probe_resist_test.go on L200, I had to change that test case since I
didn't quite understand why it was the way it was before.
Does not yet have v2 Caddyfile support.
In #53 we added a realm to the Proxy-Authenticate header, but the realm
only is added, when `probe_resistance` is off.
With this change, Proxy-Authenticate header will have a realm
when `probe_resistance` is on as well.
Make it look closer to standard Transport.DialTLS, because it's good to be
like standard things.
This also allows usage of thrid party TLS stacks, enabling
https://github.com/refraction-networking/utls.Roller integration.
We stopped parsing hostname from Host field, this fixes it back.
Implicit port 80 is good not only for GET, so I changed the logic to try
port 80 on all non-connects.
While testing, I also realized that switchy omega doesn't actually presend credentials,
(somehow I thought it did), so I removed a link to it from the README.md to avoid
confusion.
Fixes#36
We settled on a powerful, but a bit complicated acl design.
This commit makes a couple of cosmetic improvements. It also removes
http.Transport, which was previously used to dial and write http
requests for insecure GET requests. Now we have to dial manually,
so we can check the access control list.
Fixes: abnormal ContentLength; empty schema due to the out of position check.
Handling of HTTP GET requests: original request and URL are now reused. `generateForwardRequest()` is removed for simplicity.