Skip to content

No HTTPS nor HTTP proxies work whatsoever on socket.io-client , running out of patience #5349

Open
@Jy738

Description

@Jy738

Describe the bug
I've tried three seperate nodejs HTTP proxy agent libraries. They seem to work fine without issue, however, not a single actual Proxy URL works with socket.io-client within NodeJS.

To Reproduce

Please fill the following code example:

Socket.IO server version: 1.4.5

No server

Socket.IO client version: 1.4.5

Client

const io = require('socket.io-client');
const { ProxyAgent } = require('proxy-agent');

const socketServerUrl = 'https://bonzi.gay';
const proxyUrl = 'https://proxyurl:port'; 

const proxyAgent = new ProxyAgent(proxyUrl);

const socket = io(socketServerUrl, {
  agent: proxyAgent,
  rejectUnauthorized:false,
  transports: ['polling', 'websocket'],

});

setInterval(() => {console.log(socket.connected)},2000);

Expected behavior
The socket should be connecting but never fucking does for whatever reason. I've tried a text file with 200 different proxies, NOTHING!!!!!

Platform:

  • Device: PC, 16 GB ram, some 2017 gpu idk, amd ryzen 5 5600x
  • OS: Windows 11 on latest update

Metadata

Metadata

Assignees

No one assigned

    Labels

    to triageWaiting to be triaged by a member of the team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions