mynodebtc / mynode

The easiest way to run Bitcoin and Lightning!
Other
645 stars 147 forks source link

Whirpool GUI over TOR #449

Open atom686 opened 3 years ago

atom686 commented 3 years ago

Currently it's impossible to use Whirpool GUI if you are not on a local network.

It would be nice to be able to connect to Whirpool GUI over the TOR.

tehelsper commented 3 years ago

It actually should be possible. Port 8899 is available via tor using the onion url most services use and can be found on the Tor page. I'll add it to the list in the next update.

atom686 commented 3 years ago

Nevertheless, it doesn't work. "Connection failed: Could not connect to CLI (may take a few seconds to start...)"

tehelsper commented 3 years ago

Are you using Windows? I had heard there was a tor issue with whirlpool on Windows at some point due to a firewall.

It works fine on my Linux machine.

Also, try using tor browser to visit https://:8899 - the service is running fine if it responds with an API error message.

atom686 commented 3 years ago

I'm using Mac.

Here's what I get when visiting through browser: "Whitelabel Error Page

This application has no explicit mapping for /error, so you are seeing this as a fallback. Sun Feb 28 20:56:01 CST 2021 There was an unexpected error (type=Forbidden, status=403). Access Denied"

ghost commented 3 years ago

I'm having the same issue on macOS.

Do you need to have a Tor proxy running locally on your machine? I have Tor Browser, but neither socks5://127.0.0.1:9150 nor socks5://127.0.0.1:9050 works. Not sure if that's the issue, but that would be my guess.

tehelsper commented 3 years ago

Yeah, you need tor proxy running. I think tor browser may run a proxy for other apps, but I'm not sure.

Can you try this?

https://kremalicious.com/simple-tor-setup-on-mac-os-x#install-tor

ghost commented 3 years ago

Hmmm, gave that a try and it still doesn't work.

Just to confirm, I'm putting in the https://[...].onion:8899 hidden service URL as the CLI address, socks5://127.0.0.1:9050 as the tor proxy, and my Whirlpool API key.

Jacksper13 commented 2 years ago

I'm struggling with this too... I tried using socks5://127.0.0.1:9050 while running tor, and socks5://127.0.0.1:9150 while running Tor Browser. Both work, because the error passes from "Could not connect to CLI" to "Connection failed: Unexpected token B in JSON at position 0". Running ubuntu 20.04.

Inputting an invalid tor address, or not running the proxies fails with "Connection failed: Could not connect to CLI (may take a few seconds to start...)", so there's something going on in the connection that fails.

Mynode v0.2.53.

Do you think you could look into this? Thanks!

goodluck456 commented 1 year ago

Follow the instructions from this video on how to install it on Ubuntu: https://www.youtube.com/watch?v=Fj94nIrlX60 I first did this on Ubuntu 22.10 on my Sandisk Ultra 32gb USB 3.0 Flash Drive and it worked out great. You can also install whirlpool-gui and whirlpool-client-gui in Windows 10/11. But first, go to Control Panel > Programs > Turn Windows features on and off > Turn on Windows Subsystem for Linux, click Okay and restart the computer. When you reboot and log back in, install Ubuntu from the Microsoft Store. Open Ubuntu and create a username and password. Then change the terminal text editor from nano to vim.basic. Then modify the /etc/sudoers file so your username gets root privileges. You have to add the username below admin user like below syntax. These links show you how to do it: https://stackoverflow.com/questions/47806576/linux-username-is-not-in-the-sudoers-file-this-incident-will-be-reported https://www.digitalocean.com/community/tutorials/how-to-edit-the-sudoers-file If you don't know how to use Vim, this video will show you how to use it: https://www.youtube.com/watch?v=ggSyF1SVFr4 Once you've done that, then do sudo apt-get update followed by sudo apt-get upgrade. You may also have to do sudo apt --fix-broken install to reinstall missing dependencies, especially for whirlpool-gui. Once you've done that, install tor by sudo apt-get install tor. Once you've done all that, just follow along with the video I linked. It'll show you how to install whirlpool-gui and whirlpool-client-cli in a Ubuntu environment. You'll also have to install java, or openjdk to execute the whirlpool-client-cli-0.10.16-run.jar file. Just type java in the terminal and it'll say java isn't installed, but then recommends packages that you can install. I'd just go with the latest like openjdk-11-jre-headless or default-jre. Then open whirlpool-gui (or whirlpool-gui (Ubuntu) in Windows). You should get to the screen where you have to enter the host address, Tor proxy, and API key. You may have to restart the GUI and CLI first. Before you can connect to your wallet, make sure you've executed the whirlpool-client-cli with the java -jar whirlpool-client-cli-0.10.16-run.jar --server=mainnet --tor --auto-mix --mixs-target=0 --listen --init command. It should give you the API key. Then do java -jar whirlpool-client-cli-0.10.16-run.jar --server=mainnet --tor --auto-mix --mixs-target=0 --listen without the --init. You may have to close out Ubuntu, open a new Ubuntu window, and start the process again because in my experience, the wallet just ended up closing, but the process never ended, so I couldn't execute new commands. It's also why whenever I'd open up whirlpool-gui, it'd be on for like 10 secs and then it'd just close out. So that's why you may have to close out Ubuntu, open a new Ubuntu window, and start the process again. Once you executed that command, now you may enter the host address and API key. I usually just do https://127.0.0.1:8899 or https://localhost:8899 and then the API key that the Ubuntu terminal gave you. The API key is also saved in whirlpool-cli-config.properties. You can leave the Tor proxy blank because Tor is already running on port 9050. Enter the passphrase, wait for it to authenticate over Tor, and you should be in and the coins should be mixing 24/7. Hope this helped.

Edit: I recommend just installing and using Whirlpool in Ubuntu if you have it on a flash drive or SSD. In Windows, you'd have to set up a whirlpool.service (so whirlpool mixing runs in the background) and you'd have to use your Ubuntu username, but the problem is whirlpool-gui and whirlpool-client-cli isn't in /home//..., so I'd recommend just doing it in Ubuntu instead.