mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-24 20:26:24 +00:00
Lazy import proxy-agent
This commit is contained in:
@@ -24,13 +24,15 @@ export function getCertificateAuthority(): string {
|
||||
return config.get('certificateAuthority');
|
||||
}
|
||||
|
||||
export function getGotOptions(): GotOptions {
|
||||
export type { GotOptions };
|
||||
|
||||
export async function getGotOptions(): Promise<GotOptions> {
|
||||
const certificateAuthority = getCertificateAuthority();
|
||||
const proxyUrl = getProxyUrl();
|
||||
const agent = proxyUrl
|
||||
? {
|
||||
http: createProxyAgent(proxyUrl),
|
||||
https: createProxyAgent(proxyUrl),
|
||||
http: await createProxyAgent(proxyUrl),
|
||||
https: await createProxyAgent(proxyUrl),
|
||||
}
|
||||
: {
|
||||
http: new HTTPAgent(),
|
||||
|
||||
Reference in New Issue
Block a user