Node.js
Route fetch through Proxy Charm with undici’s ProxyAgent.
Setup
-
Copy credentials from the dashboard
Sign in to Proxy Charm and open Proxies. Copy the host, port, username, and password for your workspace.
-
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()); -
Confirm the exit
Log the response text and compare it to the dashboard exit IP.