> ## Documentation Index
> Fetch the complete documentation index at: https://traceryn.online/llms.txt
> Use this file to discover all available pages before exploring further.

# Proxies and custom fetch

> Route a Pinto client through your own proxy by injecting a custom fetch.

Route a client through your own egress IP by injecting a `fetch`:

```ts theme={null}
import { createPinto } from "@traceryn/pinto";
import { ProxyAgent, fetch as undiciFetch } from "undici";

const agent = new ProxyAgent("http://user:pass@proxy-host:8080");

const pinto = createPinto({
  fetch: (url, init) => undiciFetch(url, { ...init, dispatcher: agent }),
});
```

[Media downloads](https://traceryn.online/pinto/media.md) use the same injected `fetch`, so the whole client egresses from one identity.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.