agent.d.ts 666 B

12345678910111213141516171819202122
  1. /// <reference types="node" />
  2. import net from 'net';
  3. import { Agent, ClientRequest, RequestOptions } from 'agent-base';
  4. import { SocksProxyAgentOptions } from '.';
  5. /**
  6. * The `SocksProxyAgent`.
  7. *
  8. * @api public
  9. */
  10. export default class SocksProxyAgent extends Agent {
  11. private lookup;
  12. private proxy;
  13. private tlsConnectionOptions;
  14. constructor(_opts: string | SocksProxyAgentOptions);
  15. /**
  16. * Initiates a SOCKS connection to the specified SOCKS proxy server,
  17. * which in turn connects to the specified remote host and port.
  18. *
  19. * @api protected
  20. */
  21. callback(req: ClientRequest, opts: RequestOptions): Promise<net.Socket>;
  22. }