---
title: Subscription Server
description: A separate HTTP/HTTPS server that serves proxy subscription links
  (standard, JSON, and Clash) to clients. The server listens on its own port
  (default 2096) and is configured in Settings → Subscription. Fresh panels
  generate random path prefixes for each format; all paths remain configurable.
  Every subscription endpoint sets response headers for client apps to read
  traffic/expiry info.
full: true
_openapi:
  preload:
    - ./public/openapi.json
  toc:
    - depth: 2
      title: 'Return base64-encoded subscription links for all enabled clients
        matching the subscription ID. When the request has an Accept: text/html
        header or ?html=1, renders a styled info page instead. With
        ?format=info, returns the page view-model as JSON (traffic, expiry,
        online status; no links) for live polling. The path prefix is configured
        by subPath.'
      url: '#return-base64-encoded-subscription-links-for-all-enabled-clients-matching-the-subscription-id-when-the-request-has-an-accept-texthtml-header-or-html1-renders-a-styled-info-page-instead-with-formatinfo-returns-the-page-view-model-as-json-traffic-expiry-online-status-no-links-for-live-polling-the-path-prefix-is-configured-by-subpath'
    - depth: 2
      title: Return the same status and subscription metadata headers as GET without a
        response body.
      url: '#return-the-same-status-and-subscription-metadata-headers-as-get-without-a-response-body'
    - depth: 2
      title: Return subscription as a JSON array of proxy configs (one per enabled
        client). Only when JSON subscription is enabled in settings. The path
        prefix is configured by subJsonPath.
      url: '#return-subscription-as-a-json-array-of-proxy-configs-one-per-enabled-client-only-when-json-subscription-is-enabled-in-settings-the-path-prefix-is-configured-by-subjsonpath'
    - depth: 2
      title: Return the JSON subscription status and metadata headers without a body.
        Registered only when JSON subscriptions are enabled.
      url: '#return-the-json-subscription-status-and-metadata-headers-without-a-body-registered-only-when-json-subscriptions-are-enabled'
    - depth: 2
      title: Return subscription as a Clash/Mihomo-compatible YAML config, including
        configured global Clash routing rules. Only when Clash subscription is
        enabled in settings. The path prefix is configured by subClashPath.
      url: '#return-subscription-as-a-clashmihomo-compatible-yaml-config-including-configured-global-clash-routing-rules-only-when-clash-subscription-is-enabled-in-settings-the-path-prefix-is-configured-by-subclashpath'
    - depth: 2
      title: Return the Clash subscription status and metadata headers without a body.
        Registered only when Clash subscriptions are enabled.
      url: '#return-the-clash-subscription-status-and-metadata-headers-without-a-body-registered-only-when-clash-subscriptions-are-enabled'
  structuredData:
    headings:
      - content: 'Return base64-encoded subscription links for all enabled clients
          matching the subscription ID. When the request has an Accept:
          text/html header or ?html=1, renders a styled info page instead. With
          ?format=info, returns the page view-model as JSON (traffic, expiry,
          online status; no links) for live polling. The path prefix is
          configured by subPath.'
        id: return-base64-encoded-subscription-links-for-all-enabled-clients-matching-the-subscription-id-when-the-request-has-an-accept-texthtml-header-or-html1-renders-a-styled-info-page-instead-with-formatinfo-returns-the-page-view-model-as-json-traffic-expiry-online-status-no-links-for-live-polling-the-path-prefix-is-configured-by-subpath
      - content: Return the same status and subscription metadata headers as GET without
          a response body.
        id: return-the-same-status-and-subscription-metadata-headers-as-get-without-a-response-body
      - content: Return subscription as a JSON array of proxy configs (one per enabled
          client). Only when JSON subscription is enabled in settings. The path
          prefix is configured by subJsonPath.
        id: return-subscription-as-a-json-array-of-proxy-configs-one-per-enabled-client-only-when-json-subscription-is-enabled-in-settings-the-path-prefix-is-configured-by-subjsonpath
      - content: Return the JSON subscription status and metadata headers without a
          body. Registered only when JSON subscriptions are enabled.
        id: return-the-json-subscription-status-and-metadata-headers-without-a-body-registered-only-when-json-subscriptions-are-enabled
      - content: Return subscription as a Clash/Mihomo-compatible YAML config, including
          configured global Clash routing rules. Only when Clash subscription is
          enabled in settings. The path prefix is configured by subClashPath.
        id: return-subscription-as-a-clashmihomo-compatible-yaml-config-including-configured-global-clash-routing-rules-only-when-clash-subscription-is-enabled-in-settings-the-path-prefix-is-configured-by-subclashpath
      - content: Return the Clash subscription status and metadata headers without a
          body. Registered only when Clash subscriptions are enabled.
        id: return-the-clash-subscription-status-and-metadata-headers-without-a-body-registered-only-when-clash-subscriptions-are-enabled
    contents: []
---

{/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}

export default function Layout(props) {
  const { APIPage, OpenAPIPage } = props.components ?? {};
  // "APIPage" is the old name from v10, this allows both for backward compatibility
  const Comp = OpenAPIPage ?? APIPage;
  return (
    <>
      {props.children}
      <Comp document="./public/openapi.json" webhooks={[]} operations={[{"path":"/{subPath}{subid}","method":"get"},{"path":"/{subPath}{subid}","method":"head"},{"path":"/{jsonPath}{subid}","method":"get"},{"path":"/{jsonPath}{subid}","method":"head"},{"path":"/{clashPath}{subid}","method":"get"},{"path":"/{clashPath}{subid}","method":"head"}]} showTitle />
    </>
  );
}