Skip to main content

Integration Adapters

Integration adapters output proxy configuration in the exact format required by each tool. Instead of learning each library's proxy configuration quirks, call the appropriate method on your connection object and pass the result directly to your tool.

Available integration adapters

AdapterMethodReturnsBest for
PlaywrightasPlaywright(){ server, username?, password? }Browser automation with Chromium, Firefox, WebKit
PuppeteerasPuppeteer()['--proxy-server=...']Headless Chrome automation
SeleniumasSelenium()'--proxy-server=...'Cross-browser testing
AxiosasAxiosConfig(){ proxy: false, httpAgent, httpsAgent }Promise-based HTTP requests
gotasGotOptions(){ agent: { http, https } }Human-friendly HTTP requests
fetchasUndiciFetch()Proxy-enabled fetch functionModern fetch-style requests
Node.js HTTPasNodeAgents(){ http: Agent, https: Agent }Low-level HTTP clients
undiciasUndiciDispatcher()undici.DispatcherHigh-performance HTTP client

Usage Examples

See the Use Connection document for detailed examples.

Behavior by operating mode

The Aluvia client supports two operating modes:

  • Client proxy mode (default): The SDK runs a local proxy on 127.0.0.1. Your tools connect to this local proxy, which handles routing and keeps gateway credentials internal.
  • Gateway mode: No local proxy. Your tools connect directly to gateway.aluvia.io with embedded credentials.

Integration adapters behave differently depending on which mode you use:

AdapterClient proxy modeGateway mode
asPlaywright(){ server } (local proxy){ server, username, password }
asPuppeteer()Local proxy URLGateway URL (requires auth handling)
asSelenium()Local proxy URLGateway URL (requires auth handling)
asAxiosConfig()Agents pointing to local proxyAgents with embedded credentials
asGotOptions()Agents pointing to local proxyAgents with embedded credentials
asUndiciFetch()Fetch via local proxyFetch via gateway with credentials
asNodeAgents()Agents pointing to local proxyAgents with embedded credentials
asUndiciDispatcher()Dispatcher via local proxyDispatcher via gateway with credentials

In client proxy mode (default), credentials stay internal to the SDK. In gateway mode, some adapters include credentials in the returned configuration.

More resources