setting.js 2.8 KB

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