// Copyright Abridged, Inc. 2023,2024. All Rights Reserved. // Node module: @collabland/common // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT import {HttpsProxyAgent} from 'https-proxy-agent'; import {getEnvVar} from './env.js'; export * from 'cross-fetch'; export function getProxyAgent(options: RequestInit = {method: 'get'}) { const proxyUrl = getEnvVar('PROXY_AGENT_URL')!; const proxyAgent = new HttpsProxyAgent(proxyUrl); return proxyAgent; }