3x-ui/web/assets/js/model/setting.js

92 lines
2.7 KiB
JavaScript
Raw Normal View History

2023-12-05 17:13:36 +00:00
class AllSetting {
constructor(data) {
this.webListen = "";
this.webDomain = "";
2023-12-10 14:06:42 +00:00
this.webPort = 2053;
2023-12-05 17:13:36 +00:00
this.webCertFile = "";
this.webKeyFile = "";
this.webBasePath = "/";
2025-08-04 09:37:53 +00:00
this.sessionMaxAge = 360;
2025-09-21 18:47:34 +00:00
this.pageSize = 25;
2024-08-06 19:17:12 +00:00
this.expireDiff = 0;
this.trafficDiff = 0;
2023-12-08 19:31:17 +00:00
this.remarkModel = "-ieo";
this.datepicker = "gregorian";
2023-12-05 17:13:36 +00:00
this.tgBotEnable = false;
this.tgBotToken = "";
this.tgBotProxy = "";
this.tgBotAPIServer = "";
2023-12-05 17:13:36 +00:00
this.tgBotChatId = "";
this.tgRunTime = "@daily";
this.tgBotBackup = false;
2024-08-06 19:17:12 +00:00
this.tgBotLoginNotify = true;
this.tgCpu = 80;
2023-12-10 14:06:42 +00:00
this.tgLang = "en-US";
this.twoFactorEnable = false;
this.twoFactorToken = "";
2023-12-10 14:06:42 +00:00
this.xrayTemplateConfig = "";
this.subEnable = true;
this.subJsonEnable = false;
this.subTitle = "";
this.subSupportUrl = "";
this.subProfileUrl = "";
this.subAnnounce = "";
this.subEnableRouting = true;
this.subRoutingRules = "";
2023-12-05 17:13:36 +00:00
this.subListen = "";
this.subPort = 2096;
2023-12-05 17:13:36 +00:00
this.subPath = "/sub/";
this.subJsonPath = "/json/";
feat add clash yaml convert (#3916) * docs(agents): add AI agent guidance documentation * feat(sub): add Clash/Mihomo YAML subscription service Add SubClashService to convert subscription links to Clash/Mihomo YAML format for direct client compatibility. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * feat(sub): integrate Clash YAML endpoint into subscription system - Add Clash route handler in SUBController - Update BuildURLs to include Clash URL - Pass Clash settings through subscription pipeline Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * feat(web): add Clash settings to entity and service - Add SubClashEnable, SubClashPath, SubClashURI fields - Add getter methods for Clash configuration - Set default Clash path to /clash/ and enable by default Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * feat(ui): add Clash settings to subscription panels - Add Clash enable switch in general subscription settings - Add Clash path/URI configuration in formats panel - Display Clash QR code on subscription page - Rename JSON tab to "Formats" for clarity Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * feat(js): add Clash support to frontend models - Add subClashEnable, subClashPath, subClashURI to AllSetting - Generate and display Clash QR code on subscription page - Handle Clash URL in subscription data binding Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> Co-authored-by: Sanaei <ho3ein.sanaei@gmail.com>
2026-04-19 20:26:13 +00:00
this.subClashEnable = true;
this.subClashPath = "/clash/";
2023-12-05 17:13:36 +00:00
this.subDomain = "";
this.externalTrafficInformEnable = false;
this.externalTrafficInformURI = "";
2023-12-05 17:13:36 +00:00
this.subCertFile = "";
this.subKeyFile = "";
2024-08-06 19:17:12 +00:00
this.subUpdates = 12;
2023-12-05 17:13:36 +00:00
this.subEncrypt = true;
2024-08-06 19:17:12 +00:00
this.subShowInfo = true;
this.subURI = "";
this.subJsonURI = "";
feat add clash yaml convert (#3916) * docs(agents): add AI agent guidance documentation * feat(sub): add Clash/Mihomo YAML subscription service Add SubClashService to convert subscription links to Clash/Mihomo YAML format for direct client compatibility. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * feat(sub): integrate Clash YAML endpoint into subscription system - Add Clash route handler in SUBController - Update BuildURLs to include Clash URL - Pass Clash settings through subscription pipeline Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * feat(web): add Clash settings to entity and service - Add SubClashEnable, SubClashPath, SubClashURI fields - Add getter methods for Clash configuration - Set default Clash path to /clash/ and enable by default Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * feat(ui): add Clash settings to subscription panels - Add Clash enable switch in general subscription settings - Add Clash path/URI configuration in formats panel - Display Clash QR code on subscription page - Rename JSON tab to "Formats" for clarity Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * feat(js): add Clash support to frontend models - Add subClashEnable, subClashPath, subClashURI to AllSetting - Generate and display Clash QR code on subscription page - Handle Clash URL in subscription data binding Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> Co-authored-by: Sanaei <ho3ein.sanaei@gmail.com>
2026-04-19 20:26:13 +00:00
this.subClashURI = "";
this.subJsonFragment = "";
2024-09-17 07:33:44 +00:00
this.subJsonNoises = "";
this.subJsonMux = "";
this.subJsonRules = "";
2023-12-05 17:13:36 +00:00
2025-01-11 14:13:49 +00:00
this.timeLocation = "Local";
2023-12-05 17:13:36 +00: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 17:13:36 +00:00
if (data == null) {
return
}
ObjectUtil.cloneProps(this, data);
}
equals(other) {
return ObjectUtil.equals(this, other);
}
}