Skip to content

feat: show subscription traffic and expiration - #6061

Open
tianrking wants to merge 1 commit into
2dust:masterfrom
tianrking:codex/subscription-usage-expiry
Open

feat: show subscription traffic and expiration#6061
tianrking wants to merge 1 commit into
2dust:masterfrom
tianrking:codex/subscription-usage-expiry

Conversation

@tianrking

Copy link
Copy Markdown

Closes #6045

Expose subscription usage and expiration metadata from the standard subscription-userinfo response header. The update path now keeps response headers through redirects, persists upload/download/total/expiration values with the subscription, and renders a traffic progress bar plus expiration timestamp in the subscription list when the provider supplies the metadata. Providers that do not send the header retain the existing behavior and hide the optional fields.

Validation:

  • git diff --check
  • Added focused parser coverage for valid, malformed, negative, and unknown header fields.
  • The targeted Gradle unit-test command was attempted locally but could not resolve the repository's current Android Gradle Plugin from the offline cache; no build result is claimed.

@eliotcougar

Copy link
Copy Markdown
Contributor

Is this something only one specific provider does, or is it some sort of standard all of them follow?

@tianrking

Copy link
Copy Markdown
Author

It is the widely used subscription-userinfo response-header format used by many Clash/Xray-compatible subscription services (upload, download, total, and expire), but it is not guaranteed by every provider. The implementation keeps the existing behavior and hides the optional UI when a provider does not send that header.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

subscription expiration time graphically

2 participants