feat: 支持更多的 subscription-userinfo

This commit is contained in:
xream 2024-11-12 22:20:46 +08:00
parent f4639d9a34
commit 56fd495fb6
No known key found for this signature in database
GPG Key ID: 1D2C5225471789F9
2 changed files with 7 additions and 1 deletions

View File

@ -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": {

View File

@ -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,
};
}