lndpytools icon indicating copy to clipboard operation
lndpytools copied to clipboard

Consider adding proxy flag for scripts doing 1ml lookups

Open dmp1ce opened this issue 2 years ago • 4 comments

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.

dmp1ce avatar Apr 22 '22 23:04 dmp1ce

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.

Gridflare avatar Apr 25 '22 16:04 Gridflare

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.

dmp1ce avatar Apr 26 '22 00:04 dmp1ce

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.

Gridflare avatar Apr 26 '22 01:04 Gridflare

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.

dmp1ce avatar Apr 26 '22 11:04 dmp1ce