mirror of
https://git.mirrors.martin98.com/https://github.com/sub-store-org/Sub-Store.git
synced 2026-04-04 08:13:16 +08:00
feat: 远程订阅支持 insecure 不验证服务器证书
This commit is contained in:
@@ -157,8 +157,13 @@ export default async function download(
|
||||
$.write(cached, customCacheKey);
|
||||
}
|
||||
} else {
|
||||
const insecure = $arguments?.insecure
|
||||
? isNode
|
||||
? { strictSSL: false }
|
||||
: { insecure: true }
|
||||
: undefined;
|
||||
$.info(
|
||||
`Downloading...\nUser-Agent: ${userAgent}\nTimeout: ${requestTimeout}\nProxy: ${proxy}\nURL: ${url}`,
|
||||
`Downloading...\nUser-Agent: ${userAgent}\nTimeout: ${requestTimeout}\nProxy: ${proxy}\nInsecure: ${!!insecure}\nURL: ${url}`,
|
||||
);
|
||||
try {
|
||||
const { body, headers } = await http.get({
|
||||
@@ -167,6 +172,7 @@ export default async function download(
|
||||
...(isLoon && proxy ? { node: proxy } : {}),
|
||||
...(isQX && proxy ? { opts: { policy: proxy } } : {}),
|
||||
...(proxy ? getPolicyDescriptor(proxy) : {}),
|
||||
...(insecure ? insecure : {}),
|
||||
});
|
||||
|
||||
if (headers) {
|
||||
|
||||
Reference in New Issue
Block a user