Skip to content

proxy.connect configuration for webserver #16

@KugelschreiberY

Description

@KugelschreiberY

Hi there,
thank you for offering this nice piece of code. I am trying to use socket.io-proxy while developing a web application behind a corporate proxy.

Expected Behavior

When using socket.io I can simply call

var express = require('express');
var app = express(); 
var ip = require("ip");

var io =('socket.io')(app.listen(port, ip.address()));

to run the server. Hence I'd expect something like

var proxy = require('socket.io-proxy')
proxy.init(http://myproxy)
var io = proxy.connect(app.listen(port, ip.address()))

to do the same using socket.io-proxy.

Current Behavior

I get the following error

url.js:103
    throw new TypeError('Parameter "url" must be a string, not ' + typeof url);

Please note that I am developing all this on a windows machine.

Possible Solution

I also tried to hardcode the IP address i.e. using
var io = proxy.connect(http://ip_in_use:port)
this didn't work either.

I guess I am only missing something really simple here. Thanks in advance for the helpt!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions