Skip to content

Commit

Permalink
feat: 支持更多的 subscription-userinfo
Browse files Browse the repository at this point in the history
  • Loading branch information
xream committed Nov 12, 2024
1 parent f4639d9 commit 56fd495
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion backend/package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
6 changes: 6 additions & 0 deletions backend/src/utils/flow.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
}

Expand Down

0 comments on commit 56fd495

Please sign in to comment.