getting client ip when connected through bluebox
Posted: 31 Mar 2008, 14:25
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:
But it fails when the client connects through the bluebox. Is there a way to get the client ip that works with the bluebox?
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?