mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-06-29 00:54:21 +00:00
ce1d348ece
* feat(settings): add option to hide server settings in subscription
* chore: regenerate codegen and add translations for subHideSettings
- Update frontend/src/generated/{types,schemas,zod,examples}.ts to include
subHideSettings (bool) in AllSetting and AllSettingView
- Add subHideSettings / subHideSettingsDesc translation keys to all 11
remaining locales: ar-EG, fa-IR, es-ES, id-ID, ja-JP, pt-BR, uk-UA,
tr-TR, zh-TW, zh-CN, vi-VN
Co-authored-by: IgorKha <IgorKha@users.noreply.github.com>
Co-authored-by: Sanaei <MHSanaei@users.noreply.github.com>
* fix(sub): add subHideSettings default to settings map
Every other sub* setting has an entry in defaultValueMap; subHideSettings was missing, so GetSubHideSettings hit the 'key not in defaultValueMap' error path on a fresh install (only masked by the false fallback in sub.go). Add the default for consistency.
467 lines
9.9 KiB
TypeScript
467 lines
9.9 KiB
TypeScript
// Code generated by tools/openapigen. DO NOT EDIT.
|
|
export const EXAMPLES: Record<string, unknown> = {
|
|
"AllSetting": {
|
|
"datepicker": "",
|
|
"expireDiff": 0,
|
|
"externalTrafficInformEnable": false,
|
|
"externalTrafficInformURI": "",
|
|
"ldapAutoCreate": false,
|
|
"ldapAutoDelete": false,
|
|
"ldapBaseDN": "",
|
|
"ldapBindDN": "",
|
|
"ldapDefaultExpiryDays": 0,
|
|
"ldapDefaultLimitIP": 0,
|
|
"ldapDefaultTotalGB": 0,
|
|
"ldapEnable": false,
|
|
"ldapFlagField": "",
|
|
"ldapHost": "",
|
|
"ldapInboundTags": "",
|
|
"ldapInvertFlag": false,
|
|
"ldapPassword": "",
|
|
"ldapPort": 0,
|
|
"ldapSyncCron": "",
|
|
"ldapTruthyValues": "",
|
|
"ldapUseTLS": false,
|
|
"ldapUserAttr": "",
|
|
"ldapUserFilter": "",
|
|
"ldapVlessField": "",
|
|
"pageSize": 0,
|
|
"panelOutbound": "",
|
|
"remarkTemplate": "",
|
|
"restartXrayOnClientDisable": false,
|
|
"sessionMaxAge": 1,
|
|
"smtpCpu": 0,
|
|
"smtpEnable": false,
|
|
"smtpEnabledEvents": "",
|
|
"smtpEncryptionType": "",
|
|
"smtpHost": "",
|
|
"smtpPassword": "",
|
|
"smtpPort": 1,
|
|
"smtpTo": "",
|
|
"smtpUsername": "",
|
|
"subAnnounce": "",
|
|
"subCertFile": "",
|
|
"subClashEnable": false,
|
|
"subClashEnableRouting": false,
|
|
"subClashPath": "",
|
|
"subClashRules": "",
|
|
"subClashURI": "",
|
|
"subDomain": "",
|
|
"subEnable": false,
|
|
"subEnableRouting": false,
|
|
"subEncrypt": false,
|
|
"subHideSettings": false,
|
|
"subJsonEnable": false,
|
|
"subJsonFinalMask": "",
|
|
"subJsonMux": "",
|
|
"subJsonPath": "",
|
|
"subJsonRules": "",
|
|
"subJsonURI": "",
|
|
"subKeyFile": "",
|
|
"subListen": "",
|
|
"subPath": "",
|
|
"subPort": 1,
|
|
"subProfileUrl": "",
|
|
"subRoutingRules": "",
|
|
"subSupportUrl": "",
|
|
"subThemeDir": "",
|
|
"subTitle": "",
|
|
"subURI": "",
|
|
"subUpdates": 0,
|
|
"tgBotAPIServer": "",
|
|
"tgBotBackup": false,
|
|
"tgBotChatId": "",
|
|
"tgBotEnable": false,
|
|
"tgBotProxy": "",
|
|
"tgBotToken": "",
|
|
"tgCpu": 0,
|
|
"tgEnabledEvents": "",
|
|
"tgLang": "",
|
|
"tgRunTime": "",
|
|
"timeLocation": "",
|
|
"trafficDiff": 0,
|
|
"trustedProxyCIDRs": "",
|
|
"twoFactorEnable": false,
|
|
"twoFactorToken": "",
|
|
"warpUpdateInterval": 0,
|
|
"webBasePath": "",
|
|
"webCertFile": "",
|
|
"webDomain": "",
|
|
"webKeyFile": "",
|
|
"webListen": "",
|
|
"webPort": 1
|
|
},
|
|
"AllSettingView": {
|
|
"datepicker": "",
|
|
"expireDiff": 0,
|
|
"externalTrafficInformEnable": false,
|
|
"externalTrafficInformURI": "",
|
|
"hasApiToken": false,
|
|
"hasLdapPassword": false,
|
|
"hasNordSecret": false,
|
|
"hasSmtpPassword": false,
|
|
"hasTgBotToken": false,
|
|
"hasTwoFactorToken": false,
|
|
"hasWarpSecret": false,
|
|
"ldapAutoCreate": false,
|
|
"ldapAutoDelete": false,
|
|
"ldapBaseDN": "",
|
|
"ldapBindDN": "",
|
|
"ldapDefaultExpiryDays": 0,
|
|
"ldapDefaultLimitIP": 0,
|
|
"ldapDefaultTotalGB": 0,
|
|
"ldapEnable": false,
|
|
"ldapFlagField": "",
|
|
"ldapHost": "",
|
|
"ldapInboundTags": "",
|
|
"ldapInvertFlag": false,
|
|
"ldapPassword": "",
|
|
"ldapPort": 0,
|
|
"ldapSyncCron": "",
|
|
"ldapTruthyValues": "",
|
|
"ldapUseTLS": false,
|
|
"ldapUserAttr": "",
|
|
"ldapUserFilter": "",
|
|
"ldapVlessField": "",
|
|
"pageSize": 0,
|
|
"panelOutbound": "",
|
|
"remarkTemplate": "",
|
|
"restartXrayOnClientDisable": false,
|
|
"sessionMaxAge": 1,
|
|
"smtpCpu": 0,
|
|
"smtpEnable": false,
|
|
"smtpEnabledEvents": "",
|
|
"smtpEncryptionType": "",
|
|
"smtpHost": "",
|
|
"smtpPassword": "",
|
|
"smtpPort": 1,
|
|
"smtpTo": "",
|
|
"smtpUsername": "",
|
|
"subAnnounce": "",
|
|
"subCertFile": "",
|
|
"subClashEnable": false,
|
|
"subClashEnableRouting": false,
|
|
"subClashPath": "",
|
|
"subClashRules": "",
|
|
"subClashURI": "",
|
|
"subDomain": "",
|
|
"subEnable": false,
|
|
"subEnableRouting": false,
|
|
"subEncrypt": false,
|
|
"subHideSettings": false,
|
|
"subJsonEnable": false,
|
|
"subJsonFinalMask": "",
|
|
"subJsonMux": "",
|
|
"subJsonPath": "",
|
|
"subJsonRules": "",
|
|
"subJsonURI": "",
|
|
"subKeyFile": "",
|
|
"subListen": "",
|
|
"subPath": "",
|
|
"subPort": 1,
|
|
"subProfileUrl": "",
|
|
"subRoutingRules": "",
|
|
"subSupportUrl": "",
|
|
"subThemeDir": "",
|
|
"subTitle": "",
|
|
"subURI": "",
|
|
"subUpdates": 0,
|
|
"tgBotAPIServer": "",
|
|
"tgBotBackup": false,
|
|
"tgBotChatId": "",
|
|
"tgBotEnable": false,
|
|
"tgBotProxy": "",
|
|
"tgBotToken": "",
|
|
"tgCpu": 0,
|
|
"tgEnabledEvents": "",
|
|
"tgLang": "",
|
|
"tgRunTime": "",
|
|
"timeLocation": "",
|
|
"trafficDiff": 0,
|
|
"trustedProxyCIDRs": "",
|
|
"twoFactorEnable": false,
|
|
"twoFactorToken": "",
|
|
"warpUpdateInterval": 0,
|
|
"webBasePath": "",
|
|
"webCertFile": "",
|
|
"webDomain": "",
|
|
"webKeyFile": "",
|
|
"webListen": "",
|
|
"webPort": 1
|
|
},
|
|
"ApiToken": {
|
|
"createdAt": 0,
|
|
"enabled": false,
|
|
"id": 0,
|
|
"name": "",
|
|
"token": ""
|
|
},
|
|
"ApiTokenView": {
|
|
"createdAt": 1736000000,
|
|
"enabled": true,
|
|
"id": 2,
|
|
"name": "central-panel-a",
|
|
"token": "new-token-string"
|
|
},
|
|
"Client": {
|
|
"auth": "",
|
|
"comment": "",
|
|
"created_at": 0,
|
|
"email": "",
|
|
"enable": false,
|
|
"expiryTime": 0,
|
|
"flow": "",
|
|
"group": "",
|
|
"id": "",
|
|
"limitIp": 0,
|
|
"password": "",
|
|
"reset": 0,
|
|
"reverse": null,
|
|
"security": "",
|
|
"subId": "",
|
|
"tgId": 0,
|
|
"totalGB": 0,
|
|
"updated_at": 0
|
|
},
|
|
"ClientInbound": {
|
|
"clientId": 0,
|
|
"createdAt": 0,
|
|
"flowOverride": "",
|
|
"inboundId": 0
|
|
},
|
|
"ClientRecord": {
|
|
"auth": "",
|
|
"comment": "",
|
|
"createdAt": 0,
|
|
"email": "",
|
|
"enable": false,
|
|
"expiryTime": 0,
|
|
"flow": "",
|
|
"group": "",
|
|
"id": 0,
|
|
"limitIp": 0,
|
|
"password": "",
|
|
"reset": 0,
|
|
"reverse": null,
|
|
"security": "",
|
|
"subId": "",
|
|
"tgId": 0,
|
|
"totalGB": 0,
|
|
"updatedAt": 0,
|
|
"uuid": ""
|
|
},
|
|
"ClientReverse": {
|
|
"tag": ""
|
|
},
|
|
"ClientTraffic": {
|
|
"down": 2097152,
|
|
"email": "user1",
|
|
"enable": true,
|
|
"expiryTime": 1735689600000,
|
|
"id": 14825,
|
|
"inboundId": 1,
|
|
"lastOnline": 1735680000000,
|
|
"reset": 0,
|
|
"subId": "i7tvdpeffi0hvvf1",
|
|
"total": 10737418240,
|
|
"up": 1048576,
|
|
"uuid": "e18c9a96-71bf-48d4-933f-8b9a46d4290c"
|
|
},
|
|
"FallbackParentInfo": {
|
|
"masterId": 0,
|
|
"path": ""
|
|
},
|
|
"HistoryOfSeeders": {
|
|
"id": 0,
|
|
"seederName": ""
|
|
},
|
|
"Host": {
|
|
"address": "cdn.example.com",
|
|
"allowInsecure": false,
|
|
"alpn": [
|
|
""
|
|
],
|
|
"createdAt": 0,
|
|
"echConfigList": "",
|
|
"excludeFromSubTypes": [
|
|
""
|
|
],
|
|
"finalMask": "",
|
|
"fingerprint": "",
|
|
"hostHeader": "",
|
|
"id": 1,
|
|
"inboundId": 1,
|
|
"isDisabled": false,
|
|
"isHidden": false,
|
|
"keepSniBlank": false,
|
|
"mihomoIpVersion": "dual",
|
|
"mihomoX25519": false,
|
|
"muxParams": null,
|
|
"nodeGuids": [
|
|
""
|
|
],
|
|
"overrideSniFromAddress": false,
|
|
"path": "",
|
|
"pinnedPeerCertSha256": [
|
|
""
|
|
],
|
|
"port": 8443,
|
|
"remark": "cdn-front",
|
|
"security": "same",
|
|
"serverDescription": "",
|
|
"shuffleHost": false,
|
|
"sni": "",
|
|
"sockoptParams": null,
|
|
"sortOrder": 0,
|
|
"tags": [
|
|
""
|
|
],
|
|
"updatedAt": 0,
|
|
"verifyPeerCertByName": false,
|
|
"vlessRoute": ""
|
|
},
|
|
"Inbound": {
|
|
"clientStats": [
|
|
{
|
|
"down": 2097152,
|
|
"email": "user1",
|
|
"enable": true,
|
|
"expiryTime": 1735689600000,
|
|
"id": 14825,
|
|
"inboundId": 1,
|
|
"lastOnline": 1735680000000,
|
|
"reset": 0,
|
|
"subId": "i7tvdpeffi0hvvf1",
|
|
"total": 10737418240,
|
|
"up": 1048576,
|
|
"uuid": "e18c9a96-71bf-48d4-933f-8b9a46d4290c"
|
|
}
|
|
],
|
|
"down": 0,
|
|
"enable": true,
|
|
"expiryTime": 0,
|
|
"fallbackParent": null,
|
|
"id": 1,
|
|
"lastTrafficResetTime": 0,
|
|
"listen": "",
|
|
"nodeId": null,
|
|
"originNodeGuid": "",
|
|
"port": 443,
|
|
"protocol": "vless",
|
|
"remark": "VLESS-443",
|
|
"settings": null,
|
|
"shareAddr": "",
|
|
"shareAddrStrategy": "node",
|
|
"sniffing": null,
|
|
"streamSettings": null,
|
|
"subSortIndex": 1,
|
|
"tag": "in-443-tcp",
|
|
"total": 0,
|
|
"trafficReset": "never",
|
|
"up": 0
|
|
},
|
|
"InboundClientIps": {
|
|
"clientEmail": "",
|
|
"id": 0,
|
|
"ips": null
|
|
},
|
|
"InboundFallback": {
|
|
"alpn": "",
|
|
"childId": 0,
|
|
"dest": "",
|
|
"id": 0,
|
|
"masterId": 0,
|
|
"name": "",
|
|
"path": "",
|
|
"sortOrder": 0,
|
|
"xver": 0
|
|
},
|
|
"InboundOption": {
|
|
"id": 1,
|
|
"nodeId": null,
|
|
"port": 443,
|
|
"protocol": "vless",
|
|
"remark": "VLESS-443",
|
|
"ssMethod": "",
|
|
"tag": "in-443-tcp",
|
|
"tlsFlowCapable": true
|
|
},
|
|
"Msg": {
|
|
"msg": "",
|
|
"obj": null,
|
|
"success": false
|
|
},
|
|
"Node": {
|
|
"address": "node1.example.com",
|
|
"allowPrivateAddress": false,
|
|
"apiToken": "abcdef0123456789",
|
|
"basePath": "/",
|
|
"clientCount": 27,
|
|
"configDirty": false,
|
|
"configDirtyAt": 0,
|
|
"cpuPct": 23.5,
|
|
"createdAt": 1700000000,
|
|
"depletedCount": 1,
|
|
"enable": true,
|
|
"guid": "",
|
|
"id": 1,
|
|
"inboundCount": 5,
|
|
"inboundSyncMode": "all",
|
|
"inboundTags": [
|
|
""
|
|
],
|
|
"lastError": "",
|
|
"lastHeartbeat": 1700000000,
|
|
"latencyMs": 42,
|
|
"memPct": 45.1,
|
|
"name": "de-fra-1",
|
|
"netDown": 2097152,
|
|
"netUp": 1048576,
|
|
"onlineCount": 3,
|
|
"outboundTag": "",
|
|
"panelVersion": "v3.x.x",
|
|
"parentGuid": "",
|
|
"pinnedCertSha256": "",
|
|
"port": 2053,
|
|
"remark": "",
|
|
"scheme": "https",
|
|
"status": "online",
|
|
"tlsVerifyMode": "verify",
|
|
"transitive": false,
|
|
"updatedAt": 1700000000,
|
|
"uptimeSecs": 86400,
|
|
"xrayError": "",
|
|
"xrayState": "",
|
|
"xrayVersion": "25.10.31"
|
|
},
|
|
"OutboundTraffics": {
|
|
"down": 0,
|
|
"id": 0,
|
|
"tag": "",
|
|
"total": 0,
|
|
"up": 0
|
|
},
|
|
"ProbeResultUI": {
|
|
"cpuPct": 12.5,
|
|
"error": "",
|
|
"latencyMs": 42,
|
|
"memPct": 45.2,
|
|
"panelVersion": "v3.x.x",
|
|
"status": "online",
|
|
"uptimeSecs": 86400,
|
|
"xrayError": "",
|
|
"xrayState": "",
|
|
"xrayVersion": "25.10.31"
|
|
},
|
|
"Setting": {
|
|
"id": 0,
|
|
"key": "",
|
|
"value": ""
|
|
},
|
|
"User": {
|
|
"id": 0,
|
|
"password": "",
|
|
"username": ""
|
|
}
|
|
};
|