Page 1 of 1

getting client ip when connected through bluebox

Posted: 31 Mar 2008, 14:25
by Eirik81
I have a custom login extension and need to get the ip address (for security purposes) of the client that is trying to log in. The following works when the client connects normally:

Code: Select all

function handleInternalEvent(evt)
{
   if (evt.name == "loginRequest")
   {
      var chan = evt["chan"];
      var ip = chan.socket().getInetAddress().getHostAddress();
   }
}

But it fails when the client connects through the bluebox. Is there a way to get the client ip that works with the bluebox?

Posted: 02 Apr 2008, 09:30
by Lapo
Unfortunately no, the BlueBoxed users will all appear to be connected from the localhost.
This is also explained in the BlueBox f.a.q.