-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
This results in GithubDownloader being very slow in China Mainland without a proper proxy! I can now only get it download through Cloudflare WARP (as it creates a virtual network interface directly).
A working example is to add a dispatcher on fetch:
import {ProxyAgent} from 'undici';
(async () => {
const res = await fetch('https://api.ipify.org?format=json', {
dispatcher: new ProxyAgent('http://127.0.0.1:16619')
});
const data = await res.json();
// shows my proxy server's IP
console.log(data);
})();See https://stackoverflow.com/questions/72534539/node-js-18-3-native-fetch-request-with-a-proxy
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels