优化下载 pac.txt 文件逻辑。

pull/352/head
王良 2024-09-11 16:52:07 +08:00
parent 2975e57716
commit 31733975b3
2 changed files with 2 additions and 2 deletions

View File

@ -80,7 +80,7 @@ function savePacFile (pacTxt) {
// 异步下载 pac.txt ,避免影响代理服务的启动速度
async function downloadPacAsync (pacConfig) {
const remotePacFileUrl = pacConfig.pacFileUpdateUrl
log.info('开始下载远程 pac.txt from:', remotePacFileUrl)
log.info('开始下载远程 pac.txt 文件:', remotePacFileUrl)
request(remotePacFileUrl, (error, response, body) => {
if (error) {
log.error('下载远程 pac.txt 文件失败, error:', error, ', response:', response, ', body:', body)

View File

@ -31,7 +31,7 @@ module.exports = (serverConfig) => {
}
const overWallConfig = serverConfig.plugin.overwall
if (overWallConfig.pac) {
if (overWallConfig.pac && overWallConfig.pac.enabled) {
const pacConfig = overWallConfig.pac
// 自动更新 pac.txt