Files
openclaw/src/telegram/proxy.ts
2025-12-08 01:48:53 +01:00

8 lines
264 B
TypeScript

import { ProxyAgent } from "undici";
export function makeProxyFetch(proxyUrl: string): typeof fetch {
const agent = new ProxyAgent(proxyUrl);
return (input: RequestInfo | URL, init?: RequestInit) =>
fetch(input, { ...(init ?? {}), dispatcher: agent });
}