For subscription providers
Material Xray works with the subscription formats and headers that common panels already produce, including the Happ-compatible extensions. This section covers what the client sends, what it understands, and how to hand a subscription to a user in one tap.
How a refresh works
Section titled “How a refresh works”- The client requests your URL with its request headers. With JSON first on (the default), it tries
<url>/jsonfirst and falls back to the URL itself. - It reads response headers, along with any
#key: valuebody comments. - It parses the body as Xray JSON, a plain share-link list, or base64. See subscription format.
- It applies metadata, then routing and per-app rules if the user’s routing policy allows it.
Subscription formatBody formats, the /json endpoint, redirects and URL migration.
Request headersUser-Agent, HWID and device headers the client sends.
Response headersEvery header the client reads, with formats and examples.
Routing headerPush routing rules as Xray JSON or Happ routing links.
Per-app routingTell the client which apps to proxy or bypass.
DeeplinksAdd a subscription with one tap from your site or bot.