finki-main
main
|
Last change
on this file since 62b2964 was 81bc7da, checked in by Klimentina Efremova <klimentina08642@…>, 3 months ago |
|
Initial commit
|
-
Property mode
set to
100644
|
|
File size:
1.3 KB
|
| Line | |
|---|
| 1 | /// <reference types="node" />
|
|---|
| 2 | import { SocksProxy } from 'socks';
|
|---|
| 3 | import { Agent, ClientRequest, RequestOptions } from 'agent-base';
|
|---|
| 4 | import { AgentOptions } from 'agent-base';
|
|---|
| 5 | import { Url } from 'url';
|
|---|
| 6 | import net from 'net';
|
|---|
| 7 | import tls from 'tls';
|
|---|
| 8 | interface 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 | }
|
|---|
| 19 | interface SocksProxyAgentOptionsExtra {
|
|---|
| 20 | timeout?: number;
|
|---|
| 21 | }
|
|---|
| 22 | export interface SocksProxyAgentOptions extends AgentOptions, BaseSocksProxyAgentOptions, Partial<Omit<Url & SocksProxy, keyof BaseSocksProxyAgentOptions>> {
|
|---|
| 23 | }
|
|---|
| 24 | export 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 | }
|
|---|
| 38 | export {};
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.