lndpytools
lndpytools copied to clipboard
Consider adding proxy flag for scripts doing 1ml lookups
When querying the 1ml.com site, it would be nice to use Tor as a proxy for better privacy.
Perhaps a --tor
or --proxy
flag could be allowed for the improvecentrality.py
script.
You should be able to set a proxy for the underlying library through the HTTPS_PROXY and HTTP_PROXY environment variables. https://docs.python-requests.org/en/latest/user/advanced/?highlight=environment#proxies
The script does not query for your own node data, so I consider the privacy risk low.
Do let me know if explicit support is required.
I used HTTP_PROXY="http://localhost:9050" python improvecentrality.py
and it worked well. I wasn't sure if something like this would cause the script to connect to my LND node through Tor as well, which I don't want.
Perhaps an explication in the --help
and README would be enough for other users with my same concern.
Were you able to verify that it was routing the 1ml queries through your proxy?
LND is accessed over gRPC, not HTTP(S), there is no tor or proxy support for it.
Adding this tip to the README is a good idea, I will do so.
Thank you for asking me to double check. The HTTP_PROXY
and HTTPS_PROXY
don't work for Tor. I had to add socks support and use ANY_PROXY
. I added my changes in #15.