From 56fd495fb6b29f5dd366861aaf3ffc4ead35e95e Mon Sep 17 00:00:00 2001 From: xream Date: Tue, 12 Nov 2024 22:20:46 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=94=AF=E6=8C=81=E6=9B=B4=E5=A4=9A?= =?UTF-8?q?=E7=9A=84=20subscription-userinfo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/package.json | 2 +- backend/src/utils/flow.js | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/backend/package.json b/backend/package.json index f1e8a5bf5..7e0bd82b9 100644 --- a/backend/package.json +++ b/backend/package.json @@ -1,6 +1,6 @@ { "name": "sub-store", - "version": "2.14.416", + "version": "2.14.417", "description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and ShadowRocket.", "main": "src/main.js", "scripts": { diff --git a/backend/src/utils/flow.js b/backend/src/utils/flow.js index fc7a1fef0..014175479 100644 --- a/backend/src/utils/flow.js +++ b/backend/src/utils/flow.js @@ -198,12 +198,18 @@ export function parseFlowHeaders(flowHeaders) { const appUrlMatch = flowHeaders.match(/app_url=(.*?)\s*?(;|$)/); const appUrl = appUrlMatch ? appUrlMatch[1] : undefined; + const planNameMatch = flowHeaders.match(/plan_name=(.*?)\s*?(;|$)/); + const planName = planNameMatch + ? decodeURIComponent(planNameMatch[1]) + : undefined; + return { expires, total, usage: { upload, download }, remainingDays, appUrl, + planName, }; }