TooTallNate / proxy-agents

Node.js HTTP Proxy Agents Monorepo
https://proxy-agents.n8.io
944 stars 243 forks source link

Engine.io-client not using the custom agent #97

Closed Bojack92160 closed 1 year ago

Bojack92160 commented 4 years ago

I'm using engine.io client in primus with the electron framework. I want to use a proxy, therefore I use https-proxy-agent, but it keep connecting directly instead of through the proxy. Here is what I have done:

let module = {
      transport: { //in primus, options for the specific transformer are put here
        agent: new HttpsProxyAgent(url.parse('http://Username:Pswd@IP:Port')),
        forceNode: true //because I use electron
      },
      strategy: "disconnect,timeout",
      reconnect: {
        max: 5000,
        min: 500,
        retries: 10
      }
    }

primus = new Primus(Myurl, module);

I don't get a message error or anything

That's weird because I can make the custom agent work when I do a simple http request for example.

TooTallNate commented 1 year ago

This module has gone through a large refactor and modernization. I am closing this issue as a bit of house cleaning. If you feel that this issue still exists in the latest release, feel free to open a new issue.