feat: initial release v0.3.0
This commit is contained in:
8
lib/prompts/proxy.ts
Normal file
8
lib/prompts/proxy.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
|
||||
export async function setProxy() {
|
||||
if (process.env.PROXY_URL) { // If you are in China, you must use this proxy:
|
||||
const { setGlobalDispatcher, ProxyAgent } = await import("undici");
|
||||
const proxyAgent = new ProxyAgent(process.env.PROXY_URL);
|
||||
setGlobalDispatcher(proxyAgent);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user