subscription-server.mdx 4.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. ---
  2. title: Сервер подписок
  3. description: >-
  4. Отдельный HTTP/HTTPS-сервер, который отдаёт клиентам ссылки на подписки
  5. прокси (стандартные, JSON и Clash). Сервер слушает на собственном порту (по
  6. умолчанию 2096) и настраивается в разделе Settings → Subscription. Новые
  7. панели генерируют случайные префиксы путей для каждого формата; все пути можно
  8. изменить. Все конечные точки подписок устанавливают заголовки ответа, по
  9. которым клиентские приложения считывают информацию о трафике и сроке действия.
  10. full: true
  11. _openapi:
  12. preload:
  13. - ./public/openapi.json
  14. toc:
  15. - depth: 2
  16. title: >-
  17. Return base64-encoded subscription links for all enabled clients
  18. matching the subscription ID. When the request has an Accept: text/html
  19. header or ?html=1, renders a styled info page instead. The path prefix is
  20. configured by subPath.
  21. url: >-
  22. #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
  23. - depth: 2
  24. title: >-
  25. Return subscription as a JSON array of proxy configs (one per enabled
  26. client). Only when JSON subscription is enabled in settings. The path
  27. prefix is configured by subJsonPath.
  28. url: >-
  29. #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
  30. - depth: 2
  31. title: >-
  32. Return subscription as a Clash/Mihomo-compatible YAML config, including
  33. configured global Clash routing rules. Only when Clash subscription is
  34. enabled in settings. The path prefix is configured by subClashPath.
  35. url: >-
  36. #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
  37. structuredData:
  38. headings:
  39. - content: >-
  40. Return base64-encoded subscription links for all enabled clients
  41. matching the subscription ID. When the request has an Accept:
  42. text/html header or ?html=1, renders a styled info page instead. The
  43. path prefix is configured by subPath.
  44. id: >-
  45. 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
  46. - content: >-
  47. Return subscription as a JSON array of proxy configs (one per enabled
  48. client). Only when JSON subscription is enabled in settings. The path
  49. prefix is configured by subJsonPath.
  50. id: >-
  51. 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
  52. - content: >-
  53. Return subscription as a Clash/Mihomo-compatible YAML config,
  54. including configured global Clash routing rules. Only when Clash
  55. subscription is enabled in settings. The path prefix is configured by
  56. subClashPath.
  57. id: >-
  58. 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
  59. contents: []
  60. ---
  61. {/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
  62. export default function Layout(props) {
  63. const { APIPage, OpenAPIPage } = props.components ?? {};
  64. // "APIPage" is the old name from v10, this allows both for backward compatibility
  65. const Comp = OpenAPIPage ?? APIPage;
  66. return (
  67. <>
  68. {props.children}
  69. <Comp document="./public/openapi.json" webhooks={[]} operations={[{"path":"/{subPath}{subid}","method":"get"},{"path":"/{jsonPath}{subid}","method":"get"},{"path":"/{clashPath}{subid}","method":"get"}]} showTitle />
  70. </>
  71. );
  72. }