mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-07-03 11:04:20 +00:00
9d9737f470
Add a panelProxy setting that routes the panel's self-initiated HTTP requests (geo updates, Xray version/core download, panel update check) through an admin-configured socks5/http(s) proxy, to bypass server-side filtering of GitHub/Telegram. The Telegram bot falls back to it when tgBotProxy is empty (socks5 only). New util/netproxy.NewHTTPClient builds the proxied client. Also fix the Mixed-inbound SOCKS/HTTP share URLs that had host:port and user:pass in the wrong order, and consolidate the Telegram settings tab (move API server into the general tab, drop the empty Proxy & Server tab).
102 lines
2.2 KiB
TypeScript
102 lines
2.2 KiB
TypeScript
import { ObjectUtil } from '@/utils';
|
|
|
|
export class AllSetting {
|
|
webListen = '';
|
|
webDomain = '';
|
|
webPort = 2053;
|
|
webCertFile = '';
|
|
webKeyFile = '';
|
|
webBasePath = '/';
|
|
sessionMaxAge = 360;
|
|
trustedProxyCIDRs = '127.0.0.1/32,::1/128';
|
|
panelProxy = '';
|
|
pageSize = 25;
|
|
expireDiff = 0;
|
|
trafficDiff = 0;
|
|
remarkModel = '-io';
|
|
datepicker: 'gregorian' | 'jalalian' = 'gregorian';
|
|
tgBotEnable = false;
|
|
tgBotToken = '';
|
|
tgBotProxy = '';
|
|
tgBotAPIServer = '';
|
|
tgBotChatId = '';
|
|
tgRunTime = '@daily';
|
|
tgBotBackup = false;
|
|
tgBotLoginNotify = true;
|
|
tgCpu = 80;
|
|
tgLang = 'en-US';
|
|
twoFactorEnable = false;
|
|
twoFactorToken = '';
|
|
xrayTemplateConfig = '';
|
|
subEnable = true;
|
|
subJsonEnable = false;
|
|
subTitle = '';
|
|
subSupportUrl = '';
|
|
subProfileUrl = '';
|
|
subAnnounce = '';
|
|
subEnableRouting = true;
|
|
subRoutingRules = '';
|
|
subListen = '';
|
|
subPort = 2096;
|
|
subPath = '/sub/';
|
|
subJsonPath = '/json/';
|
|
subClashEnable = true;
|
|
subClashPath = '/clash/';
|
|
subDomain = '';
|
|
externalTrafficInformEnable = false;
|
|
externalTrafficInformURI = '';
|
|
restartXrayOnClientDisable = true;
|
|
subCertFile = '';
|
|
subKeyFile = '';
|
|
subUpdates = 12;
|
|
subEncrypt = true;
|
|
subShowInfo = true;
|
|
subEmailInRemark = true;
|
|
subURI = '';
|
|
subJsonURI = '';
|
|
subClashURI = '';
|
|
subJsonFragment = '';
|
|
subJsonNoises = '';
|
|
subJsonMux = '';
|
|
subJsonRules = '';
|
|
|
|
timeLocation = 'Local';
|
|
|
|
ldapEnable = false;
|
|
ldapHost = '';
|
|
ldapPort = 389;
|
|
ldapUseTLS = false;
|
|
ldapBindDN = '';
|
|
ldapPassword = '';
|
|
ldapBaseDN = '';
|
|
ldapUserFilter = '(objectClass=person)';
|
|
ldapUserAttr = 'mail';
|
|
ldapVlessField = 'vless_enabled';
|
|
ldapSyncCron = '@every 1m';
|
|
ldapFlagField = '';
|
|
ldapTruthyValues = 'true,1,yes,on';
|
|
ldapInvertFlag = false;
|
|
ldapInboundTags = '';
|
|
ldapAutoCreate = false;
|
|
ldapAutoDelete = false;
|
|
ldapDefaultTotalGB = 0;
|
|
ldapDefaultExpiryDays = 0;
|
|
ldapDefaultLimitIP = 0;
|
|
hasTgBotToken = false;
|
|
hasTwoFactorToken = false;
|
|
hasLdapPassword = false;
|
|
hasApiToken = false;
|
|
hasWarpSecret = false;
|
|
hasNordSecret = false;
|
|
|
|
constructor(data?: unknown) {
|
|
if (data != null) {
|
|
ObjectUtil.cloneProps(this, data);
|
|
}
|
|
}
|
|
|
|
equals(other: AllSetting): boolean {
|
|
return ObjectUtil.equals(this, other);
|
|
}
|
|
}
|