feat: 新增全局代理/策略设置, 前端 > 2.14.265

This commit is contained in:
xream 2024-10-07 18:05:06 +08:00
parent dc320eaa6c
commit e2346d16a2
No known key found for this signature in database
GPG Key ID: 1D2C5225471789F9
2 changed files with 4 additions and 3 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "sub-store", "name": "sub-store",
"version": "2.14.386", "version": "2.14.387",
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and ShadowRocket.", "description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and ShadowRocket.",
"main": "src/main.js", "main": "src/main.js",
"scripts": { "scripts": {

View File

@ -18,7 +18,7 @@ export default async function download(
rawUrl = '', rawUrl = '',
ua, ua,
timeout, timeout,
proxy, customProxy,
skipCustomCache, skipCustomCache,
awaitCustomCache, awaitCustomCache,
) { ) {
@ -43,8 +43,9 @@ export default async function download(
} }
} }
const { isNode, isStash, isLoon, isShadowRocket, isQX } = ENV(); const { isNode, isStash, isLoon, isShadowRocket, isQX } = ENV();
const { defaultUserAgent, defaultTimeout, cacheThreshold } = const { defaultProxy, defaultUserAgent, defaultTimeout, cacheThreshold } =
$.read(SETTINGS_KEY); $.read(SETTINGS_KEY);
const proxy = customProxy || defaultProxy;
const userAgent = ua || defaultUserAgent || 'clash.meta'; const userAgent = ua || defaultUserAgent || 'clash.meta';
const requestTimeout = timeout || defaultTimeout; const requestTimeout = timeout || defaultTimeout;
const id = hex_md5(userAgent + url); const id = hex_md5(userAgent + url);