setting.ts 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  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 = false;
  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. subClashEnableRouting = false;
  58. subClashRules = '';
  59. subJsonMux = '';
  60. subJsonRules = '';
  61. subJsonFinalMask = '';
  62. subThemeDir = '';
  63. timeLocation = 'Local';
  64. ldapEnable = false;
  65. ldapHost = '';
  66. ldapPort = 389;
  67. ldapUseTLS = false;
  68. ldapBindDN = '';
  69. ldapPassword = '';
  70. ldapBaseDN = '';
  71. ldapUserFilter = '(objectClass=person)';
  72. ldapUserAttr = 'mail';
  73. ldapVlessField = 'vless_enabled';
  74. ldapSyncCron = '@every 1m';
  75. ldapFlagField = '';
  76. ldapTruthyValues = 'true,1,yes,on';
  77. ldapInvertFlag = false;
  78. ldapInboundTags = '';
  79. ldapAutoCreate = false;
  80. ldapAutoDelete = false;
  81. ldapDefaultTotalGB = 0;
  82. ldapDefaultExpiryDays = 0;
  83. ldapDefaultLimitIP = 0;
  84. hasTgBotToken = false;
  85. hasTwoFactorToken = false;
  86. hasLdapPassword = false;
  87. hasApiToken = false;
  88. hasWarpSecret = false;
  89. hasNordSecret = false;
  90. constructor(data?: unknown) {
  91. if (data != null) {
  92. ObjectUtil.cloneProps(this, data);
  93. }
  94. }
  95. equals(other: AllSetting): boolean {
  96. return ObjectUtil.equals(this, other);
  97. }
  98. }