setting.js 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  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.subCertFile = "";
  46. this.subKeyFile = "";
  47. this.subUpdates = 12;
  48. this.subEncrypt = true;
  49. this.subShowInfo = true;
  50. this.subURI = "";
  51. this.subJsonURI = "";
  52. this.subClashURI = "";
  53. this.subJsonFragment = "";
  54. this.subJsonNoises = "";
  55. this.subJsonMux = "";
  56. this.subJsonRules = "";
  57. this.timeLocation = "Local";
  58. // LDAP settings
  59. this.ldapEnable = false;
  60. this.ldapHost = "";
  61. this.ldapPort = 389;
  62. this.ldapUseTLS = false;
  63. this.ldapBindDN = "";
  64. this.ldapPassword = "";
  65. this.ldapBaseDN = "";
  66. this.ldapUserFilter = "(objectClass=person)";
  67. this.ldapUserAttr = "mail";
  68. this.ldapVlessField = "vless_enabled";
  69. this.ldapSyncCron = "@every 1m";
  70. this.ldapFlagField = "";
  71. this.ldapTruthyValues = "true,1,yes,on";
  72. this.ldapInvertFlag = false;
  73. this.ldapInboundTags = "";
  74. this.ldapAutoCreate = false;
  75. this.ldapAutoDelete = false;
  76. this.ldapDefaultTotalGB = 0;
  77. this.ldapDefaultExpiryDays = 0;
  78. this.ldapDefaultLimitIP = 0;
  79. if (data == null) {
  80. return
  81. }
  82. ObjectUtil.cloneProps(this, data);
  83. }
  84. equals(other) {
  85. return ObjectUtil.equals(this, other);
  86. }
  87. }