Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

experimental-websocket-port: option to accept websocket connections on additional port. #4685

Merged
merged 5 commits into from
Oct 22, 2021

Commits on Oct 21, 2021

  1. CCAN: add base64 module.

    Signed-off-by: Rusty Russell <[email protected]>
    rustyrussell authored and cdecker committed Oct 21, 2021
    Configuration menu
    Copy the full SHA
    09a1b04 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6e33cc5 View commit details
    Browse the repository at this point in the history
  3. connectd: listen on ports for which we should spawn a proxy.

    If the port is set, we spawn it (lightning_websocketd) on any
    connection to that port.  That means websocketd is a per-peer daemon,
    but it means every other daemon uses the connection normally (it's
    just actually talking to websocketd instead of the client directly).
    
    Signed-off-by: Rusty Russell <[email protected]>
    rustyrussell authored and cdecker committed Oct 21, 2021
    Configuration menu
    Copy the full SHA
    32d22a3 View commit details
    Browse the repository at this point in the history
  4. lightning_websocketd: simple proxy for websockets.

    WebSocket is a bit weird:
    1. It starts like an HTTP connection, but they send special headers.
    2. We reply with special headers, one of which involves SHA1 of one of theirs.
    3. We are then in WebSocket mode, where each frame starts with a 2-20 byte
       header.
    
    We relay data in a simplistic way: if either side sends something, we
    read it and relay it synchronously.  That avoids any gratuitous
    buffering.
    
    Signed-off-by: Rusty Russell <[email protected]>
    rustyrussell authored and cdecker committed Oct 21, 2021
    Configuration menu
    Copy the full SHA
    3678006 View commit details
    Browse the repository at this point in the history
  5. experimental-websocket-port: option to create a WebSocket port.

    Signed-off-by: Rusty Russell <[email protected]>
    rustyrussell authored and cdecker committed Oct 21, 2021
    Configuration menu
    Copy the full SHA
    702d485 View commit details
    Browse the repository at this point in the history