Start9Labs / cln-startos

wrapper for building c-lightning.s9pk
Other
7 stars 11 forks source link

Clams Remote Websocket #126

Closed farscapian closed 7 months ago

farscapian commented 8 months ago

These changes add a websocket interface dedicated to Clams Remote. This interface listens on the LAN and has a dedicated onion address (written to /root/.lightning/start9/clamsRemoteWebsocketTorAddress in container) listening at port 7272 (http for onion). CLN is configured via the '--bind-addr=ws::7272' method. The "Clams Remote Websocket URI" is surfaced as a property. A configuration item to turn off the service is placed under "Advanced->Clams Remote" (off by default).

These changes are needed to support connections by Clams Remote. That team will be submitting the Clams Remote package to Start9 after they have evaluated the solution.

Special thanks to @chrisguida for helping with concept and getting this whole thing started, and for providing excellent advice! This project is the result of the Bitcoin++ Buenos Aires Hackathon project, which won the Best User Experience prize.

farscapian commented 7 months ago

I've updated this branch with two commits.

What's not in these updates is my attempt to expose the "Clams Remote Websocket URI" property (currently in Core Lightning) as a property in Clams Remote. It involved adding volume mounts and communicating sensitive data (including rune) which I didn't feel comfortable with. I would really prefer Clams Remote remain a standalone webserver with minimal privileges... This means the user will have to visit the Core Lightning service to access the correct information (websocket connection URI (property) and Core Lightning Rune (action)) to get Clams Remote configured in their browser.