feat: 支持更多的 subscription-userinfo

This commit is contained in:
xream
2024-11-12 22:20:46 +08:00
parent f4639d9a34
commit 56fd495fb6
2 changed files with 7 additions and 1 deletions

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