[Libwebsockets] Connecting to websocket server which doesn't use http upgrade mechanism

Lucas Stinchcombe lucasstinchcombe at gmail.com
Fri Jan 24 14:32:53 CET 2020


Hi,

Yes you are right, it was tls tunneled.
After compiling with debug, I can see the http upgrade response in logs.
Will use that to debug for now since I don't know where tls keys are stored
and don't have serverside access.

Thanks,
Lucas

On Fri, Jan 24, 2020 at 12:04 AM Andy Green <andy at warmcat.com> wrote:

>
>
> On 1/23/20 2:55 PM, Lucas Stinchcombe wrote:
> > I'm trying to connect to we websocket url which has the form`wss://...`
> > using the minimal-ws-client-echo. I have a working python example using
> > https://pypi.org/project/websocket_client/. I did some packet capture
> > and noticed that the python implementation (which I have working)
> > doesn't send http requests and seems to establish a websocket connection
> > directly.
>
> I really doubt it... the site says
>
> websocket-client supports only hybi-13.
>
> Hybi was where the ws RFC was developed and used the upgrade method for
> a very long time.
>
> If you're capturing packets and it's in a tls tunnel, I think you have
> mistaken looking at the encrypted traffic for there not being any http
> level action, in fact it's what the encrypted packets are doing at the
> start inside the encrypted tunnel.
>
> > Is there anyway to do this with libwebsockets?
>
> What you were imagining isn't "websockets", and is unlikely to be what
> is happening from your python thing either.
>
> Right thing to do is build lws + the echo example with
> -DCMAKE_BUILD_TYPE=DEBUG and then use, eg, -d1151 to get very verbose
> logging coming and get a clue that way.
>
> Logs on the server side will probably shed some light as well if you
> control that.
>
> -Andy
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://libwebsockets.org/pipermail/libwebsockets/attachments/20200124/a08a7b3d/attachment.htm>


More information about the Libwebsockets mailing list