caddyserver / forwardproxy

Forward proxy plugin for the Caddy web server
Apache License 2.0
603 stars 228 forks source link

acl add bypass control #44

Closed o0HalfLife0o closed 6 years ago

o0HalfLife0o commented 6 years ago

deny means visit the ip address or domain via proxy, it returns 404. bypass means it connect to ip or domain directly, not via proxy. please consider it.

sergeyfrolov commented 6 years ago

This is the type of thing that one would have to configure on the client side: I don't think there's a way for proxy to instruct client to connect to the domain directly. You can configure your client using a PAC file, and it has syntax specifically for this. Your PAC file would look something like

function FindProxyForURL(url, host) {
    if (host === "domain.to.bypass.com")
        return "DIRECT";
    return "HTTPS %s:%s";

If you're using SwitchyOmega, you can specify domains to bypass there as well.