Skip to content

Commit 19cc89d

Browse files
committed
added dist
1 parent d064c48 commit 19cc89d

11 files changed

Lines changed: 2733 additions & 1 deletion

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
/node_modules
22
/yarn.lock
33
/?.?s
4-
/dist
4+
#/dist

dist/agent.d.ts

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
/// <reference types="node" />
2+
import net from 'net';
3+
import { Agent, ClientRequest, RequestOptions } from 'agent-base';
4+
import { HttpsProxyAgentOptions } from '.';
5+
/**
6+
* The `HttpsProxyAgent` implements an HTTP Agent subclass that connects to
7+
* the specified "HTTP(s) proxy server" in order to proxy HTTPS requests.
8+
*
9+
* Outgoing HTTP requests are first tunneled through the proxy server using the
10+
* `CONNECT` HTTP request method to establish a connection to the proxy server,
11+
* and then the proxy server connects to the destination target and issues the
12+
* HTTP request from the proxy server.
13+
*
14+
* `https:` requests have their socket connection upgraded to TLS once
15+
* the connection to the proxy server has been established.
16+
*
17+
* @api public
18+
*/
19+
export default class HttpsProxyAgent extends Agent {
20+
private secureProxy;
21+
private proxy;
22+
constructor(_opts: string | HttpsProxyAgentOptions);
23+
/**
24+
* Called when the node-core HTTP client library is creating a
25+
* new HTTP request.
26+
*
27+
* @api protected
28+
*/
29+
callback(req: ClientRequest, opts: RequestOptions): Promise<net.Socket>;
30+
}

dist/agent.js

Lines changed: 177 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/agent.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.d.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/// <reference types="node" />
2+
import net from 'net';
3+
import tls from 'tls';
4+
import { Url } from 'url';
5+
import { AgentOptions } from 'agent-base';
6+
import { OutgoingHttpHeaders } from 'http';
7+
import _HttpsProxyAgent from './agent';
8+
declare function createHttpsProxyAgent(opts: string | createHttpsProxyAgent.HttpsProxyAgentOptions): _HttpsProxyAgent;
9+
declare namespace createHttpsProxyAgent {
10+
interface BaseHttpsProxyAgentOptions {
11+
headers?: OutgoingHttpHeaders;
12+
secureProxy?: boolean;
13+
host?: string | null;
14+
path?: string | null;
15+
port?: string | number | null;
16+
}
17+
export interface HttpsProxyAgentOptions extends AgentOptions, BaseHttpsProxyAgentOptions, Partial<Omit<Url & net.NetConnectOpts & tls.ConnectionOptions, keyof BaseHttpsProxyAgentOptions>> {
18+
}
19+
export type HttpsProxyAgent = _HttpsProxyAgent;
20+
export const HttpsProxyAgent: typeof _HttpsProxyAgent;
21+
export {};
22+
}
23+
export = createHttpsProxyAgent;

dist/index.js

Lines changed: 14 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/parse-proxy-response.d.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/// <reference types="node" />
2+
import { Readable } from 'stream';
3+
export interface ProxyResponse {
4+
statusCode: number;
5+
buffered: Buffer;
6+
}
7+
export default function parseProxyResponse(socket: Readable): Promise<ProxyResponse>;

dist/parse-proxy-response.js

Lines changed: 67 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)