proxy-agents icon indicating copy to clipboard operation
proxy-agents copied to clipboard

Setting "family:4" is required on some hardware

Open Atheryl opened this issue 9 months ago • 0 comments

Some hardware will pick IPV6 instead of IPV4 when setting a localAddress.

const opts = { host: host.replace(/^\[|\]$/g, ''), port, localAddress }; debug.proxyRequest('connecting to proxy target %o', opts); const target = net.connect(opts);

Should be

const opts = { host: host.replace(/^\[|\]$/g, ''), port, localAddress, family: {family (4 or 6)} }; debug.proxyRequest('connecting to proxy target %o', opts); const target = net.connect(opts);

I'll see to do a PR later.

Atheryl avatar May 27 '24 05:05 Atheryl