source: node_modules/socks-proxy-agent/dist/index.d.ts@ 81bc7da

finki-main main
Last change on this file since 81bc7da was 81bc7da, checked in by Klimentina Efremova <klimentina08642@…>, 3 months ago

Initial commit

  • Property mode set to 100644
File size: 1.3 KB
RevLine 
[81bc7da]1/// <reference types="node" />
2import { SocksProxy } from 'socks';
3import { Agent, ClientRequest, RequestOptions } from 'agent-base';
4import { AgentOptions } from 'agent-base';
5import { Url } from 'url';
6import net from 'net';
7import tls from 'tls';
8interface BaseSocksProxyAgentOptions {
9 /**
10 * hostname is preferred over host
11 *
12 * @deprecated
13 */
14 host?: string | null;
15 port?: string | number | null;
16 username?: string | null;
17 tls?: tls.ConnectionOptions | null;
18}
19interface SocksProxyAgentOptionsExtra {
20 timeout?: number;
21}
22export interface SocksProxyAgentOptions extends AgentOptions, BaseSocksProxyAgentOptions, Partial<Omit<Url & SocksProxy, keyof BaseSocksProxyAgentOptions>> {
23}
24export declare class SocksProxyAgent extends Agent {
25 private readonly shouldLookup;
26 private readonly proxy;
27 private readonly tlsConnectionOptions;
28 timeout: number | null;
29 constructor(input: string | SocksProxyAgentOptions, options?: SocksProxyAgentOptionsExtra);
30 /**
31 * Initiates a SOCKS connection to the specified SOCKS proxy server,
32 * which in turn connects to the specified remote host and port.
33 *
34 * @api protected
35 */
36 callback(req: ClientRequest, opts: RequestOptions): Promise<net.Socket>;
37}
38export {};
Note: See TracBrowser for help on using the repository browser.