feat: 支持使用代理/节点/策略获取订阅

This commit is contained in:
xream
2024-03-13 01:55:16 +08:00
parent ca65e4209e
commit 80d46597b4
8 changed files with 88 additions and 17 deletions

View File

@@ -111,7 +111,12 @@ async function downloadSubscription(req, res) {
}
if (!$arguments.noFlow) {
// forward flow headers
const flowInfo = await getFlowHeaders(url);
const flowInfo = await getFlowHeaders(
url,
undefined,
undefined,
sub.proxy,
);
if (flowInfo) {
res.set('subscription-userinfo', flowInfo);
}
@@ -243,7 +248,12 @@ async function downloadCollection(req, res) {
}
}
if (!$arguments.noFlow) {
const flowInfo = await getFlowHeaders(url);
const flowInfo = await getFlowHeaders(
url,
undefined,
undefined,
sub.proxy,
);
if (flowInfo) {
res.set('subscription-userinfo', flowInfo);
}