Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for connecting to a remote node over Tor #363

Closed
stepansnigirev opened this issue Sep 6, 2020 · 5 comments · Fixed by #383
Closed

Add support for connecting to a remote node over Tor #363

stepansnigirev opened this issue Sep 6, 2020 · 5 comments · Fixed by #383
Labels
enhancement New feature or request

Comments

@stepansnigirev
Copy link
Collaborator

Connecting to a bitcoin core over Tor would be nice to have.
Same for block explorer url.
Probably can be done with requests sessions.
See for example https://stackoverflow.com/questions/42971622/fetching-a-onion-domain-with-requests

@ChristopherA
Copy link

ChristopherA commented Sep 6, 2020

We have a new tutorial on Tor in “Learning Bitcoin from the Command Line”: https://github.com/BlockchainCommons/Learning-Bitcoin-from-the-Command-Line/blob/master/14_0_Using_Tor.md

I also recommend you support QuickConnect https://github.com/BlockchainCommons/Gordian/blob/master/Docs/Quick-Connect-API.md and some initial thoughts on QuickConnect 2.0 BlockchainCommons/Gordian#66 cc: @Fonta1n3

@stepansnigirev
Copy link
Collaborator Author

stepansnigirev commented Sep 8, 2020

Looks good, thanks!
Do you know if there is a way to install Tor service on Windows? Linux and MacOS work nicely, but I didn't figure out how to do it on Windows...

@Fonta1n3
Copy link

Fonta1n3 commented Sep 8, 2020

Looks good, thanks!

Do you know if there is a way to install Tor service on Windows? Linux and MacOS work nicely, but I didn't figure out how to do it on Windows...

https://github.com/Fonta1n3/FullyNoded/blob/master/Docs/Tor/Tor.md#Windows-10

C:\Tor\tor.exe --service install -options -f "C:\Tor\torrc"

@stepansnigirev
Copy link
Collaborator Author

That's awesome! Thanks a lot for the link!

@vindard
Copy link

vindard commented Nov 8, 2020

That's awesome! Thanks a lot for the link!

@stepansnigirev I'm still having problems connecting to my remote node's Bitcoin RPC via Tor on Windows (on remote node I've already setup a Hidden Service that I can successfully connect to from an Ubuntu box using Specter Desktop)

I've gotten as far as the following on Windows:

  • edit torrc to add the line ControlPort 9051
  • go to control panel -> network & internet -> internet options -> connection -> lan setting and tick Use a proxy... and then use the address and port as 127.0.0.1 and 9051 (see here)

This gets me as far as this on Specter Desktop now when I test the connection but I can't seem to move ahead any further:

image


Edit 1: Figured it out

I was previously trying to connect to Specter by piggybacking on the Tor service that gets started up when the Tor browser runs (I'd open a Tor browser and then open Specter to connect).

The fix was to instead use the Expert Bundle available at their downloads page (and suggested in FullyNoded guide above) instead and to simply double-click the tor.exe file within that zip file to have an active Tor service before running Specter.

Additionally Tor can also be configured as a persistent service


Edit 2: Alternative Tor install

Turns out you can also get tor through Chocolatey if that's already installed:

$ choco install tor 
$ tor -service install

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
5 participants