mirror of
https://github.com/LightZirconite/Microsoft-Rewards-Bot.git
synced 2026-01-11 17:56:15 +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:
@@ -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