setting.ts 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. import { ObjectUtil } from '@/utils';
  2. export class AllSetting {
  3. webListen = '';
  4. webDomain = '';
  5. webPort = 2053;
  6. webCertFile = '';
  7. webKeyFile = '';
  8. webBasePath = '/';
  9. sessionMaxAge = 360;
  10. trustedProxyCIDRs = '127.0.0.1/32,::1/128';
  11. panelProxy = '';
  12. pageSize = 25;
  13. expireDiff = 0;
  14. trafficDiff = 0;
  15. remarkModel = '-io';
  16. datepicker: 'gregorian' | 'jalalian' = 'gregorian';
  17. tgBotEnable = false;
  18. tgBotToken = '';
  19. tgBotProxy = '';
  20. tgBotAPIServer = '';
  21. tgBotChatId = '';
  22. tgRunTime = '@daily';
  23. tgBotBackup = false;
  24. tgBotLoginNotify = true;
  25. tgCpu = 80;
  26. tgLang = 'en-US';
  27. twoFactorEnable = false;
  28. twoFactorToken = '';
  29. xrayTemplateConfig = '';
  30. subEnable = true;
  31. subJsonEnable = false;
  32. subTitle = '';
  33. subSupportUrl = '';
  34. subProfileUrl = '';
  35. subAnnounce = '';
  36. subEnableRouting = true;
  37. subRoutingRules = '';
  38. subListen = '';
  39. subPort = 2096;
  40. subPath = '/sub/';
  41. subJsonPath = '/json/';
  42. subClashEnable = false;
  43. subClashPath = '/clash/';
  44. subDomain = '';
  45. externalTrafficInformEnable = false;
  46. externalTrafficInformURI = '';
  47. restartXrayOnClientDisable = true;
  48. subCertFile = '';
  49. subKeyFile = '';
  50. subUpdates = 12;
  51. subEncrypt = true;
  52. subShowInfo = true;
  53. subEmailInRemark = true;
  54. subURI = '';
  55. subJsonURI = '';
  56. subClashURI = '';
  57. subJsonFragment = '';
  58. subJsonNoises = '';
  59. subJsonMux = '';
  60. subJsonRules = '';
  61. timeLocation = 'Local';
  62. ldapEnable = false;
  63. ldapHost = '';
  64. ldapPort = 389;
  65. ldapUseTLS = false;
  66. ldapBindDN = '';
  67. ldapPassword = '';
  68. ldapBaseDN = '';
  69. ldapUserFilter = '(objectClass=person)';
  70. ldapUserAttr = 'mail';
  71. ldapVlessField = 'vless_enabled';
  72. ldapSyncCron = '@every 1m';
  73. ldapFlagField = '';
  74. ldapTruthyValues = 'true,1,yes,on';
  75. ldapInvertFlag = false;
  76. ldapInboundTags = '';
  77. ldapAutoCreate = false;
  78. ldapAutoDelete = false;
  79. ldapDefaultTotalGB = 0;
  80. ldapDefaultExpiryDays = 0;
  81. ldapDefaultLimitIP = 0;
  82. hasTgBotToken = false;
  83. hasTwoFactorToken = false;
  84. hasLdapPassword = false;
  85. hasApiToken = false;
  86. hasWarpSecret = false;
  87. hasNordSecret = false;
  88. constructor(data?: unknown) {
  89. if (data != null) {
  90. ObjectUtil.cloneProps(this, data);
  91. }
  92. }
  93. equals(other: AllSetting): boolean {
  94. return ObjectUtil.equals(this, other);
  95. }
  96. }