nbd-wtf / trustedcoin

A lightningd plugin that replaces bitcoind with trusted public explorers.
MIT License
61 stars 15 forks source link

Add basic support for proxy #19

Open seberm opened 1 year ago

seberm commented 1 year ago

Get the proxy configuration from clightning configuration file and use it for all http/https connections.

We need to proxy all http/https trustedcoin connections via Tor in a nix-bitcoin project, see the PR here:

We currently set the Environment="HTTPS_PROXY=socks5://127.0.0.1:9050" and Environment="HTTP_PROXY=socks5://127.0.0.1:9050" env variables in a clightning systemd service configuration as a workaround:

fiatjaf commented 1 year ago

Looks good. Should I merge?

seberm commented 1 year ago

Hello @fiatjaf, we need to get the proxy value from the configuration provided by init method.

I think that this is not supported in current lightningd-gjson-rpc version. That's why I created this PR:

Please, let me know, what you think, feel free to make any changes. The golang is not my strong suit.

fiatjaf commented 1 year ago

Merged that one and published as v1.6.2.