2023-12-05 09:13:36 -08:00
|
|
|
class AllSetting {
|
|
|
|
|
|
|
|
|
|
constructor(data) {
|
|
|
|
|
this.webListen = "";
|
|
|
|
|
this.webDomain = "";
|
2023-12-10 06:06:42 -08:00
|
|
|
this.webPort = 2053;
|
2023-12-05 09:13:36 -08:00
|
|
|
this.webCertFile = "";
|
|
|
|
|
this.webKeyFile = "";
|
|
|
|
|
this.webBasePath = "/";
|
2025-08-04 02:37:53 -07:00
|
|
|
this.sessionMaxAge = 360;
|
2025-09-21 11:47:34 -07:00
|
|
|
this.pageSize = 25;
|
2024-08-06 12:17:12 -07:00
|
|
|
this.expireDiff = 0;
|
|
|
|
|
this.trafficDiff = 0;
|
2023-12-08 11:31:17 -08:00
|
|
|
this.remarkModel = "-ieo";
|
2024-01-02 00:32:21 -08:00
|
|
|
this.datepicker = "gregorian";
|
2023-12-05 09:13:36 -08:00
|
|
|
this.tgBotEnable = false;
|
|
|
|
|
this.tgBotToken = "";
|
2024-01-02 01:42:07 -08:00
|
|
|
this.tgBotProxy = "";
|
2024-10-17 01:59:42 -07:00
|
|
|
this.tgBotAPIServer = "";
|
2023-12-05 09:13:36 -08:00
|
|
|
this.tgBotChatId = "";
|
|
|
|
|
this.tgRunTime = "@daily";
|
|
|
|
|
this.tgBotBackup = false;
|
2024-08-06 12:17:12 -07:00
|
|
|
this.tgBotLoginNotify = true;
|
|
|
|
|
this.tgCpu = 80;
|
2023-12-10 06:06:42 -08:00
|
|
|
this.tgLang = "en-US";
|
2025-05-08 07:20:58 -07:00
|
|
|
this.twoFactorEnable = false;
|
|
|
|
|
this.twoFactorToken = "";
|
2023-12-10 06:06:42 -08:00
|
|
|
this.xrayTemplateConfig = "";
|
2025-09-18 04:56:04 -07:00
|
|
|
this.subEnable = true;
|
|
|
|
|
this.subJsonEnable = false;
|
2025-03-15 00:16:59 -07:00
|
|
|
this.subTitle = "";
|
2023-12-05 09:13:36 -08:00
|
|
|
this.subListen = "";
|
2024-08-06 08:06:39 -07:00
|
|
|
this.subPort = 2096;
|
2023-12-05 09:13:36 -08:00
|
|
|
this.subPath = "/sub/";
|
2024-02-21 02:47:52 -08:00
|
|
|
this.subJsonPath = "/json/";
|
2023-12-05 09:13:36 -08:00
|
|
|
this.subDomain = "";
|
2025-02-22 01:45:14 -08:00
|
|
|
this.externalTrafficInformEnable = false;
|
|
|
|
|
this.externalTrafficInformURI = "";
|
2023-12-05 09:13:36 -08:00
|
|
|
this.subCertFile = "";
|
|
|
|
|
this.subKeyFile = "";
|
2024-08-06 12:17:12 -07:00
|
|
|
this.subUpdates = 12;
|
2023-12-05 09:13:36 -08:00
|
|
|
this.subEncrypt = true;
|
2024-08-06 12:17:12 -07:00
|
|
|
this.subShowInfo = true;
|
2024-03-12 09:14:51 -07:00
|
|
|
this.subURI = "";
|
|
|
|
|
this.subJsonURI = "";
|
|
|
|
|
this.subJsonFragment = "";
|
2024-09-17 00:33:44 -07:00
|
|
|
this.subJsonNoises = "";
|
2024-03-12 09:14:51 -07:00
|
|
|
this.subJsonMux = "";
|
|
|
|
|
this.subJsonRules = "";
|
2023-12-05 09:13:36 -08:00
|
|
|
|
2025-01-11 06:13:49 -08:00
|
|
|
this.timeLocation = "Local";
|
2023-12-05 09:13:36 -08:00
|
|
|
|
2025-09-28 12:00:16 -07:00
|
|
|
// LDAP settings
|
|
|
|
|
this.ldapEnable = false;
|
|
|
|
|
this.ldapHost = "";
|
|
|
|
|
this.ldapPort = 389;
|
|
|
|
|
this.ldapUseTLS = false;
|
|
|
|
|
this.ldapBindDN = "";
|
|
|
|
|
this.ldapPassword = "";
|
|
|
|
|
this.ldapBaseDN = "";
|
|
|
|
|
this.ldapUserFilter = "(objectClass=person)";
|
|
|
|
|
this.ldapUserAttr = "mail";
|
|
|
|
|
this.ldapVlessField = "vless_enabled";
|
|
|
|
|
this.ldapSyncCron = "@every 1m";
|
|
|
|
|
this.ldapFlagField = "";
|
|
|
|
|
this.ldapTruthyValues = "true,1,yes,on";
|
|
|
|
|
this.ldapInvertFlag = false;
|
|
|
|
|
this.ldapInboundTags = "";
|
|
|
|
|
this.ldapAutoCreate = false;
|
|
|
|
|
this.ldapAutoDelete = false;
|
|
|
|
|
this.ldapDefaultTotalGB = 0;
|
|
|
|
|
this.ldapDefaultExpiryDays = 0;
|
|
|
|
|
this.ldapDefaultLimitIP = 0;
|
|
|
|
|
|
2023-12-05 09:13:36 -08:00
|
|
|
if (data == null) {
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
ObjectUtil.cloneProps(this, data);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
equals(other) {
|
|
|
|
|
return ObjectUtil.equals(this, other);
|
|
|
|
|
}
|
|
|
|
|
}
|