Possible to use socket.io to connect to another server?

Connection refused sounds more like the issue is on your server side rather than the Twitch/Extension/Rig side, but I could be wrong. Does the server accept secure connections? Does it need CORS enabled? I don’t personally have a lot of experience with using sockets in extensions but my template has socketio and it works fine, you can take a look at it here: https://github.com/xzion/twitch-extension-demo

I don’t think AJAX or websockets connections require you to whitelist the domains in the extension config but you could try that as well (Manage -> Extension Capabilities)