socket.io-client icon indicating copy to clipboard operation
socket.io-client copied to clipboard

Proxy config

Open augustoeliezer opened this issue 7 years ago • 4 comments

You want to:

  • [ ] report a bug
  • [x] request a feature

Current behaviour

Not implemented.

Expected behaviour

Please add a config option to use with proxy.

var proxy = {
  host: '192.168.0.1',
  port: 8080,
  user: '',
  password: '',
  protocol: 'http:'
};

var socket = require('socket.io-client')('http://localhost', {proxy});
socket.on('connect', function(){});
socket.on('event', function(data){});
socket.on('disconnect', function(){});

Setup

  • OS: Any
  • browser: Any
  • socket.io version: Next

Other information (e.g. stacktraces, related issues, suggestions how to fix)

Old project with [email protected]: https://github.com/stbrenner/socket.io-proxy

augustoeliezer avatar Jun 09 '19 00:06 augustoeliezer

Closed due to inactivity, please reopen if needed.

darrachequesne avatar Feb 02 '21 22:02 darrachequesne

Has there been an update on this?

binarybaron avatar May 31 '24 11:05 binarybaron

@binarybaron no, no work has been done on this subject. Could you please explain your use case?

darrachequesne avatar May 31 '24 15:05 darrachequesne

I want to allow users to route their traffic through TOR (The onion router) and that includes the socket.io connection to the backend.

I have made this work by using the socks-proxy-agent npm package and then passing that in as the agent

binarybaron avatar May 31 '24 15:05 binarybaron