From b7ee657fafeac3ea5a5bb02aa7e046157041bd3c Mon Sep 17 00:00:00 2001 From: LightZirconite Date: Wed, 5 Nov 2025 21:11:24 +0100 Subject: [PATCH] Account configuration update: ProxyAxios is now disabled by default, and validation has been added for the proxy URL. --- src/accounts.example.jsonc | 6 +++--- src/util/StartupValidator.ts | 15 ++++++++++++++- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/src/accounts.example.jsonc b/src/accounts.example.jsonc index fe61680..8fe7696 100644 --- a/src/accounts.example.jsonc +++ b/src/accounts.example.jsonc @@ -10,7 +10,7 @@ "recoveryRequired": true, "recoveryEmail": "primary.backup@example.com", "proxy": { - "proxyAxios": true, + "proxyAxios": false, // Set to true ONLY if you have a proxy configured below "url": "", "port": 0, "username": "", @@ -26,7 +26,7 @@ "recoveryRequired": true, "recoveryEmail": "secondary.backup@example.com", "proxy": { - "proxyAxios": true, + "proxyAxios": false, // Set to true ONLY if you have a proxy configured below "url": "", "port": 0, "username": "", @@ -74,7 +74,7 @@ "recoveryRequired": true, "recoveryEmail": "totp.optional.backup@example.com", "proxy": { - "proxyAxios": true, + "proxyAxios": false, // Set to true ONLY if you have a proxy configured below "url": "", "port": 0, "username": "", diff --git a/src/util/StartupValidator.ts b/src/util/StartupValidator.ts index 72471ef..be0fd47 100644 --- a/src/util/StartupValidator.ts +++ b/src/util/StartupValidator.ts @@ -172,7 +172,20 @@ export class StartupValidator { // Proxy validation 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) { this.addError( 'accounts',