L2-Technology / sensei

A lightning node implementation for everyone
https://l2.technology/sensei
Other
198 stars 39 forks source link

better handling of hosts display and loopback detection #48

Closed johncantrell97 closed 2 years ago

johncantrell97 commented 2 years ago

Before this we were replacing the node host with 127.0.0.1 in the web admin. This leaves the host ip as detected by the public_ip crate but adds a check when connecting to a peer to see if the peer has the same ip as the host. If so it connects to the host on 127.0.0.1. I hope this fixes the umbrel issue if it being hardcoded to 127.0.0.1.

It might not though since umbrel uses umbrel.local -- though I think that just maps back to localhost anyway. Worth a test.

If this doesn't work then we should probably add a configuration option for manually setting the host and use that instead of relying on public_ip crate.