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.
Client request headers
Mole sends X-Client: mole, an installation identifier in X-Hwid, and User-Agent: mole by default.
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 |
sub-expire |
Subscription expiry timestamp (Unix timestamp) |
profile-title |
Subscription name |
announce |
Notice text inside the subscription block |
announce-url |
Link to detailed announcement webpage |
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 |
new-url |
Permanent new subscription address (endpoint migration) |
fallback-url |
Fallback subscription address when primary host fails |
hide-config |
true — mask address/ports and block config export |
per-app-proxy-list |
URL to external package list for split-tunneling |
per-app-proxy-mode |
Per-App mode: whitelist or blacklist |
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 and announce-url
The announce 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.
When announce-url is present, the announcement banner becomes interactive: clicking it opens the browser with the full announcement webpage.
new-url and fallback-url
Allow providers to manage failover and infrastructure migration:
new-url: Specifies a permanent new subscription URL. Upon receiving this header, Mole automatically and seamlessly updates the stored subscription URL in the database, preventing loss of connectivity when the provider changes domains.fallback-url: Designates a secondary endpoint for subscription delivery. If the primary host fails (HTTP 5xx, timeout, or network exception), Mole automatically fetches the server list from the fallback URL.
hide-config (Configuration Obfuscation)
The hide-config: true flag (along with aliases hide-url: 1 and hide-settings: 1) protects server parameters from exposure:
- Masks real IP addresses and ports in the UI (
***.***.***.***:****). - Hides authorization credentials, passwords, and UUIDs (
••••••••••••••••). - Masks secret subscription token URLs in settings.
- Blocks export: disables QR code generation, share link copying, and raw Xray configuration inspection.
The flag can also be passed via a #hide-config: true directive in plain text subscriptions or via "meta": { "hideConfig": true } in JSON subscriptions.
per-app-proxy-list and per-app-proxy-mode
Server-directed per-app split tunneling rules (Android and Desktop):
per-app-proxy-mode: Sets the mode —whitelist(only selected apps) orblacklist(all apps except selected).per-app-proxy-list: URL pointing to an external text file containing comma- or newline-separated package identifiers (com.example.app). Using an external URL prevents Nginx header overflow errors (502 Bad Gateway).
profile-update-interval
A value in hours, used in two ways:
0disables 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
Styling headers such as profile-icon or banner-image are not supported in Mole and are ignored.