types.ts 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985
  1. // Code generated by tools/openapigen. DO NOT EDIT.
  2. export type GeoKind = string;
  3. export type OnlineAPISupport = number;
  4. export type ProcessState = string;
  5. export type Protocol = string;
  6. export type staticEgressResolver = string;
  7. export type trafficLocalApplyAction = number;
  8. export type transportBits = number;
  9. export interface AllSetting {
  10. datepicker: string;
  11. discordAdminIds: string;
  12. discordBotBackup: boolean;
  13. discordBotEnable: boolean;
  14. discordBotToken: string;
  15. discordChannelId: string;
  16. discordCpu: number;
  17. discordEnabledEvents: string;
  18. discordLang: string;
  19. discordMemory: number;
  20. discordRunTime: string;
  21. expireDiff: number;
  22. externalTrafficInformEnable: boolean;
  23. externalTrafficInformURI: string;
  24. happLinkEnable: boolean;
  25. ipLimitAllowlist: string;
  26. ldapAutoCreate: boolean;
  27. ldapAutoDelete: boolean;
  28. ldapBaseDN: string;
  29. ldapBindDN: string;
  30. ldapDefaultExpiryDays: number;
  31. ldapDefaultLimitIP: number;
  32. ldapDefaultTotalGB: number;
  33. ldapEnable: boolean;
  34. ldapFlagField: string;
  35. ldapHost: string;
  36. ldapInboundTags: string;
  37. ldapInsecureSkipVerify: boolean;
  38. ldapInvertFlag: boolean;
  39. ldapPassword: string;
  40. ldapPort: number;
  41. ldapSyncCron: string;
  42. ldapTruthyValues: string;
  43. ldapUseTLS: boolean;
  44. ldapUserAttr: string;
  45. ldapUserFilter: string;
  46. ldapVlessField: string;
  47. outboundDownThreshold: number;
  48. pageSize: number;
  49. panelOutbound: string;
  50. realityScanCandidates: string;
  51. remarkTemplate: string;
  52. restartXrayOnClientDisable: boolean;
  53. sessionMaxAge: number;
  54. smtpCpu: number;
  55. smtpEnable: boolean;
  56. smtpEnabledEvents: string;
  57. smtpEncryptionType: string;
  58. smtpFrom: string;
  59. smtpFromName: string;
  60. smtpHost: string;
  61. smtpMemory: number;
  62. smtpPassword: string;
  63. smtpPort: number;
  64. smtpTo: string;
  65. smtpUsername: string;
  66. subAnnounce: string;
  67. subCalendarExpireInclusive: boolean;
  68. subCertFile: string;
  69. subClashAutoDetect: boolean;
  70. subClashEnable: boolean;
  71. subClashEnableRouting: boolean;
  72. subClashPath: string;
  73. subClashRules: string;
  74. subClashURI: string;
  75. subClashUserAgentRegex: string;
  76. subDomain: string;
  77. subEnable: boolean;
  78. subEnableRouting: boolean;
  79. subEncrypt: boolean;
  80. subExpiredTemplate: string;
  81. subHappAlwaysHwid: boolean;
  82. subHappAutoConnect: boolean;
  83. subHappAutoConnectType: string;
  84. subHappAutoDetect: boolean;
  85. subHappColorProfile: string;
  86. subHappExcludeApns: boolean;
  87. subHappExcludeRoutes: string;
  88. subHappFallbackUrl: string;
  89. subHappNewUrl: string;
  90. subHappNoLimit: boolean;
  91. subHappNotificationExpire: boolean;
  92. subHappPerAppList: string;
  93. subHappPerAppMode: string;
  94. subHappPingType: string;
  95. subHappProviderId: string;
  96. subHappSubExpire: boolean;
  97. subHappSubExpireButtonLink: string;
  98. subHappSubInfoButtonLink: string;
  99. subHappSubInfoButtonText: string;
  100. subHappSubInfoColor: string;
  101. subHappSubInfoText: string;
  102. subHappTunMode: string;
  103. subHappTunType: string;
  104. subHideSettings: boolean;
  105. subIncyEnableRouting: boolean;
  106. subIncyRoutingRules: string;
  107. subInfoNodeEnable: boolean;
  108. subJsonAlwaysArray: boolean;
  109. subJsonAutoDetect: boolean;
  110. subJsonDns: string;
  111. subJsonEnable: boolean;
  112. subJsonFinalMask: string;
  113. subJsonMux: string;
  114. subJsonObservatory: string;
  115. subJsonPath: string;
  116. subJsonRoutingRules: string;
  117. subJsonRules: string;
  118. subJsonURI: string;
  119. subJsonUserAgentRegex: string;
  120. subKeyFile: string;
  121. subListen: string;
  122. subPath: string;
  123. subPort: number;
  124. subProfileMode: string;
  125. subProfileUrl: string;
  126. subRoutingRules: string;
  127. subShowIdentityOnAllLinks: boolean;
  128. subSupportUrl: string;
  129. subThemeDir: string;
  130. subTitle: string;
  131. subTrafficDepletedTemplate: string;
  132. subURI: string;
  133. subUpdates: number;
  134. tgBotAPIServer: string;
  135. tgBotBackup: boolean;
  136. tgBotChatId: string;
  137. tgBotEnable: boolean;
  138. tgBotProxy: string;
  139. tgBotToken: string;
  140. tgCpu: number;
  141. tgEnabledEvents: string;
  142. tgLang: string;
  143. tgMemory: number;
  144. tgRunTime: string;
  145. timeLocation: string;
  146. trafficDiff: number;
  147. trustedProxyCIDRs: string;
  148. twoFactorEnable: boolean;
  149. twoFactorToken: string;
  150. warpUpdateInterval: number;
  151. webBasePath: string;
  152. webCertFile: string;
  153. webDomain: string;
  154. webKeyFile: string;
  155. webListen: string;
  156. webPort: number;
  157. }
  158. export interface AllSettingView {
  159. datepicker: string;
  160. discordAdminIds: string;
  161. discordBotBackup: boolean;
  162. discordBotEnable: boolean;
  163. discordBotToken: string;
  164. discordChannelId: string;
  165. discordCpu: number;
  166. discordEnabledEvents: string;
  167. discordLang: string;
  168. discordMemory: number;
  169. discordRunTime: string;
  170. expireDiff: number;
  171. externalTrafficInformEnable: boolean;
  172. externalTrafficInformURI: string;
  173. happLinkEnable: boolean;
  174. hasApiToken: boolean;
  175. hasDiscordBotToken: boolean;
  176. hasLdapPassword: boolean;
  177. hasNordSecret: boolean;
  178. hasSmtpPassword: boolean;
  179. hasTgBotToken: boolean;
  180. hasTwoFactorToken: boolean;
  181. hasWarpSecret: boolean;
  182. ipLimitAllowlist: string;
  183. ldapAutoCreate: boolean;
  184. ldapAutoDelete: boolean;
  185. ldapBaseDN: string;
  186. ldapBindDN: string;
  187. ldapDefaultExpiryDays: number;
  188. ldapDefaultLimitIP: number;
  189. ldapDefaultTotalGB: number;
  190. ldapEnable: boolean;
  191. ldapFlagField: string;
  192. ldapHost: string;
  193. ldapInboundTags: string;
  194. ldapInsecureSkipVerify: boolean;
  195. ldapInvertFlag: boolean;
  196. ldapPassword: string;
  197. ldapPort: number;
  198. ldapSyncCron: string;
  199. ldapTruthyValues: string;
  200. ldapUseTLS: boolean;
  201. ldapUserAttr: string;
  202. ldapUserFilter: string;
  203. ldapVlessField: string;
  204. outboundDownThreshold: number;
  205. pageSize: number;
  206. panelOutbound: string;
  207. realityScanCandidates: string;
  208. remarkTemplate: string;
  209. restartXrayOnClientDisable: boolean;
  210. sessionMaxAge: number;
  211. smtpCpu: number;
  212. smtpEnable: boolean;
  213. smtpEnabledEvents: string;
  214. smtpEncryptionType: string;
  215. smtpFrom: string;
  216. smtpFromName: string;
  217. smtpHost: string;
  218. smtpMemory: number;
  219. smtpPassword: string;
  220. smtpPort: number;
  221. smtpTo: string;
  222. smtpUsername: string;
  223. subAnnounce: string;
  224. subCalendarExpireInclusive: boolean;
  225. subCertFile: string;
  226. subClashAutoDetect: boolean;
  227. subClashEnable: boolean;
  228. subClashEnableRouting: boolean;
  229. subClashPath: string;
  230. subClashRules: string;
  231. subClashURI: string;
  232. subClashUserAgentRegex: string;
  233. subDomain: string;
  234. subEnable: boolean;
  235. subEnableRouting: boolean;
  236. subEncrypt: boolean;
  237. subExpiredTemplate: string;
  238. subHappAlwaysHwid: boolean;
  239. subHappAutoConnect: boolean;
  240. subHappAutoConnectType: string;
  241. subHappAutoDetect: boolean;
  242. subHappColorProfile: string;
  243. subHappExcludeApns: boolean;
  244. subHappExcludeRoutes: string;
  245. subHappFallbackUrl: string;
  246. subHappNewUrl: string;
  247. subHappNoLimit: boolean;
  248. subHappNotificationExpire: boolean;
  249. subHappPerAppList: string;
  250. subHappPerAppMode: string;
  251. subHappPingType: string;
  252. subHappProviderId: string;
  253. subHappSubExpire: boolean;
  254. subHappSubExpireButtonLink: string;
  255. subHappSubInfoButtonLink: string;
  256. subHappSubInfoButtonText: string;
  257. subHappSubInfoColor: string;
  258. subHappSubInfoText: string;
  259. subHappTunMode: string;
  260. subHappTunType: string;
  261. subHideSettings: boolean;
  262. subIncyEnableRouting: boolean;
  263. subIncyRoutingRules: string;
  264. subInfoNodeEnable: boolean;
  265. subJsonAlwaysArray: boolean;
  266. subJsonAutoDetect: boolean;
  267. subJsonDns: string;
  268. subJsonEnable: boolean;
  269. subJsonFinalMask: string;
  270. subJsonMux: string;
  271. subJsonObservatory: string;
  272. subJsonPath: string;
  273. subJsonRoutingRules: string;
  274. subJsonRules: string;
  275. subJsonURI: string;
  276. subJsonUserAgentRegex: string;
  277. subKeyFile: string;
  278. subListen: string;
  279. subPath: string;
  280. subPort: number;
  281. subProfileMode: string;
  282. subProfileUrl: string;
  283. subRoutingRules: string;
  284. subShowIdentityOnAllLinks: boolean;
  285. subSupportUrl: string;
  286. subThemeDir: string;
  287. subTitle: string;
  288. subTrafficDepletedTemplate: string;
  289. subURI: string;
  290. subUpdates: number;
  291. tgBotAPIServer: string;
  292. tgBotBackup: boolean;
  293. tgBotChatId: string;
  294. tgBotEnable: boolean;
  295. tgBotProxy: string;
  296. tgBotToken: string;
  297. tgCpu: number;
  298. tgEnabledEvents: string;
  299. tgLang: string;
  300. tgMemory: number;
  301. tgRunTime: string;
  302. timeLocation: string;
  303. trafficDiff: number;
  304. trustedProxyCIDRs: string;
  305. twoFactorEnable: boolean;
  306. twoFactorToken: string;
  307. warpUpdateInterval: number;
  308. webBasePath: string;
  309. webCertFile: string;
  310. webDomain: string;
  311. webKeyFile: string;
  312. webListen: string;
  313. webPort: number;
  314. }
  315. export interface AmneziaWGLogs {
  316. events: string[];
  317. peers: PeerActivity[];
  318. running: boolean;
  319. }
  320. export interface ApiToken {
  321. createdAt: number;
  322. enabled: boolean;
  323. expiresAt: number;
  324. id: number;
  325. name: string;
  326. scope: string;
  327. token: string;
  328. }
  329. export interface ApiTokenView {
  330. createdAt: number;
  331. enabled: boolean;
  332. expiresAt: number;
  333. id: number;
  334. name: string;
  335. scope: string;
  336. token?: string;
  337. }
  338. export interface Client {
  339. adTag?: string;
  340. allowedIPs?: string[];
  341. allowedIPsByInbound?: Record<number, string[]>;
  342. auth?: string;
  343. comment: string;
  344. created_at?: number;
  345. email: string;
  346. enable: boolean;
  347. expiryTime: number;
  348. flow?: string;
  349. forwardedPorts?: string;
  350. group?: string;
  351. id?: string;
  352. keepAlive?: number | null;
  353. limitIp: number;
  354. password?: string;
  355. preSharedKey?: string;
  356. privateKey?: string;
  357. publicKey?: string;
  358. reset: number;
  359. resetDay: number;
  360. resetMax: number;
  361. reverse?: ClientReverse | null;
  362. secret?: string;
  363. security: string;
  364. subId: string;
  365. tgId: number;
  366. totalGB: number;
  367. trafficReset?: string;
  368. trafficResetDay?: number;
  369. updated_at?: number;
  370. }
  371. export interface ClientInbound {
  372. clientId: number;
  373. createdAt: number;
  374. flowOverride: string;
  375. inboundId: number;
  376. }
  377. export interface ClientPageResponse {
  378. filtered: number;
  379. groups: string[];
  380. items: ClientSlim[];
  381. page: number;
  382. pageSize: number;
  383. summary: ClientsSummary;
  384. total: number;
  385. }
  386. export interface ClientRecord {
  387. adTag: string;
  388. allowedIPs: string;
  389. auth: string;
  390. comment: string;
  391. createdAt: number;
  392. email: string;
  393. enable: boolean;
  394. expiryTime: number;
  395. flow: string;
  396. forwardedPorts: string;
  397. group: string;
  398. id: number;
  399. keepAlive: number;
  400. limitHwid: number;
  401. limitIp: number;
  402. password: string;
  403. preSharedKey: string;
  404. privateKey: string;
  405. publicKey: string;
  406. reset: number;
  407. resetDay: number;
  408. resetMax: number;
  409. reverse: unknown;
  410. secret: string;
  411. security: string;
  412. subId: string;
  413. tgId: number;
  414. totalGB: number;
  415. trafficReset: string;
  416. trafficResetDay: number;
  417. updatedAt: number;
  418. uuid: string;
  419. }
  420. export interface ClientReverse {
  421. tag: string;
  422. }
  423. export interface ClientSlim {
  424. comment?: string;
  425. createdAt: number;
  426. email: string;
  427. enable: boolean;
  428. expiryTime: number;
  429. group?: string;
  430. inboundIds: number[];
  431. limitHwid: number;
  432. limitIp: number;
  433. reset: number;
  434. resetDay: number;
  435. resetMax: number;
  436. subId: string;
  437. totalGB: number;
  438. traffic?: ClientTraffic | null;
  439. updatedAt: number;
  440. }
  441. export interface ClientTraffic {
  442. down: number;
  443. email: string;
  444. enable: boolean;
  445. expiryTime: number;
  446. id: number;
  447. inboundId: number;
  448. lastOnline: number;
  449. lastSubFetch: number;
  450. reset: number;
  451. resetCount: number;
  452. resetDay: number;
  453. resetMax: number;
  454. subId: string;
  455. total: number;
  456. up: number;
  457. uuid: string;
  458. }
  459. export interface ClientsSummary {
  460. active: number;
  461. deactive: string[];
  462. deactiveCount: number;
  463. depleted: string[];
  464. depletedCount: number;
  465. expiring: string[];
  466. expiringCount: number;
  467. online: string[];
  468. onlineCount: number;
  469. total: number;
  470. }
  471. export interface FallbackParentInfo {
  472. masterId: number;
  473. path?: string;
  474. }
  475. export interface GeoCategory {
  476. attributes: string[];
  477. code: string;
  478. entries: number;
  479. }
  480. export interface GeoCategoryPage {
  481. items: GeoCategory[];
  482. total: number;
  483. }
  484. export interface GeoEntry {
  485. kind: string;
  486. value: string;
  487. }
  488. export interface GeoEntryPage {
  489. items: GeoEntry[];
  490. total: number;
  491. }
  492. export interface GeoFile {
  493. categories: number;
  494. error?: string;
  495. kind: GeoKind;
  496. modifiedAt: number;
  497. name: string;
  498. size: number;
  499. }
  500. export interface GeodataTokenIssue {
  501. code?: string;
  502. file?: string;
  503. reason: string;
  504. token: string;
  505. }
  506. export interface HappLinkResult {
  507. encryptedLink: string;
  508. }
  509. export interface HistoryOfSeeders {
  510. id: number;
  511. seederName: string;
  512. }
  513. export interface Host {
  514. address: string;
  515. allowInsecure: boolean;
  516. alpn: string[];
  517. createdAt: number;
  518. echConfigList: string;
  519. excludeFromSubTypes: string[];
  520. finalMask: string;
  521. fingerprint: string;
  522. groupId: string;
  523. hostHeader: string;
  524. id: number;
  525. inboundId: number;
  526. isDisabled: boolean;
  527. isHidden: boolean;
  528. keepSniBlank: boolean;
  529. mihomoIpVersion: string;
  530. mihomoX25519: boolean;
  531. muxParams: unknown;
  532. nodeGuids?: string[];
  533. overrideSniFromAddress: boolean;
  534. path: string;
  535. pinnedPeerCertSha256: string[];
  536. port: number;
  537. remark: string;
  538. security: string;
  539. serverDescription: string;
  540. shuffleHost: boolean;
  541. sni: string;
  542. sockoptParams: unknown;
  543. sortOrder: number;
  544. tags: string[];
  545. updatedAt: number;
  546. verifyPeerCertByName: string;
  547. vlessRoute: string;
  548. }
  549. export interface HostGroup {
  550. allowInsecure: boolean;
  551. alpn: string[];
  552. echConfigList: string;
  553. excludeFromSubTypes: string[];
  554. finalMask: string;
  555. fingerprint: string;
  556. groupId: string;
  557. hostHeader: string;
  558. hosts: string[];
  559. inboundIds: number[];
  560. isDisabled: boolean;
  561. isHidden: boolean;
  562. keepSniBlank: boolean;
  563. mihomoIpVersion: string;
  564. mihomoX25519: boolean;
  565. muxParams: string;
  566. nodeGuids: string[];
  567. overrideSniFromAddress: boolean;
  568. path: string;
  569. pinnedPeerCertSha256: string[];
  570. port: number;
  571. remark: string;
  572. security: string;
  573. serverDescription: string;
  574. shuffleHost: boolean;
  575. sni: string;
  576. sockoptParams: string;
  577. sortOrder: number;
  578. tags: string[];
  579. verifyPeerCertByName: string;
  580. vlessRoute: string;
  581. }
  582. export interface HwidSlotStatus {
  583. active: boolean;
  584. full: boolean;
  585. limit: number;
  586. registered: number;
  587. remaining: number;
  588. }
  589. export interface Inbound {
  590. clientStats: ClientTraffic[];
  591. disableFlow: boolean;
  592. down: number;
  593. enable: boolean;
  594. expiryTime: number;
  595. fallbackParent?: FallbackParentInfo | null;
  596. id: number;
  597. lastTrafficResetTime: number;
  598. listen: string;
  599. nodeId?: number | null;
  600. originNodeGuid?: string;
  601. port: number;
  602. protocol: Protocol;
  603. remark: string;
  604. settings: unknown;
  605. shareAddr: string;
  606. shareAddrStrategy: string;
  607. sniffing: unknown;
  608. streamSettings: unknown;
  609. subSortIndex: number;
  610. tag: string;
  611. total: number;
  612. trafficReset: string;
  613. trafficResetDay: number;
  614. up: number;
  615. }
  616. export interface InboundClientIps {
  617. clientEmail: string;
  618. id: number;
  619. ips: unknown;
  620. }
  621. export interface InboundFallback {
  622. alpn: string;
  623. childId: number;
  624. dest: string;
  625. id: number;
  626. masterId: number;
  627. name: string;
  628. path: string;
  629. sortOrder: number;
  630. xver: number;
  631. }
  632. export interface InboundOption {
  633. awgServer?: ServerSettings | null;
  634. enable: boolean;
  635. id: number;
  636. listen?: string;
  637. mtprotoDomain?: string;
  638. network?: string;
  639. nodeAddress?: string;
  640. nodeId?: number | null;
  641. port: number;
  642. protocol: string;
  643. remark: string;
  644. security?: string;
  645. shareAddr?: string;
  646. shareAddrStrategy?: string;
  647. ssMethod: string;
  648. tag: string;
  649. tlsFlowCapable: boolean;
  650. tuicServer?: TuicServerSettings | null;
  651. wgDns?: string;
  652. wgMtu?: number;
  653. wgPublicKey?: string;
  654. }
  655. export interface InboundTrafficSummary {
  656. down: number;
  657. enable: boolean;
  658. id: number;
  659. total: number;
  660. up: number;
  661. }
  662. export interface LogEntry {
  663. DateTime: string;
  664. Email: string;
  665. Event: number;
  666. FromAddress: string;
  667. Inbound: string;
  668. Outbound: string;
  669. ToAddress: string;
  670. }
  671. export interface MLDSA65Response {
  672. seed: string;
  673. verify: string;
  674. }
  675. export interface MLKEM768Response {
  676. client: string;
  677. seed: string;
  678. }
  679. export interface Msg {
  680. msg: string;
  681. obj: unknown;
  682. success: boolean;
  683. }
  684. export interface NewUUIDResponse {
  685. uuid: string;
  686. }
  687. export interface Node {
  688. activeCount: number;
  689. address: string;
  690. allowPrivateAddress: boolean;
  691. basePath: string;
  692. clientCount: number;
  693. configDirty: boolean;
  694. configDirtyAt: number;
  695. cpuPct: number;
  696. createdAt: number;
  697. depletedCount: number;
  698. disabledCount: number;
  699. enable: boolean;
  700. guid: string;
  701. id: number;
  702. inboundCount: number;
  703. inboundSyncMode: string;
  704. inboundTags: string[];
  705. lastError: string;
  706. lastHeartbeat: number;
  707. latencyMs: number;
  708. memPct: number;
  709. name: string;
  710. netDown: number;
  711. netUp: number;
  712. onlineCount: number;
  713. outboundTag: string;
  714. panelVersion: string;
  715. parentGuid?: string;
  716. pinnedCertSha256: string;
  717. port: number;
  718. remark: string;
  719. scheme: string;
  720. status: string;
  721. tlsVerifyMode: string;
  722. transitive?: boolean;
  723. updatedAt: number;
  724. uptimeSecs: number;
  725. xrayError: string;
  726. xrayState: string;
  727. xrayVersion: string;
  728. }
  729. export interface NodeMutationRequest {
  730. address: string;
  731. allowPrivateAddress: boolean;
  732. apiToken?: string | null;
  733. basePath: string;
  734. clearApiToken?: boolean;
  735. enable: boolean;
  736. id: number;
  737. inboundSyncMode: string;
  738. inboundTags: string[];
  739. name: string;
  740. outboundTag: string;
  741. pinnedCertSha256: string;
  742. port: number;
  743. remark: string;
  744. scheme: string;
  745. tlsVerifyMode: string;
  746. }
  747. export interface NodeView {
  748. activeCount: number;
  749. address: string;
  750. allowPrivateAddress: boolean;
  751. basePath: string;
  752. clientCount: number;
  753. configDirty: boolean;
  754. configDirtyAt: number;
  755. cpuPct: number;
  756. createdAt: number;
  757. depletedCount: number;
  758. disabledCount: number;
  759. enable: boolean;
  760. guid: string;
  761. hasApiToken: boolean;
  762. id: number;
  763. inboundCount: number;
  764. inboundSyncMode: string;
  765. inboundTags: string[];
  766. lastError: string;
  767. lastHeartbeat: number;
  768. latencyMs: number;
  769. memPct: number;
  770. name: string;
  771. netDown: number;
  772. netUp: number;
  773. onlineCount: number;
  774. outboundTag: string;
  775. panelVersion: string;
  776. parentGuid?: string;
  777. pinnedCertSha256: string;
  778. port: number;
  779. remark: string;
  780. scheme: string;
  781. status: string;
  782. tlsVerifyMode: string;
  783. transitive?: boolean;
  784. updatedAt: number;
  785. uptimeSecs: number;
  786. xrayError: string;
  787. xrayState: string;
  788. xrayVersion: string;
  789. }
  790. export interface OutboundTraffics {
  791. down: number;
  792. id: number;
  793. tag: string;
  794. total: number;
  795. up: number;
  796. }
  797. export interface PanelUpdateStatus {
  798. exitCode: number;
  799. finishedAt: number;
  800. runId: string;
  801. state: string;
  802. }
  803. export interface PeerActivity {
  804. allowedIPs: string;
  805. down: number;
  806. email: string;
  807. endpoint: string;
  808. handshake: number;
  809. inboundId: number;
  810. interface: string;
  811. online: boolean;
  812. tag: string;
  813. up: number;
  814. }
  815. export interface ProbeResultUI {
  816. cpuPct: number;
  817. error: string;
  818. latencyMs: number;
  819. memPct: number;
  820. panelVersion: string;
  821. status: string;
  822. uptimeSecs: number;
  823. xrayError: string;
  824. xrayState: string;
  825. xrayVersion: string;
  826. }
  827. export interface RealityScanResult {
  828. alpn: string;
  829. certChainBytes: number;
  830. certChainValid: boolean;
  831. certIssuer: string;
  832. certSubject: string;
  833. certValid: boolean;
  834. curveID: string;
  835. feasible: boolean;
  836. h2: boolean;
  837. host: string;
  838. ip: string;
  839. latencyMs: number;
  840. notAfter: string;
  841. port: number;
  842. privateTarget: boolean;
  843. reason: string;
  844. serverNames: string[];
  845. target: string;
  846. tls13: boolean;
  847. tlsVersion: string;
  848. x25519: boolean;
  849. }
  850. export interface ServerSettings {
  851. contentPaddingAddition?: string;
  852. disableCookies: boolean;
  853. externalInterface?: string;
  854. h1: string;
  855. h2: string;
  856. h3: string;
  857. h4: string;
  858. headerProtectionKey?: string;
  859. i1?: string;
  860. i2?: string;
  861. i3?: string;
  862. i4?: string;
  863. i5?: string;
  864. ipv6Enabled?: boolean;
  865. ipv6ExternalInterface?: string;
  866. ipv6Subnet?: string;
  867. jc: number;
  868. jmax: number;
  869. jmin: number;
  870. keepaliveTimeout?: string;
  871. maxHandshakeAttempts?: string;
  872. mtu?: number;
  873. primaryDns: string;
  874. privateKey: string;
  875. publicKey: string;
  876. randomTrailers: boolean;
  877. rejectAfterTime?: string;
  878. rekeyAfterTime?: string;
  879. rekeyTimeout?: string;
  880. routeThroughXray?: boolean;
  881. s1: number;
  882. s2: number;
  883. s3: number;
  884. s4: number;
  885. secondaryDns: string;
  886. subnetCidr: number;
  887. subnetIp: string;
  888. }
  889. export interface Setting {
  890. id: number;
  891. key: string;
  892. value: string;
  893. }
  894. export interface SubBalancer {
  895. createdAt: number;
  896. enabled: boolean;
  897. id: number;
  898. inboundIds: number[];
  899. memberWeights?: Record<number, number>;
  900. remark: string;
  901. sortOrder: number;
  902. strategy: string;
  903. updatedAt: number;
  904. }
  905. export interface Traffic {
  906. Down: number;
  907. IsInbound: boolean;
  908. IsOutbound: boolean;
  909. Tag: string;
  910. Up: number;
  911. }
  912. export interface TuicClientSettings {
  913. email: string;
  914. password: string;
  915. uuid: string;
  916. }
  917. export interface TuicServerSettings {
  918. alpn: string[];
  919. authentication_timeout: number;
  920. certificate: string;
  921. congestion_control: string;
  922. log_level: string;
  923. max_idle_time: number;
  924. max_udp_relay_packet_size: number;
  925. private_key: string;
  926. sni?: string;
  927. udp_relay_mode: string;
  928. zero_rtt_handshake: boolean;
  929. }
  930. export interface User {
  931. id: number;
  932. password: string;
  933. username: string;
  934. }