mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-11-16 19:36:54 +00:00
9 lines
381 B
TypeScript
9 lines
381 B
TypeScript
import { HttpsProxyAgent } from 'https-proxy-agent'
|
|
import { getProxyForUrl } from 'proxy-from-env'
|
|
|
|
/** Node's https.get ignores proxy env vars; resolve them only for update API requests. */
|
|
export function updateCheckAgent(url: string): HttpsProxyAgent<string> | undefined {
|
|
const proxyUrl = getProxyForUrl(url)
|
|
|
|
return proxyUrl ? new HttpsProxyAgent(proxyUrl) : undefined
|
|
}
|