setting.ts 2.2 KB

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