Skip to content

Commit

Permalink
plugins/wss-proxy: Plugin included in core lightning
Browse files Browse the repository at this point in the history
  • Loading branch information
ShahanaFarooqui authored and rustyrussell committed Apr 21, 2024
1 parent c0d59fe commit 720af34
Show file tree
Hide file tree
Showing 5 changed files with 117 additions and 5 deletions.
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -717,7 +717,7 @@ clean: obsclean

PYLNS=client proto testing
# See doc/contribute-to-core-lightning/contributor-workflow.md
update-py-versions: update-pyln-versions update-clnrest-version update-poetry-lock
update-py-versions: update-pyln-versions update-clnrest-version update-wss-proxy-version update-poetry-lock

update-pyln-versions: $(PYLNS:%=update-pyln-version-%)

Expand All @@ -734,8 +734,12 @@ update-clnrest-version:
@if [ -z "$(NEW_VERSION)" ]; then echo "Set NEW_VERSION!" >&2; exit 1; fi
cd plugins/clnrest && $(MAKE) upgrade-version

update-wss-proxy-version:
@if [ -z "$(NEW_VERSION)" ]; then echo "Set NEW_VERSION!" >&2; exit 1; fi
cd plugins/wss-proxy && $(MAKE) upgrade-version

update-poetry-lock:
poetry update clnrest pyln-client pyln-proto pyln-testing
poetry update clnrest wss-proxy pyln-client pyln-proto pyln-testing

update-mocks: $(ALL_TEST_PROGRAMS:%=update-mocks/%.c)

Expand Down
8 changes: 8 additions & 0 deletions doc/lightningd-config.5.md
Original file line number Diff line number Diff line change
Expand Up @@ -664,6 +664,14 @@ authenticate to the Tor control port.

Creates a whitelist of trusted content sources that can run on a webpage and helps mitigate the risk of attacks. Default CSP is `default-src 'self'; font-src 'self'; img-src 'self' data:; frame-src 'self'; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline';`.

* **wss-bind-addr**=*\[IPADDRESS\[:PORT\]\]|SOCKETPATH|HOSTNAME\[:PORT\]* [plugin `wss-proxy.py`]

Sets the WSS address.

* **wss-certs**=*PATH* [plugin `wss-proxy.py`]

Defines the path for WSS cert & key. Default path is same as RPC file path to utilize gRPC/clnrest's client certificate. If it is missing at the configured location, new identity (`client.pem` and `client-key.pem`) will be generated.

### Lightning Plugins

lightningd(8) supports plugins, which offer additional configuration
Expand Down
3 changes: 2 additions & 1 deletion plugins/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@ C_PLUGINS := \
plugins/spenderp

PY_PLUGINS := \
plugins/clnrest/clnrest
plugins/clnrest/clnrest \
plugins/wss-proxy/wss-proxy

ifeq ($(HAVE_SQLITE3),1)
C_PLUGINS += plugins/sql
Expand Down
102 changes: 100 additions & 2 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ python = "^3.8"
pyln-client = { path = "contrib/pyln-client", develop = true }
pyln-proto = { path = "contrib/pyln-proto", develop = true }
clnrest = { path = "plugins/clnrest", develop = true }
wss-proxy = { path = "plugins/wss-proxy", develop = true }
Mako = "^1.1.6"
websocket-client = "^1.2.3"
grpcio-tools = "^1"
Expand Down

0 comments on commit 720af34

Please sign in to comment.