setting.js 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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 = 60;
  10. this.pageSize = 50;
  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.xrayTemplateConfig = "";
  26. this.secretEnable = false;
  27. this.subEnable = false;
  28. this.subListen = "";
  29. this.subPort = 2096;
  30. this.subPath = "/sub/";
  31. this.subJsonPath = "/json/";
  32. this.subDomain = "";
  33. this.externalTrafficInformEnable = false;
  34. this.externalTrafficInformURI = "";
  35. this.subCertFile = "";
  36. this.subKeyFile = "";
  37. this.subUpdates = 12;
  38. this.subEncrypt = true;
  39. this.subShowInfo = true;
  40. this.subURI = "";
  41. this.subJsonURI = "";
  42. this.subJsonFragment = "";
  43. this.subJsonNoises = "";
  44. this.subJsonMux = "";
  45. this.subJsonRules = "";
  46. this.timeLocation = "Local";
  47. if (data == null) {
  48. return
  49. }
  50. ObjectUtil.cloneProps(this, data);
  51. }
  52. equals(other) {
  53. return ObjectUtil.equals(this, other);
  54. }
  55. }