fix: 修复文件预览未使用代理策略的问题

This commit is contained in:
xream 2025-03-12 19:44:54 +08:00
parent 8116c78dda
commit 15a51e0dd0
No known key found for this signature in database
GPG Key ID: 1D2C5225471789F9
2 changed files with 6 additions and 2 deletions

View File

@ -31,7 +31,12 @@ async function previewFile(req, res) {
.filter((i) => i.length)
.map(async (url) => {
try {
return await download(url, file.ua);
return await download(
url,
file.ua,
undefined,
file.proxy,
);
} catch (err) {
errors[url] = err;
$.error(

View File

@ -411,7 +411,6 @@ async function produceArtifact({
const file = findByName(allFiles, name);
if (!file) throw new Error(`找不到文件 ${name}`);
let raw = '';
console.log(file);
if (file.type !== 'mihomoProfile') {
if (
content &&