xiongtong3 / switchy

Automatically exported from code.google.com/p/switchy
0 stars 0 forks source link

Default Rule Doesn't Work With Proxy Profile #254

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Proxy Switchy! - Version: 1.6.3  (Chrome 8.0.552.215 beta / Linux)

I have two profiles defined.  I set one for the "default rule" and the other 
for a specific website.  However, the default rule is still "DIRECT".

function regExpMatch(url, pattern) {
    try { return new RegExp(pattern).test(url); } catch(ex) { return false; }
}

function FindProxyForURL(url, host) {
    if (shExpMatch(url, '*.pandora.com/*') || shExpMatch(url, '*pandora.com/*')) return 'PROXY usa-cache.mycompany.com:3128';
    return 'DIRECT';
}

Original issue reported on code.google.com by bcwh...@google.com on 13 Dec 2010 at 11:05

Attachments: