inbounds.mdx 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  1. ---
  2. title: Inbounds
  3. description: Manage inbound configurations and their clients. All endpoints live
  4. under /panel/api/inbounds and require a logged-in session or Bearer token.
  5. Link-generating endpoints honour forwarded headers only when the request comes
  6. from a configured trusted proxy.
  7. full: true
  8. _openapi:
  9. preload:
  10. - ./public/openapi.json
  11. toc:
  12. - depth: 2
  13. title: List every inbound owned by the authenticated user, including each
  14. inbound’s clientStats traffic counters. settings, streamSettings, and
  15. sniffing are returned as nested JSON objects (no escaped strings);
  16. legacy callers that send them back as JSON-encoded strings are still
  17. accepted on write.
  18. url: '#list-every-inbound-owned-by-the-authenticated-user-including-each-inbounds-clientstats-traffic-counters-settings-streamsettings-and-sniffing-are-returned-as-nested-json-objects-no-escaped-strings-legacy-callers-that-send-them-back-as-json-encoded-strings-are-still-accepted-on-write'
  19. - depth: 2
  20. title: Same shape as /list but with settings.clients[] stripped down to {email,
  21. enable, comment} and ClientStats not enriched with UUID/SubId. Use this
  22. for list pages; fetch /get/:id when you need the full per-client payload
  23. (uuid, password, flow, ...).
  24. url: '#same-shape-as-list-but-with-settingsclients-stripped-down-to-email-enable-comment-and-clientstats-not-enriched-with-uuidsubid-use-this-for-list-pages-fetch-getid-when-you-need-the-full-per-client-payload-uuid-password-flow-'
  25. - depth: 2
  26. title: Lightweight picker projection of the authenticated user’s inbounds.
  27. Returns id, remark, tag, protocol, port, a server-computed
  28. tlsFlowCapable flag (true for VLESS on TCP with tls or reality, or on
  29. XHTTP with VLESS encryption / vlessenc enabled), and ssMethod (the
  30. Shadowsocks cipher, empty for non-Shadowsocks inbounds — used by the
  31. client UI to generate a valid Shadowsocks 2022 PSK). Use this for
  32. dropdowns and attach pickers — it skips settings, streamSettings, and
  33. clientStats so the payload stays small even on panels with thousands of
  34. clients.
  35. url: '#lightweight-picker-projection-of-the-authenticated-users-inbounds-returns-id-remark-tag-protocol-port-a-server-computed-tlsflowcapable-flag-true-for-vless-on-tcp-with-tls-or-reality-or-on-xhttp-with-vless-encryption--vlessenc-enabled-and-ssmethod-the-shadowsocks-cipher-empty-for-non-shadowsocks-inbounds--used-by-the-client-ui-to-generate-a-valid-shadowsocks-2022-psk-use-this-for-dropdowns-and-attach-pickers--it-skips-settings-streamsettings-and-clientstats-so-the-payload-stays-small-even-on-panels-with-thousands-of-clients'
  36. - depth: 2
  37. title: Return every protocol URL (vless://, vmess://, trojan://, ss://,
  38. hysteria://, mtproto) across all inbounds and all of their clients.
  39. Links are rendered through the subscription engine, so the configured
  40. remark template (name-only display part) is applied per client — the
  41. same output the client info/QR pages use. Protocols without a URL form
  42. (socks, http, mixed, wireguard, dokodemo, tunnel) contribute nothing.
  43. Used by the panel’s "Export all inbound links" action.
  44. url: '#return-every-protocol-url-vless-vmess-trojan-ss-hysteria-mtproto-across-all-inbounds-and-all-of-their-clients-links-are-rendered-through-the-subscription-engine-so-the-configured-remark-template-name-only-display-part-is-applied-per-client--the-same-output-the-client-infoqr-pages-use-protocols-without-a-url-form-socks-http-mixed-wireguard-dokodemo-tunnel-contribute-nothing-used-by-the-panels-export-all-inbound-links-action'
  45. - depth: 2
  46. title: Fetch a single inbound by numeric ID.
  47. url: '#fetch-a-single-inbound-by-numeric-id'
  48. - depth: 2
  49. title: Create a new inbound. Send the full inbound payload (protocol, port,
  50. settings, streamSettings, sniffing, remark, expiryTime, total, enable).
  51. settings, streamSettings, and sniffing may be sent as nested JSON
  52. objects (preferred) or as JSON-encoded strings (legacy).
  53. url: '#create-a-new-inbound-send-the-full-inbound-payload-protocol-port-settings-streamsettings-sniffing-remark-expirytime-total-enable-settings-streamsettings-and-sniffing-may-be-sent-as-nested-json-objects-preferred-or-as-json-encoded-strings-legacy'
  54. - depth: 2
  55. title: Delete an inbound by ID. Also removes its associated client stats rows.
  56. url: '#delete-an-inbound-by-id-also-removes-its-associated-client-stats-rows'
  57. - depth: 2
  58. title: Delete many inbounds in one call. Processes the list sequentially;
  59. failures are reported per id and the rest still proceed. Restarts xray
  60. at most once.
  61. url: '#delete-many-inbounds-in-one-call-processes-the-list-sequentially-failures-are-reported-per-id-and-the-rest-still-proceed-restarts-xray-at-most-once'
  62. - depth: 2
  63. title: Replace an inbound’s configuration. Body shape mirrors /add. Heavy on
  64. inbounds with thousands of clients — prefer /setEnable for enable-only
  65. flips.
  66. url: '#replace-an-inbounds-configuration-body-shape-mirrors-add-heavy-on-inbounds-with-thousands-of-clients--prefer-setenable-for-enable-only-flips'
  67. - depth: 2
  68. title: Toggle only the enable flag without serialising the whole settings JSON.
  69. Recommended for UI switches on large inbounds.
  70. url: '#toggle-only-the-enable-flag-without-serialising-the-whole-settings-json-recommended-for-ui-switches-on-large-inbounds'
  71. - depth: 2
  72. title: Set only the subscription sort order. Reads the stored inbound, so a
  73. reorder cannot carry a stale client list over a concurrent edit.
  74. url: '#set-only-the-subscription-sort-order-reads-the-stored-inbound-so-a-reorder-cannot-carry-a-stale-client-list-over-a-concurrent-edit'
  75. - depth: 2
  76. title: Zero out upload + download counters for a single inbound. Does not touch
  77. per-client counters.
  78. url: '#zero-out-upload--download-counters-for-a-single-inbound-does-not-touch-per-client-counters'
  79. - depth: 2
  80. title: Remove every client attached to a single inbound while keeping the
  81. inbound itself. Collects emails from settings.clients[] and feeds them
  82. into the optimized bulk-delete path (runtime user removal + traffic-row
  83. cleanup + SyncInbound). Destructive and cannot be undone.
  84. url: '#remove-every-client-attached-to-a-single-inbound-while-keeping-the-inbound-itself-collects-emails-from-settingsclients-and-feeds-them-into-the-optimized-bulk-delete-path-runtime-user-removal--traffic-row-cleanup--syncinbound-destructive-and-cannot-be-undone'
  85. - depth: 2
  86. title: Reset upload + download counters on every inbound. Destructive —
  87. accounting history is lost.
  88. url: '#reset-upload--download-counters-on-every-inbound-destructive--accounting-history-is-lost'
  89. - depth: 2
  90. title: Bulk-import an inbound from a JSON blob (e.g. one exported via the UI).
  91. The body uses form encoding with a single "data" field.
  92. url: '#bulk-import-an-inbound-from-a-json-blob-eg-one-exported-via-the-ui-the-body-uses-form-encoding-with-a-single-data-field'
  93. - depth: 2
  94. title: Receive a master panel's aggregated per-client usage, keyed by the
  95. master's GUID. Stored in a side table used only for the UI display
  96. overlay and local quota enforcement — never folded into the local
  97. counters that masters poll, so delta accounting stays intact. Called
  98. panel-to-panel by the node traffic sync job.
  99. url: '#receive-a-master-panels-aggregated-per-client-usage-keyed-by-the-masters-guid-stored-in-a-side-table-used-only-for-the-ui-display-overlay-and-local-quota-enforcement--never-folded-into-the-local-counters-that-masters-poll-so-delta-accounting-stays-intact-called-panel-to-panel-by-the-node-traffic-sync-job'
  100. - depth: 2
  101. title: List the fallback rules attached to a master VLESS/Trojan TCP-TLS
  102. inbound. Each rule links one child inbound (the dest) to optional
  103. SNI/ALPN/path/dest/xver match criteria. When dest is empty the child
  104. inbound's listen+port is used.
  105. url: '#list-the-fallback-rules-attached-to-a-master-vlesstrojan-tcp-tls-inbound-each-rule-links-one-child-inbound-the-dest-to-optional-snialpnpathdestxver-match-criteria-when-dest-is-empty-the-child-inbounds-listenport-is-used'
  106. - depth: 2
  107. title: Replace the entire fallback list for a master inbound. Body is JSON.
  108. Triggers an Xray restart.
  109. url: '#replace-the-entire-fallback-list-for-a-master-inbound-body-is-json-triggers-an-xray-restart'
  110. structuredData:
  111. headings:
  112. - content: List every inbound owned by the authenticated user, including each
  113. inbound’s clientStats traffic counters. settings, streamSettings, and
  114. sniffing are returned as nested JSON objects (no escaped strings);
  115. legacy callers that send them back as JSON-encoded strings are still
  116. accepted on write.
  117. id: list-every-inbound-owned-by-the-authenticated-user-including-each-inbounds-clientstats-traffic-counters-settings-streamsettings-and-sniffing-are-returned-as-nested-json-objects-no-escaped-strings-legacy-callers-that-send-them-back-as-json-encoded-strings-are-still-accepted-on-write
  118. - content: Same shape as /list but with settings.clients[] stripped down to
  119. {email, enable, comment} and ClientStats not enriched with UUID/SubId.
  120. Use this for list pages; fetch /get/:id when you need the full
  121. per-client payload (uuid, password, flow, ...).
  122. id: same-shape-as-list-but-with-settingsclients-stripped-down-to-email-enable-comment-and-clientstats-not-enriched-with-uuidsubid-use-this-for-list-pages-fetch-getid-when-you-need-the-full-per-client-payload-uuid-password-flow-
  123. - content: Lightweight picker projection of the authenticated user’s inbounds.
  124. Returns id, remark, tag, protocol, port, a server-computed
  125. tlsFlowCapable flag (true for VLESS on TCP with tls or reality, or on
  126. XHTTP with VLESS encryption / vlessenc enabled), and ssMethod (the
  127. Shadowsocks cipher, empty for non-Shadowsocks inbounds — used by the
  128. client UI to generate a valid Shadowsocks 2022 PSK). Use this for
  129. dropdowns and attach pickers — it skips settings, streamSettings, and
  130. clientStats so the payload stays small even on panels with thousands
  131. of clients.
  132. id: lightweight-picker-projection-of-the-authenticated-users-inbounds-returns-id-remark-tag-protocol-port-a-server-computed-tlsflowcapable-flag-true-for-vless-on-tcp-with-tls-or-reality-or-on-xhttp-with-vless-encryption--vlessenc-enabled-and-ssmethod-the-shadowsocks-cipher-empty-for-non-shadowsocks-inbounds--used-by-the-client-ui-to-generate-a-valid-shadowsocks-2022-psk-use-this-for-dropdowns-and-attach-pickers--it-skips-settings-streamsettings-and-clientstats-so-the-payload-stays-small-even-on-panels-with-thousands-of-clients
  133. - content: Return every protocol URL (vless://, vmess://, trojan://, ss://,
  134. hysteria://, mtproto) across all inbounds and all of their clients.
  135. Links are rendered through the subscription engine, so the configured
  136. remark template (name-only display part) is applied per client — the
  137. same output the client info/QR pages use. Protocols without a URL form
  138. (socks, http, mixed, wireguard, dokodemo, tunnel) contribute nothing.
  139. Used by the panel’s "Export all inbound links" action.
  140. id: return-every-protocol-url-vless-vmess-trojan-ss-hysteria-mtproto-across-all-inbounds-and-all-of-their-clients-links-are-rendered-through-the-subscription-engine-so-the-configured-remark-template-name-only-display-part-is-applied-per-client--the-same-output-the-client-infoqr-pages-use-protocols-without-a-url-form-socks-http-mixed-wireguard-dokodemo-tunnel-contribute-nothing-used-by-the-panels-export-all-inbound-links-action
  141. - content: Fetch a single inbound by numeric ID.
  142. id: fetch-a-single-inbound-by-numeric-id
  143. - content: Create a new inbound. Send the full inbound payload (protocol, port,
  144. settings, streamSettings, sniffing, remark, expiryTime, total,
  145. enable). settings, streamSettings, and sniffing may be sent as nested
  146. JSON objects (preferred) or as JSON-encoded strings (legacy).
  147. id: create-a-new-inbound-send-the-full-inbound-payload-protocol-port-settings-streamsettings-sniffing-remark-expirytime-total-enable-settings-streamsettings-and-sniffing-may-be-sent-as-nested-json-objects-preferred-or-as-json-encoded-strings-legacy
  148. - content: Delete an inbound by ID. Also removes its associated client stats rows.
  149. id: delete-an-inbound-by-id-also-removes-its-associated-client-stats-rows
  150. - content: Delete many inbounds in one call. Processes the list sequentially;
  151. failures are reported per id and the rest still proceed. Restarts xray
  152. at most once.
  153. id: delete-many-inbounds-in-one-call-processes-the-list-sequentially-failures-are-reported-per-id-and-the-rest-still-proceed-restarts-xray-at-most-once
  154. - content: Replace an inbound’s configuration. Body shape mirrors /add. Heavy on
  155. inbounds with thousands of clients — prefer /setEnable for enable-only
  156. flips.
  157. id: replace-an-inbounds-configuration-body-shape-mirrors-add-heavy-on-inbounds-with-thousands-of-clients--prefer-setenable-for-enable-only-flips
  158. - content: Toggle only the enable flag without serialising the whole settings
  159. JSON. Recommended for UI switches on large inbounds.
  160. id: toggle-only-the-enable-flag-without-serialising-the-whole-settings-json-recommended-for-ui-switches-on-large-inbounds
  161. - content: Set only the subscription sort order. Reads the stored inbound, so a
  162. reorder cannot carry a stale client list over a concurrent edit.
  163. id: set-only-the-subscription-sort-order-reads-the-stored-inbound-so-a-reorder-cannot-carry-a-stale-client-list-over-a-concurrent-edit
  164. - content: Zero out upload + download counters for a single inbound. Does not
  165. touch per-client counters.
  166. id: zero-out-upload--download-counters-for-a-single-inbound-does-not-touch-per-client-counters
  167. - content: Remove every client attached to a single inbound while keeping the
  168. inbound itself. Collects emails from settings.clients[] and feeds them
  169. into the optimized bulk-delete path (runtime user removal +
  170. traffic-row cleanup + SyncInbound). Destructive and cannot be undone.
  171. id: remove-every-client-attached-to-a-single-inbound-while-keeping-the-inbound-itself-collects-emails-from-settingsclients-and-feeds-them-into-the-optimized-bulk-delete-path-runtime-user-removal--traffic-row-cleanup--syncinbound-destructive-and-cannot-be-undone
  172. - content: Reset upload + download counters on every inbound. Destructive —
  173. accounting history is lost.
  174. id: reset-upload--download-counters-on-every-inbound-destructive--accounting-history-is-lost
  175. - content: Bulk-import an inbound from a JSON blob (e.g. one exported via the UI).
  176. The body uses form encoding with a single "data" field.
  177. id: bulk-import-an-inbound-from-a-json-blob-eg-one-exported-via-the-ui-the-body-uses-form-encoding-with-a-single-data-field
  178. - content: Receive a master panel's aggregated per-client usage, keyed by the
  179. master's GUID. Stored in a side table used only for the UI display
  180. overlay and local quota enforcement — never folded into the local
  181. counters that masters poll, so delta accounting stays intact. Called
  182. panel-to-panel by the node traffic sync job.
  183. id: receive-a-master-panels-aggregated-per-client-usage-keyed-by-the-masters-guid-stored-in-a-side-table-used-only-for-the-ui-display-overlay-and-local-quota-enforcement--never-folded-into-the-local-counters-that-masters-poll-so-delta-accounting-stays-intact-called-panel-to-panel-by-the-node-traffic-sync-job
  184. - content: List the fallback rules attached to a master VLESS/Trojan TCP-TLS
  185. inbound. Each rule links one child inbound (the dest) to optional
  186. SNI/ALPN/path/dest/xver match criteria. When dest is empty the child
  187. inbound's listen+port is used.
  188. id: list-the-fallback-rules-attached-to-a-master-vlesstrojan-tcp-tls-inbound-each-rule-links-one-child-inbound-the-dest-to-optional-snialpnpathdestxver-match-criteria-when-dest-is-empty-the-child-inbounds-listenport-is-used
  189. - content: Replace the entire fallback list for a master inbound. Body is JSON.
  190. Triggers an Xray restart.
  191. id: replace-the-entire-fallback-list-for-a-master-inbound-body-is-json-triggers-an-xray-restart
  192. contents: []
  193. ---
  194. {/* This file was generated by Fumadocs. Do not edit this file directly. Any changes should be made by running the generation command again. */}
  195. export default function Layout(props) {
  196. const { APIPage, OpenAPIPage } = props.components ?? {};
  197. // "APIPage" is the old name from v10, this allows both for backward compatibility
  198. const Comp = OpenAPIPage ?? APIPage;
  199. return (
  200. <>
  201. {props.children}
  202. <Comp document="./public/openapi.json" webhooks={[]} operations={[{"path":"/panel/api/inbounds/list","method":"get"},{"path":"/panel/api/inbounds/list/slim","method":"get"},{"path":"/panel/api/inbounds/options","method":"get"},{"path":"/panel/api/inbounds/allLinks","method":"get"},{"path":"/panel/api/inbounds/get/{id}","method":"get"},{"path":"/panel/api/inbounds/add","method":"post"},{"path":"/panel/api/inbounds/del/{id}","method":"post"},{"path":"/panel/api/inbounds/bulkDel","method":"post"},{"path":"/panel/api/inbounds/update/{id}","method":"post"},{"path":"/panel/api/inbounds/setEnable/{id}","method":"post"},{"path":"/panel/api/inbounds/{id}/subSortIndex","method":"post"},{"path":"/panel/api/inbounds/{id}/resetTraffic","method":"post"},{"path":"/panel/api/inbounds/{id}/delAllClients","method":"post"},{"path":"/panel/api/inbounds/resetAllTraffics","method":"post"},{"path":"/panel/api/inbounds/import","method":"post"},{"path":"/panel/api/inbounds/pushClientTraffics","method":"post"},{"path":"/panel/api/inbounds/{id}/fallbacks","method":"get"},{"path":"/panel/api/inbounds/{id}/fallbacks","method":"post"}]} showTitle />
  203. </>
  204. );
  205. }