Node.js

Route fetch through Proxy Charm with undici’s ProxyAgent.

Setup

  1. Copy credentials from the dashboard

    Sign in to Proxy Charm and open Proxies. Copy the host, port, username, and password for your workspace.

  2. Create a ProxyAgent

    const { fetch, ProxyAgent } = require("undici");
    
    const agent = new ProxyAgent("http://USERNAME:PASSWORD@zephyr.proxy.rlwy.net:15112");
    
    const response = await fetch("https://api.ipify.org", { dispatcher: agent });
    console.log(await response.text());
  3. Confirm the exit

    Log the response text and compare it to the dashboard exit IP.