mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 15:08:25 +00:00
Add Bun bundle docs and Telegram grammY support
This commit is contained in:
7
src/telegram/proxy.ts
Normal file
7
src/telegram/proxy.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
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 as any), dispatcher: agent } as RequestInit);
|
||||
}
|
||||
Reference in New Issue
Block a user