Archive for the ‘Computer and Internet’ Category

Some Tips on Using Windows Like It’s a Linux (2)

March 23, 2008
For firefox, the automation proxy script will be like the following (I failed to make both IE and FF use the same script, but as long as they each has a working script, it won’t be a problem):


$cat ~/.proxy.html
function FindProxyForURL(url, host)
{
    if (myIpAddress()=="192.168.1.3") {
        return "DIRECT";
    }
    else if (
        isPlainHostName(host) ||
        (host =="127.0.0.1") ||
        dnsDomainIs(host, ".mycomp.com")
        ) {
        return "DIRECT";
    }
    else {
        return "PROXY gateway.mycomp.com:1080";
    }
}

## Local Variables: ***
## mode: tcl ***
## End: ***

And in firefox, we configure it like the following:

You should note the difference in the way the auto config URL is written, the path separator is / in firefox, but ie uses \. It probably won’t work if you misused. But I have no interest to find it out…

To be continued…