fix: skip SUB2API proxy when default proxy is empty

This commit is contained in:
Q3CC
2026-04-18 18:40:38 +08:00
parent 82471af931
commit b5f2ecb99c
7 changed files with 94 additions and 33 deletions
@@ -61,7 +61,7 @@ const DEFAULT_HOTMAIL_LOCAL_BASE_URL = 'http://127.0.0.1:17373';
const DEFAULT_ACCOUNT_RUN_HISTORY_HELPER_BASE_URL = DEFAULT_HOTMAIL_LOCAL_BASE_URL;
const DEFAULT_HOTMAIL_REMOTE_BASE_URL = '';
const DEFAULT_VERIFICATION_RESEND_COUNT = 4;
const DEFAULT_SUB2API_PROXY_NAME = 'shadowrocket';
const DEFAULT_SUB2API_PROXY_NAME = '';
const HOTMAIL_SERVICE_MODE_REMOTE = 'remote';
const HOTMAIL_SERVICE_MODE_LOCAL = 'local';
const VERIFICATION_RESEND_COUNT_MIN = 0;
@@ -112,7 +112,7 @@ return {
);
assert.equal(
api.normalizePersistentSettingValue('sub2apiDefaultProxyName', ''),
'shadowrocket'
''
);
assert.equal(
api.normalizePersistentSettingValue('sub2apiDefaultProxyName', ' proxy-a '),