Account configuration update: ProxyAxios is now disabled by default, and validation has been added for the proxy URL.

This commit is contained in:
2025-11-05 21:11:24 +01:00
parent 900fc7d35c
commit b7ee657faf
2 changed files with 17 additions and 4 deletions

View File

@@ -10,7 +10,7 @@
"recoveryRequired": true, "recoveryRequired": true,
"recoveryEmail": "primary.backup@example.com", "recoveryEmail": "primary.backup@example.com",
"proxy": { "proxy": {
"proxyAxios": true, "proxyAxios": false, // Set to true ONLY if you have a proxy configured below
"url": "", "url": "",
"port": 0, "port": 0,
"username": "", "username": "",
@@ -26,7 +26,7 @@
"recoveryRequired": true, "recoveryRequired": true,
"recoveryEmail": "secondary.backup@example.com", "recoveryEmail": "secondary.backup@example.com",
"proxy": { "proxy": {
"proxyAxios": true, "proxyAxios": false, // Set to true ONLY if you have a proxy configured below
"url": "", "url": "",
"port": 0, "port": 0,
"username": "", "username": "",
@@ -74,7 +74,7 @@
"recoveryRequired": true, "recoveryRequired": true,
"recoveryEmail": "totp.optional.backup@example.com", "recoveryEmail": "totp.optional.backup@example.com",
"proxy": { "proxy": {
"proxyAxios": true, "proxyAxios": false, // Set to true ONLY if you have a proxy configured below
"url": "", "url": "",
"port": 0, "port": 0,
"username": "", "username": "",

View File

@@ -172,7 +172,20 @@ export class StartupValidator {
// Proxy validation // Proxy validation
if (account.proxy) { if (account.proxy) {
if (account.proxy.url && account.proxy.url.trim() !== '') { const hasProxyUrl = account.proxy.url && account.proxy.url.trim() !== ''
const proxyEnabled = account.proxy.proxyAxios === true
if (proxyEnabled && !hasProxyUrl) {
this.addError(
'accounts',
`${prefix}: proxyAxios is true but proxy URL is empty`,
'Set proxyAxios to false if not using a proxy, or provide valid proxy URL/port',
undefined,
true // blocking
)
}
if (hasProxyUrl) {
if (!account.proxy.port || account.proxy.port <= 0) { if (!account.proxy.port || account.proxy.port <= 0) {
this.addError( this.addError(
'accounts', 'accounts',