From e28e2a78fba3ab05d46da232e5e6a1bee706911c Mon Sep 17 00:00:00 2001 From: xream Date: Sat, 25 May 2024 18:29:48 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=B8=8B=E8=BD=BD=E8=AE=A2=E9=98=85?= =?UTF-8?q?=E6=97=A5=E5=BF=97=E4=B8=AD=E5=A2=9E=E5=8A=A0=E8=AF=B7=E6=B1=82?= =?UTF-8?q?=E7=9A=84=20User-Agent?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/package.json | 2 +- backend/src/restful/download.js | 12 ++++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/backend/package.json b/backend/package.json index 538eaa72c..8a9a7d6cf 100644 --- a/backend/package.json +++ b/backend/package.json @@ -1,6 +1,6 @@ { "name": "sub-store", - "version": "2.14.314", + "version": "2.14.315", "description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and ShadowRocket.", "main": "src/main.js", "scripts": { diff --git a/backend/src/restful/download.js b/backend/src/restful/download.js index eab328aac..d002f545c 100644 --- a/backend/src/restful/download.js +++ b/backend/src/restful/download.js @@ -55,7 +55,11 @@ async function downloadSubscription(req, res) { const platform = req.query.target || getPlatformFromHeaders(req.headers) || 'JSON'; - $.info(`正在下载订阅:${name}`); + $.info( + `正在下载订阅:${name}\n请求 User-Agent: ${ + req.headers['user-agent'] || req.headers['User-Agent'] + }`, + ); let { url, ua, @@ -228,7 +232,11 @@ async function downloadCollection(req, res) { const allCols = $.read(COLLECTIONS_KEY); const collection = findByName(allCols, name); - $.info(`正在下载组合订阅:${name}`); + $.info( + `正在下载组合订阅:${name}\n请求 User-Agent: ${ + req.headers['user-agent'] || req.headers['User-Agent'] + }`, + ); let { ignoreFailedRemoteSub,