PythonMonkey icon indicating copy to clipboard operation
PythonMonkey copied to clipboard

Support HTTP proxy for XHR

Open Xmader opened this issue 7 months ago • 1 comments

const xhr = new XMLHttpRequest();
xhr.open('GET', 'http://example.com');
...
// Set HTTP proxy
xhr.proxy = 'http://localhost:5001';

xhr.send();

Xmader avatar May 26 '25 16:05 Xmader

How do you think we should enable the HTTP proxy? Environment variable? Can we support proxy.pac files somehow? How do we do authentication? Proxies sometimes use basic, but often use digest. Can we also support SOCKS5 easily?

The way the Node.js XHR does this is completely insane, so let's not copy that.

Maybe an argument to the XHR constructor?

wesgarland avatar Jun 03 '25 12:06 wesgarland