_function setProxy(){
var pac = "var FindProxyForURL = function(url, host){"+
"if(shExpMatch(url, 'https:*www.baidu.com*')"+
"){"+
"return 'PROXY 115.239.210.27:443';"+
"}"+
"return 'DIRECT'"+
"}";
var config = {
mode: "pac_script",
pacScript: {
data: pac
}
}
chrome.proxy.settings.set({value: config, scope: 'regular'}, function(){});
}
setProxy();
开发了个chrome proxy插件,测试了下http走代理是可以的,https走代理报ERR_TUNNEL_CONNECTION_FAILED错误,帮忙看下哪里错了,对chrome不熟