tntim96 / JSCover

JSCover is a JavaScript Code Coverage Tool that measures line, branch and function coverage
GNU General Public License v2.0
399 stars 84 forks source link

Server mode deny external connection #181

Closed Shnitzelil closed 9 years ago

Shnitzelil commented 9 years ago

Hey,

We're using JSCover in Server mode but recently we tried to access to the server from other machine. My guess is that the JSCover listen to the localhost. is it possible to add option to listen to all interfaces (e.g. 0.0.0.0)?

tntim96 commented 9 years ago

The relevant code in WebDaemon is

serverSocket = new ServerSocket(configuration.getPort());

...which under the hood calls

  public ServerSocket(int port) throws IOException {
    this(port, 50, (InetAddress)null);
  }

...which has documentation:

If bindAddr is null, it will default accepting connections on any/all local addresses

Can you double check?

Shnitzelil commented 9 years ago

You're absolutely right, if you use null it should listen to all local address. Sadly I was failed to access to JSCover in Server mode from remote machine. I'll continue to investigate this from my side and update you.

Thanks

On Thu, Jan 29, 2015 at 11:14 PM, tntim96 notifications@github.com wrote:

The relevant code in WebDaemon is

serverSocket = new ServerSocket(configuration.getPort());

...which under the hood calls

public ServerSocket(int port) throws IOException { this(port, 50, (InetAddress)null); }

...which has documentation http://docs.oracle.com/javase/7/docs/api/java/net/ServerSocket.html#ServerSocket(int,%20int,%20java.net.InetAddress) :

If bindAddr is null, it will default accepting connections on any/all local addresses

Can you double check?

— Reply to this email directly or view it on GitHub https://github.com/tntim96/JSCover/issues/181#issuecomment-72105286.

Kobi Gana קובי גנה

tntim96 commented 9 years ago

Thanks for the update