mirror of
https://github.com/LightZirconite/Microsoft-Rewards-Bot.git
synced 2026-01-11 01:36:16 +00:00
Account configuration update: ProxyAxios is now disabled by default, and validation has been added for the proxy URL.
This commit is contained in:
@@ -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": "",
|
||||
|
||||
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user