[Libwebsockets] [libwebsockets] #95: Reading client IPAddress within library

Trac trac at libwebsockets.org
Thu Nov 27 01:28:09 CET 2014


#95: Reading client IPAddress within library
-----------------------------------+------------------------
 Reporter:  Shantanuk              |      Owner:
     Type:  task                   |     Status:  new
 Priority:  major                  |  Milestone:  milestone1
Component:  libwebsockets library  |    Version:  1.0
 Keywords:                         |
-----------------------------------+------------------------
 Hello,

 I want to authenticate websocket calls to protect it from external
 attacks. I have below two queries
 1. Is there any way to get the IP Address of the client machine from where
 the WebSocket request is initiated? I want to read IP address within
 libwebsocket library.
 2. I have custom security token which I want to pass to websocket at the
 time of handshake. Is there any way to pass token from Javascript when
 WebSocket is initialised? As per my knowledge we can only pass websocket
 url and optional protocall. Can we pass token as querystring to websocket
 url?

 Please clarify.

 Thanks,
 Shantanu

--
Ticket URL: <http://libwebsockets.org/trac/libwebsockets/ticket/95>
libwebsockets <http://libwebsockets.org>
libwebsockets C library



More information about the Libwebsockets mailing list