Ride-The-Lightning / c-lightning-REST

REST APIs for Core Lightning written with node.js
MIT License
119 stars 43 forks source link

Allow specifying the binding address #151

Closed 1ma closed 1 year ago

1ma commented 1 year ago

This PR introduces a new option BIND to select the API binding address.

Its default value (::) makes it backwards compatible: https://nodejs.org/api/net.html#serverlistenport-host-backlog-callback

If host is omitted, the server will accept connections on the unspecified IPv6 address (::)
when IPv6 is available, or the unspecified IPv4 address (0.0.0.0) otherwise.

In most operating systems, listening to the unspecified IPv6 address (::) may cause the
net.Server to also listen on the unspecified IPv4 address (0.0.0.0).

Fixes #84

ekzyis commented 1 year ago

Thank you! I was just looking for this since I want to run my infra inside a VPN where I need to specify the bind address.

ekzyis commented 1 year ago

tACK 567e07284dca5aabad1ab56197699197a17fd079

saubyk commented 1 year ago

@1ma please note that the file plugin.js has now been renamed to clrest.js, as this was a requirement for the reckless plugin manager on core lightning