mirror of
https://git.mirrors.martin98.com/https://github.com/sub-store-org/Sub-Store.git
synced 2026-04-03 02:53:16 +08:00
feat: Clash 订阅仅缓存 proxies 数据
This commit is contained in:
@@ -62,6 +62,7 @@ async function getFile(req, res) {
|
||||
mergeSources,
|
||||
ignoreFailedRemoteFile,
|
||||
proxy,
|
||||
noCache,
|
||||
} = req.query;
|
||||
let $options = {};
|
||||
if (req.query.$options) {
|
||||
@@ -113,6 +114,9 @@ async function getFile(req, res) {
|
||||
ignoreFailedRemoteFile = decodeURIComponent(ignoreFailedRemoteFile);
|
||||
$.info(`指定忽略失败的远程文件: ${ignoreFailedRemoteFile}`);
|
||||
}
|
||||
if (noCache) {
|
||||
$.info(`指定不使用缓存: ${noCache}`);
|
||||
}
|
||||
|
||||
const allFiles = $.read(FILES_KEY);
|
||||
const file = findByName(allFiles, name);
|
||||
@@ -128,6 +132,7 @@ async function getFile(req, res) {
|
||||
ignoreFailedRemoteFile,
|
||||
$options,
|
||||
proxy,
|
||||
noCache,
|
||||
});
|
||||
|
||||
try {
|
||||
|
||||
@@ -114,6 +114,10 @@ async function compareSub(req, res) {
|
||||
sub.ua,
|
||||
undefined,
|
||||
sub.proxy,
|
||||
undefined,
|
||||
undefined,
|
||||
undefined,
|
||||
true,
|
||||
);
|
||||
} catch (err) {
|
||||
errors[url] = err;
|
||||
@@ -219,6 +223,10 @@ async function compareCollection(req, res) {
|
||||
sub.ua,
|
||||
undefined,
|
||||
sub.proxy,
|
||||
undefined,
|
||||
undefined,
|
||||
undefined,
|
||||
true,
|
||||
);
|
||||
} catch (err) {
|
||||
errors[url] = err;
|
||||
|
||||
@@ -74,6 +74,7 @@ async function produceArtifact({
|
||||
undefined,
|
||||
awaitCustomCache,
|
||||
noCache,
|
||||
true,
|
||||
);
|
||||
} catch (err) {
|
||||
errors[url] = err;
|
||||
@@ -122,6 +123,7 @@ async function produceArtifact({
|
||||
undefined,
|
||||
awaitCustomCache,
|
||||
noCache,
|
||||
true,
|
||||
);
|
||||
} catch (err) {
|
||||
errors[url] = err;
|
||||
@@ -243,6 +245,7 @@ async function produceArtifact({
|
||||
undefined,
|
||||
undefined,
|
||||
noCache,
|
||||
true,
|
||||
);
|
||||
} catch (err) {
|
||||
errors[url] = err;
|
||||
|
||||
Reference in New Issue
Block a user