Modal.Proxy reference
Source:
packages/modal/src/Proxy.ts
A Modal Proxy: static egress IPs for Sandboxes and Functions. Traffic from
a sandbox created with proxy leaves from these IPs, so a database or API
can allowlist them.
Proxies are a Modal Team plan feature. Modal proxies have no tags; ownership is inferred from Alchemy state.
Proxy: Creating a Proxy
Section titled “Proxy: Creating a Proxy”One static IP
import * as Modal from "@alchemy.run/modal";
export const Egress = Modal.Proxy("Egress", {});Two IPs in a region
import * as Modal from "@alchemy.run/modal";
export const Egress = Modal.Proxy("Egress", { region: "us-east-1", ips: 2 });Proxy: Routing a Sandbox through it
Section titled “Proxy: Routing a Sandbox through it”const sandbox = yield* sandboxes.create({ proxy: egress });