mirror of
https://github.com/certd/certd.git
synced 2026-04-14 20:40:53 +08:00
fix: 修复ipv6未开启情况下,请求带有ipv6地址域名报ETIMEDOUT的bug
This commit is contained in:
@@ -207,6 +207,14 @@ export type CreateAgentOptions = {
|
||||
httpsProxy?: string;
|
||||
} & nodeHttp.AgentOptions;
|
||||
export function createAgent(opts: CreateAgentOptions = {}) {
|
||||
opts = merge(
|
||||
{
|
||||
autoSelectFamily: true,
|
||||
autoSelectFamilyAttemptTimeout: 2000,
|
||||
},
|
||||
opts
|
||||
);
|
||||
|
||||
let httpAgent, httpsAgent;
|
||||
const httpProxy = opts.httpProxy || process.env.HTTP_PROXY || process.env.http_proxy;
|
||||
if (httpProxy) {
|
||||
|
||||
Reference in New Issue
Block a user