How to get access log of PAC(proxy auto config)

2019-06-14 04:57发布

问题:

I'm using Chrome, and I want monitor brower access log for myself ( I suspect some extension send url in background, etc ), I try to use Privoxy, but it can't logging HTTPS url

I think PAC is the only way for logging original url, I use PAC for few years, but I still don't know how to debug it or logging access. How I can do it ? (or any way to logging original url)

I guess some code:

function FindProxyForURL(url, host) {

    /*
     logging variable 'url' there, but how to write it to file or somewhere ?

     // some logging code

     */

    if (0
        || shExpMatch(url, "*facebook*")
        || shExpMatch(url, "*google.com/*")
        || shExpMatch(url, "*twitter/*")

    ) {
        return "SOCKS5 127.0.0.1:55777; SOCKS5 127.0.0.1:55888";
    }

    return "DIRECT";
}