UNPKG

@reclaimprotocol/attestor-core

Version:

<div> <div> <img src="https://raw.githubusercontent.com/reclaimprotocol/.github/main/assets/banners/Attestor-Core.png" /> </div> </div>

23 lines (22 loc) 964 B
import type { CreateTunnelRequest } from '../../proto/api.ts'; import type { Logger } from '../../types/index.ts'; import type { MakeTunnelFn, TCPSocketProperties } from '../../types/index.ts'; type ExtraOpts = Omit<CreateTunnelRequest, 'id' | 'initialMessage'> & { logger: Logger; }; /** * Builds a TCP tunnel to the given host and port. * If a geolocation is provided -- an HTTPS proxy is used * to connect to the host. * If a proxySessionId is provided -- a static ip is used with HTTPS proxy * across multiple requests with this same proxySessionId. * * HTTPS proxy essentially creates an opaque tunnel to the * host using the CONNECT method. Any data can be sent through * this tunnel to the end host. * https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/CONNECT * * The tunnel also retains a transcript of all messages sent and received. */ export declare const makeTcpTunnel: MakeTunnelFn<ExtraOpts, TCPSocketProperties>; export {};