Open myfrndjk opened 7 years ago
FYI @fujunwei
You can use the chrome.proxy API to manage Chrome's proxy settings. The following code sets a custom PAC script.
var config = { mode: "pac_script", pacScript: { data: "function FindProxyForURL(url, host) {\n" + " if (host == 'foobar.com')\n" + " return 'PROXY blackhole:80';\n" + " return 'DIRECT';\n" + "}" } }; chrome.proxy.settings.set( {value: config, scope: 'regular'}, function() {});
@fujunwei Looks like chrome.proxy
API was broken. Would you like to look at into it?
@ghostoy : Thanks for heads up i will try once it is fixed
@fujunwei : Thanks for your suggestion.Since i am new to nw.js I am not sure where to add these lines.Do I need to add these lines in package.json ?
Hi,
I am developing an app which requires to route the traffic of each domain via respective proxy. Do we have option to use PAC url for proxy support .If not how do we set up proxy for different domains like site : abc.com proxy : 12345:80 site : xyz.com proxy : 9999999:8880
Already if we have option to set up proxy can some one share a sample code
Thanks