[Libwebsockets] session reclaim on network change

Mirko Brankovic mirkobrankovic at gmail.com
Mon Aug 17 16:10:51 CEST 2020


Thanks Andy,
I suspected something like that, just wanted to make sure, I guess it is a
application layer that needs to take care of it.

Regards,
Mirko

On Mon, Aug 17, 2020 at 3:58 PM <andy at warmcat.com> wrote:

>
>
> On August 17, 2020 1:52:04 PM UTC, Mirko Brankovic <
> mirkobrankovic at gmail.com> wrote:
> >Hi,
> >Maybe a noobish question and probably what I seek is impossible, but
> >maybe
> >someone already know about it.
> >Is it possible in any way to re-claim the ws session once user Network
> >settings are changed? Like user enabling/disabling VPN or switching
> >Wifi/Cable connection, so client source IP changing.
> >
> >I think because of the security reasons it is not possible, since it
> >would
> >be considered as connection hijacking but maybe there can be some
> >server challenge that client needs to answer correctly to re-claim?
>
> The connection at tcp level has had it, because it's bound to specific
> source and destination ip addresses / ports.  Eventually the server will
> observe a tcp close and that's reflected in a wsi close.
>
> But if a 'session' is some longer-lived thing in your application, you can
> paint the client with a random http session cookie, and understand if you
> see it come again it should be treated as a new ws connection to the same
> logical session the cookie owner was bound to on his previous connection.
>
> -Andy
>
> >Thanks,
>


-- 
Regards,
Mirko
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://libwebsockets.org/pipermail/libwebsockets/attachments/20200817/2fe6bc56/attachment.htm>


More information about the Libwebsockets mailing list