Upon connecting to a proxy with user:pass it's all good, but when I try to make a request to an proxy which is IP authenticated, I get 'SocketError: other side closed'.
I'm not sending the proxy-authorization header as it's not needed.
Blanked the proxy ip and port below.
var Client = require('undici');
(async ()=>{
const client = new Client("http://proxyip:proxyport")
const response = await client.request({
method: 'GET',
path: 'https://api.ipify.org?format=json',
headers: {
//'proxy-authorization': `Basic ${Buffer.from(':').toString('base64')}`
}
})
response.body.setEncoding('utf8')
let data = ''
for await (const chunk of response.body) {
data += chunk
}
//
console.log(response.statusCode)
console.log(JSON.parse(data))
client.close()
})();
Upon connecting to a proxy with user:pass it's all good, but when I try to make a request to an proxy which is IP authenticated, I get 'SocketError: other side closed'.
I'm not sending the proxy-authorization header as it's not needed.
Blanked the proxy ip and port below.