[Libwebsockets] getting remote_addr

Andy Green andy at warmcat.com
Wed Jan 27 01:21:15 CET 2016



On January 27, 2016 7:13:32 AM GMT+08:00, Danomi Czaski <djczaski at gmail.com> wrote:
>I'm proxying websocket connections through Nginx to my libwebsocket
>server. How can I get the remote_addr of the connection?
>_WSI_TOKEN_CLIENT_PEER_ADDRESS doesn't seem to be set.

Can you use tcpdump or so to capture what headers nginx passes through to lws?

Lws can know the peer address at tcp level but that will just always be the nginx proxy in your case.  But nginx is probably informing lws in the headers somewhere.

-Andy

>_______________________________________________
>Libwebsockets mailing list
>Libwebsockets at ml.libwebsockets.org
>http://ml.libwebsockets.org/mailman/listinfo/libwebsockets




More information about the Libwebsockets mailing list