Open protectivedad opened 7 years ago
The base version of lighttpd here is very old (approaching 4 years old).
The next version of lighttpd (to be lighttpd 1.4.46) adds support for mod_proxy to recognize Upgrade: websocket and to act as transparent proxy. (https://github.com/lighttpd/lighttpd1.4/)
However, lighttpd 1.4.46 mod_proxy will not act as a websocket endpoint, which is one option in the patches applied here in https://github.com/mkschreder/juci-lighttpd/commit/23644e8f150baac0aa5199a6820234d8e7898231. Further details can be found in comment I made on https://github.com/nori0428/mod_websocket/pull/46
If you can provide a websocket proxy to orangerpcd local port from /websocket/ url on the web server, any webserver will work.
On 21 May 2017 19:27, "Glenn Strauss" notifications@github.com wrote:
The base version of lighttpd here is very old (approaching 4 years old).
The next version of lighttpd (to be lighttpd 1.4.46) adds support for mod_proxy to recognize Upgrade: websocket and to act as transparent proxy. ( https://github.com/lighttpd/lighttpd1.4/)
However, lighttpd 1.4.46 mod_proxy will not act as a websocket endpoint, which is one option in the patches applied here in 23644e8 https://github.com/mkschreder/juci-lighttpd/commit/23644e8f150baac0aa5199a6820234d8e7898231. Further details can be found in comment I made on nori0428/mod_websocket#46 https://github.com/nori0428/mod_websocket/pull/46
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mkschreder/juci-lighttpd/issues/1#issuecomment-302950587, or mute the thread https://github.com/notifications/unsubscribe-auth/AERqiVH2Z2jhZ9tVfQ-dE6j6Zg6iHwDhks5r8HQBgaJpZM4L3PL4 .
From a quick glance, it does not appear as if orangerpcd speaks the websockets protocol. It appears that orangerpcd expects JSON input/output. In that case, orangerpcd needs the web server in front of it act as websockets endpoint. Is this the case?
No orangerpcd is a websocket server. You can connect to it directly if the port is exposed to the frontend running in your browser. However to get it tunneled over the same port 80 connection juci uses lighttpd to set up an endpoint at /websocket/ url that just gets forwarded to orangerpcd. This also allows to have ssl on the frontend etc (however localhost connection to orangerpcd is not encrypted).
Here is the websocket server implementation in orangerpcd: https://github.com/mkschreder/orangerpcd/blob/master/src/orange_ws_server.c
On 21 May 2017 20:37, "Glenn Strauss" notifications@github.com wrote:
From a quick glance, it does not appear as if orangerpcd speaks the websockets protocol. It appears that orangerpcd expects JSON input/output. In that case, orangerpcd needs the web server in front of it act as websockets endpoint. Is this the case?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/mkschreder/juci-lighttpd/issues/1#issuecomment-302954503, or mute the thread https://github.com/notifications/unsubscribe-auth/AERqieyzUvuV8fjTU6NnhfZlrRMrH7FHks5r8IRzgaJpZM4L3PL4 .
..orangerpcd just uses a very simple text based websocket stream, contents of which is jsonrpc messages separated by a newline character. It does not bother about any more advanced websocket features because these can easily be added on the frontend facing the client that can be a fully functional websocket webserver that tunnels contents of the client connection to the orangerpcd instance running on the box.
On 21 May 2017 22:45, "Martin Schroeder" mkschreder.uk@googlemail.com wrote:
No orangerpcd is a websocket server. You can connect to it directly if the port is exposed to the frontend running in your browser. However to get it tunneled over the same port 80 connection juci uses lighttpd to set up an endpoint at /websocket/ url that just gets forwarded to orangerpcd. This also allows to have ssl on the frontend etc (however localhost connection to orangerpcd is not encrypted).
Here is the websocket server implementation in orangerpcd: https://github. com/mkschreder/orangerpcd/blob/master/src/orange_ws_server.c
On 21 May 2017 20:37, "Glenn Strauss" notifications@github.com wrote:
From a quick glance, it does not appear as if orangerpcd speaks the websockets protocol. It appears that orangerpcd expects JSON input/output. In that case, orangerpcd needs the web server in front of it act as websockets endpoint. Is this the case?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/mkschreder/juci-lighttpd/issues/1#issuecomment-302954503, or mute the thread https://github.com/notifications/unsubscribe-auth/AERqieyzUvuV8fjTU6NnhfZlrRMrH7FHks5r8IRzgaJpZM4L3PL4 .
lighttpd git master (https://github.com/lighttpd/lighttpd1.4/) now contains a new module, mod_wstunnel which acts as a websocket tunnel endpoint, forwarding the decoded data to a backend socket server. I would be interested in getting feedback if this works for you with orangerpcd. Thanks.
juci-lighttpd is based on a very old version of lighttpd and is missing more than a few important bug fixes.
With commit 513e407b064ea169241e019e5b9d92d5d905a856 to https://github.com/lighttpd/lighttpd1.4/ I believe https://github.com/mkschreder/juci-lighttpd/ is obsolete. I posted a simple config for using noVNC with lighttpd and x11vnc to https://redmine.lighttpd.net/boards/2/topics/7600
Would you please test lighttpd git master with orangerpcd to confirm that it works?
With IPV6 turned off it doesn't like line 442 UNUSED(addrs_left); I just deleted it.
As an aside this code is fairly old now is there a way to update it? Can you engineer a patch to use on newer lighttpd to use the current version? How much modification was there? EDIT Just read someone else had this issue 8+ months ago. Here's a quilt patch. 010-fix_unused_variable.patch.txt