talaia-labs / rust-teos

The Eye of Satoshi - Lightning Watchtower
https://talaia.watch
MIT License
128 stars 62 forks source link

Improves tor flag logic in watchtower-plugin #160

Closed sr-gi closed 1 year ago

sr-gi commented 1 year ago

Changes

The watchtower-plugin was specifying a custom tor flag to signal whether Tor may be used by the client. This was due to cln-plugin (v0.1.1-) not allowing plugins to access the CoreLN configuration options and, therefore, our plugin was unable to fetch the proxy / always-use-proxy options.

This fetches the aforementioned options and revamps the logic to comply with the always-use-proxy requirements, that is, if the flag is set all communications must be performed using Tor. Also, it replaces some of the currently used Strings for more meaningful types to store network data (such as AddressType, NetAddress, or ProxyInfo).

This drops our custom watchtower-proxy config option

sr-gi commented 1 year ago

Rebased to squash all changes