const fetch = require('node-fetch');
const ProxyAgent = require('simple-proxy-agent');
fetch('https://example.com', {
agent: new ProxyAgent('http://0.0.0.0:8080', {
tunnel: true,
timeout: 5000,
})
})
.then(res => res.text())
.then(body => console.log(body))
.catch(err => console.error(err))
const fetch = require('node-fetch');
const ProxyAgent = require('simple-proxy-agent');
fetch('https://example.com', {
})
.then(res => res.text())
.then(body => console.log(body))
.catch(err => console.error(err))