mirror of
https://github.com/LightZirconite/Microsoft-Rewards-Bot.git
synced 2026-01-30 08:51:02 +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,
|
"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": "",
|
||||||
|
|||||||
@@ -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',
|
||||||
|
|||||||
Reference in New Issue
Block a user