astro-ghostcms/.pnpm-store/v3/files/b2/15c9b38b0185a4ed96ebd88c621...

33 lines
959 B
Plaintext
Raw Permalink Normal View History

2024-02-14 14:10:47 +00:00
import type * as http from "node:http";
import type * as https from "node:https";
import type * as undici from "undici";
export type ProxyOptions = {
/**
* HTTP(s) Proxy URL
*
* Default is read from `https_proxy`, `http_proxy`, `HTTPS_PROXY` or `HTTP_PROXY` environment variables
* */
url?: string;
/**
* List of hosts to skip proxy for (comma separated or array of strings)
*
* Default is read from `no_proxy` or `NO_PROXY` environment variables
*
* Hots starting with a leading dot, like `.foo.com` are also matched against domain and all its subdomains like `bar.foo.com`
*/
noProxy?: string | string[];
};
export declare const createProxy: (opts?: ProxyOptions) => {
agent: http.Agent | https.Agent | undefined;
dispatcher: undici.Dispatcher | undefined;
};
export declare const createFetch: (
proxyOptions?: ProxyOptions,
) => typeof globalThis.fetch;
export declare const fetch: typeof globalThis.fetch;