Skip to content

Management via Headers

HTTP headers let a provider pass subscription information straight into the Mole interface. Every header is optional — a subscription that sends none of them imports fine.

User statistics

The standard subscription-userinfo header is used:

subscription-userinfo: upload=1073741824; download=5368709120; total=107374182400; expire=1722612000
  • upload / download: Traffic used, in bytes.
  • total: Total quota, in bytes.
  • expire: Unix timestamp of expiry, in seconds.

Supported headers

Header Effect in the app
subscription-userinfo Traffic and expiry in the subscription block
profile-title Subscription name
announce Notice text inside the subscription block
support-url Target of the "Support" action
profile-web-page-url Link to the user's account page
profile-update-interval Suggested refresh interval, in hours
profile-update-always true enables auto-refresh for the subscription

profile-title

Sets the displayed name. If the user has renamed the subscription in its settings, their name is pinned and profile-title no longer overwrites it.

announce

The text is rendered inside the subscription block on the Servers screen. This is not a push notification: it appears after the next subscription refresh, not at an arbitrary moment.

The header must be ASCII (an HTTP restriction). For other alphabets, send the value base64- or percent-encoded — Mole decodes both.

profile-update-interval

A value in hours, used in two ways:

  • 0 disables auto-refresh; any positive value enables it.
  • Until the user picks their own interval in the subscription settings, your value is adopted as the suggested one (snapped to the nearest preset: 30 min / 1 / 2 / 6 / 12 / 24 h).

A user-chosen interval wins and is never overwritten by your value.

What Mole does not read

Headers such as profile-icon, banner-image and hide-url are not implemented in Mole and are ignored.