1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-17 16:53:34 +00:00

native fetch with proxy support on node api

This commit is contained in:
Kyle Spearrin
2019-06-24 11:07:26 -04:00
parent 6d82fb5bbc
commit bc5a6e02c1
8 changed files with 78 additions and 14 deletions

25
src/globals.d.ts vendored
View File

@@ -1,3 +1,28 @@
declare function escape(s: string): string;
declare function unescape(s: string): string;
declare module 'duo_web_sdk';
// From: https://github.com/TooTallNate/node-https-proxy-agent/issues/27
declare module 'https-proxy-agent' {
import * as https from 'https'
namespace HttpsProxyAgent {
interface HttpsProxyAgentOptions {
host: string
port: number
secureProxy?: boolean
headers?: {
[key: string]: string
}
[key: string]: any
}
}
// HttpsProxyAgent doesnt *actually* extend https.Agent, but for my purposes I want it to pretend that it does
class HttpsProxyAgent extends https.Agent {
constructor(opts: string)
constructor(opts: HttpsProxyAgent.HttpsProxyAgentOptions)
}
export = HttpsProxyAgent
}