From 281fe00a351fc7aa25596e4b1f6b6272247feeb8 Mon Sep 17 00:00:00 2001 From: WebStreamr <210764791+webstreamr@users.noreply.github.com> Date: Tue, 6 Jan 2026 19:07:50 +0000 Subject: [PATCH] chore(fetcher): disable TLS verification to better deal with hoster quirks --- src/utils/Fetcher.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/utils/Fetcher.ts b/src/utils/Fetcher.ts index ec562d1..485cba2 100644 --- a/src/utils/Fetcher.ts +++ b/src/utils/Fetcher.ts @@ -1,4 +1,5 @@ /* istanbul ignore file */ +import { Agent as HttpsAgent } from 'node:https'; import { Mutex, Semaphore, SemaphoreInterface, withTimeout } from 'async-mutex'; import { AxiosError, AxiosInstance, AxiosRequestConfig, AxiosResponse } from 'axios'; import { Cacheable, CacheableMemory, Keyv } from 'cacheable'; @@ -186,6 +187,7 @@ export class Fetcher { ...requestConfig?.headers, }, ...(proxyUrl && this.getProxyConfig(proxyUrl)), + ...(!proxyUrl && { httpsAgent: new HttpsAgent({ rejectUnauthorized: false }) }), url: finalUrl.href, timeout: this.DEFAULT_TIMEOUT, transformResponse: [data => data], @@ -364,9 +366,12 @@ export class Fetcher { let proxyConfig = this.proxyConfig.get(proxyUrl.href); if (!proxyConfig) { + const httpsAgent = proxyUrl.protocol === 'socks5:' ? new SocksProxyAgent(proxyUrl) : new HttpsProxyAgent(proxyUrl); + httpsAgent.options.rejectUnauthorized = false; + proxyConfig = { httpAgent: proxyUrl.protocol === 'socks5:' ? new SocksProxyAgent(proxyUrl) : new HttpProxyAgent(proxyUrl), - httpsAgent: proxyUrl.protocol === 'socks5:' ? new SocksProxyAgent(proxyUrl) : new HttpsProxyAgent(proxyUrl), + httpsAgent, proxy: false, };