[Libwebsockets] example to use http/https proxy using libwebsockets

Andy Green andy at warmcat.com
Mon Aug 18 14:54:57 CEST 2014



On 18 August 2014 20:29:28 GMT+08:00, Subi S S <subi.s at cambiumnetworks.com> wrote:
>Hi ,
>
>Is there any example available on how to use proxy ? Whether SSL over
>proxy is supported ?
>
>I tried using libwebsocket_set_proxy  and using  packet capture
>(wireshark)
>I can see CONNECT request is going for SSL  and HTTP 1.1 200 Connection
>established coming
>From proxy server

Sorry when I wrote the proxy stuff I did test it by installing a local proxy on a Linux box.  But I don't remember testing SSL.

>But client code  sample is failing with
>
>[410228:1890] DEBUG: Proxy read returned EAGAIN... retrying
>[410228:1890] DEBUG: Proxy read returned EAGAIN... retrying
>[410228:1890] DEBUG: Proxy read returned EAGAIN... retrying
>[410228:1891] DEBUG: Proxy read returned EAGAIN... retrying
>[410228:1891] DEBUG: Proxy read returned EAGAIN... retrying
>[410228:1891] DEBUG: Proxy read returned EAGAIN... retrying
>[410228:1892] DEBUG: Proxy read returned EAGAIN... retrying
>[410228:1892] DEBUG: Proxy read returned EAGAIN... retrying
>[410228:1892] DEBUG: Proxy read returned EAGAIN... retrying
>[410228:1892] DEBUG: Proxy read returned EAGAIN... retrying
>[410228:1892] DEBUG: Proxy read returned EAGAIN... retrying
>[410228:1892] DEBUG: Proxy read returned EAGAIN... retrying
>[410228:1892] DEBUG: Proxy read returned EAGAIN... retrying
>[410228:1892] DEBUG: Proxy read returned EAGAIN... retrying
>[410228:1893] DEBUG: Proxy read returned EAGAIN... retrying
>[410228:1893] DEBUG: Proxy read returned EAGAIN... retrying
>[410228:1893] DEBUG: Proxy read returned EAGAIN... retrying
>[410228:1893] DEBUG: Proxy read returned EAGAIN... retrying
>[410228:1893] DEBUG: Proxy read returned EAGAIN... retrying
>[410228:1893] DEBUG: Proxy read returned EAGAIN... retrying
>[410228:1893] DEBUG: Proxy read returned EAGAIN... retrying
>[410228:1893] DEBUG: Proxy read returned EAGAIN... retrying
>[410228:1893] DEBUG: Proxy read returned EAGAIN... retrying
>[410228:1901] DEBUG: close: just_kill_connection

Basically 5s timeout because it didn't hear anything.

Did you confirm if it's still OK with HTTP through the proxy?

-Andy

>[410228:1901] INFO: remove_wsi_socket_from_fds: wsi=0x9617618, sock=6,
>fds pos=1
>[410228:1902] DEBUG: not calling back closed
>[410228:1904] ERR: ERROR proxy: HTTP/1.1 200
>
>
>Thanks,
>Subi
>
>
>
>
>
>------------------------------------------------------------------------
>
>_______________________________________________
>Libwebsockets mailing list
>Libwebsockets at ml.libwebsockets.org
>http://ml.libwebsockets.org/mailman/listinfo/libwebsockets




More information about the Libwebsockets mailing list