xiongtong3 / switchy

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

Auto Switch Mode + PAC (default rule) #248

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. DefaultRule -> PAC Proxy
2. Some rules with SOCKS proxy
3. Select Auto Switch Mode 

What is the expected output?
When url doesn't match URL pattern should use default rule with PAC 
configuration.

What do you see instead?
URL are unreachable because don't use PAC configuration.

Operating system:
Windows

Error Log:
All success

Solution :
Normally Auto Switch Mode must download external PAC file and pack it into 
local PAC file (SwitchyAuto.pac).
But when Default Rule is a PAC proxy, Switchy don't download PAC file.

I found a solution :
After line 201 on the file "ruleManager.js" in fonction 
"downloadProfilesPacScripts()", add this two lines :
var defaultRule = RuleManager.getDefaultRule();
rules[defaultRule.id] = defaultRule;
...

This modification allow Default Rule to download external PAC file.

You can also see my attach file below.
Sorry for my bad english, i am french ^^

Original issue reported on code.google.com by Aur...@gmail.com on 17 Nov 2010 at 7:02

Attachments:

GoogleCodeExporter commented 9 years ago
Nice find. Alternatively, you should be able to add a "*" wildcard rule to the 
end of your switch rules list, and select your default proxy profile for this 
one.

Original comment by mr.ber...@gmail.com on 1 Feb 2012 at 1:13