diff --git a/packages/core/src/config/index.js b/packages/core/src/config/index.js index be15150..e932fa0 100644 --- a/packages/core/src/config/index.js +++ b/packages/core/src/config/index.js @@ -212,7 +212,7 @@ module.exports = { }, speedTest: { enabled: true, - interval: 60000, + interval: 160000, hostnameList: ['github.com'], dnsProviders: ['usa', 'quad9', 'rubyfish'] } diff --git a/packages/mitmproxy/src/options.js b/packages/mitmproxy/src/options.js index 8721ab5..3a532f2 100644 --- a/packages/mitmproxy/src/options.js +++ b/packages/mitmproxy/src/options.js @@ -13,10 +13,14 @@ module.exports = (config) => { const serverConfig = config const setting = serverConfig.setting - setting.script.dirAbsolutePath = path.join(setting.rootDir, setting.script.defaultDir) + if (!setting.script.dirAbsolutePath) { + setting.script.dirAbsolutePath = path.join(setting.rootDir, setting.script.defaultDir) + } const overwallConfig = serverConfig.plugin.overwall - overwallConfig.pac.pacFileAbsolutePath = path.join(setting.rootDir, overwallConfig.pac.pacFilePath) + if (!overwallConfig.pac.pacFileAbsolutePath) { + overwallConfig.pac.pacFileAbsolutePath = path.join(setting.rootDir, overwallConfig.pac.pacFilePath) + } const overwallMiddleware = createOverwallMiddleware(overwallConfig) const middlewares = [] if (overwallMiddleware) {