fix: 修复关闭pac无效的bug
parent
246da361a8
commit
9c7fb89265
|
@ -163,7 +163,7 @@ module.exports = {
|
|||
'www.googleapis.com': { '.*': { abort: false, desc: '设置abort:true可以快速失败,节省时间' } },
|
||||
'lh*.googleusercontent.com': { '.*': { abort: false, desc: '设置abort:true可以快速失败,节省时间' } },
|
||||
// mapbox-node-binary.s3.amazonaws.com/sqlite3/v5.0.0/napi-v3-win32-x64.tar.gz
|
||||
'*.s3.amazonaws.com': {
|
||||
'*.s3.1amazonaws1.com': {
|
||||
'/sqlite3/.*': {
|
||||
redirect: 'npm.taobao.org/mirrors'
|
||||
}
|
||||
|
|
|
@ -8,6 +8,9 @@ function matched (hostname, regexpMap) {
|
|||
if (ret1) {
|
||||
return true
|
||||
}
|
||||
if (pacClient == null) {
|
||||
return false
|
||||
}
|
||||
const ret = pacClient.FindProxyForURL('https://' + hostname, hostname)
|
||||
if (ret && ret.indexOf('PROXY ') === 0) {
|
||||
return true
|
||||
|
@ -19,7 +22,7 @@ module.exports = function createOverWallIntercept (overWallConfig) {
|
|||
if (!overWallConfig || overWallConfig.enabled !== true) {
|
||||
return null
|
||||
}
|
||||
if (overWallConfig.pac) {
|
||||
if (overWallConfig.pac && overWallConfig.pac.enabled) {
|
||||
// 初始化pac
|
||||
pacClient = pac.createPacClient(overWallConfig.pac.pacFileAbsolutePath)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue