What is a Transport?
ATransport is a reusable network context that owns connection pooling and transport-level settings (browser fingerprint, OS emulation, proxy, TLS verification).
Use it when you want connection reuse without creating a full session/client per proxy, e.g. when you have thousands of proxies and want each proxy to keep its own warm pool.
createTransport()
Create a reusable transport.Signature
Options
Proxy URL for all requests made through this transport. Supports HTTP and SOCKS5 proxies.
Browser fingerprint profile to use for this transport.
Operating system to emulate for this transport.
When
true, accepts invalid/self-signed certificates. Use only if you understand the security tradeoffs.Idle timeout for pooled connections (ms).
Maximum number of idle connections kept per host.
Maximum total connections across all hosts for this transport.
TCP connect timeout (ms).
Read timeout (ms).
Using a transport with fetch()
Pass the transport viaRequestInit.transport.
Important: request options that become invalid
When you providetransport, you must not also set browser, os, proxy, or insecure on that request. Those settings are owned by the transport.
Thousands of proxies: recommended pattern
Create one transport per proxy, reuse it for all requests that should go through that proxy, and close transports when you no longer need them.Transport lifecycle
transport.close()
Always close transports you create.transport.closed becomes true and the transport can no longer be used.
Sharing a transport across cookie jars
If you need separate cookie jars but want to reuse a single connection pool (for example, multiple sessions through the same proxy), you can pass the same transport to multipleSession.fetch() calls. Cookies remain isolated by session; the transport is only used for the network layer.