Gozargah / Marzban

Unified GUI Censorship Resistant Solution Powered by Xray
https://t.me/gozargah_marzban
GNU Affero General Public License v3.0
3.73k stars 517 forks source link

`expire` Field not present in `subscription-userinfo` header #1265

Closed nulluser0 closed 2 months ago

nulluser0 commented 2 months ago

Describe the bug The expire field is not present in subscription-userinfo headers for sing-box subscriptions in users with data limits.

To Reproduce Steps to reproduce the behavior:

  1. Create user with a data limit
  2. Copy subscription URL of the user
  3. Either using curl, panel docs page, or any other client, GET (subscription url), accept application/json with user agent set as HiddifyNext (or add /sing-box).
  4. Check headers. The expire field is absent from subscription-userinfo.

Expected behavior For users with data limits, there should be an expire field in subscription-userinfo. Lack of this means clients (like Hiddify Next) cannot show user their data usage.

Screenshots N/A

Machine details (please complete the following information): Client:

Server:

Additional context N/A

nulluser0 commented 2 months ago

Upon further exploration, I realized that the expire field is present only when expiration date and data limit are both set. When one or both are not, the expire field disappears.

Is this intended?

M03ED commented 2 months ago

this is fixed on dev branch, check dev version