Author

Topic: How to setup Armory to work while Bitcoin Core runs through Tor (Read 107855 times)

hero member
Activity: 533
Merit: 500
^Bitcoin Library of Congress.
This setup does not seem to work on Mac OS.  Having followed the above guidance, Bitcoin Core returns the following error on launch:

"Cannot parse configuration file: the options configuration file contains an invalid line '{\rtf\ansi\ansicpg1252\cocoartf1343\cocoasubrtf160'.Only use key=value syntax"

...and then quits out of the launch process.

Answer for those who come after me (thanks to key help from picobit):

The Mac OS text editor is setup to operate with rich text and if one changes the bitcoin file extension to .conf from .rtf it won't change the format of the content, thus generating the above reported error.  Thus one must:

1.  Set TextEdit for plain text in the New Document pane of TextEdit preferences AND...
2.  Open the Save dialog, choose Customize Encoding List from the drop-down menu for Plain-Text Encoding, add Western (ASCII) as an option, and choose that option for saving the bitcoin.conf file in Users//Library/Application Support/Bitcoin

The bitcoin.conf file you create/edit with TextEdit should contain the (ASCII) text suggested by the OP in the first post of this thread.  
Nice work! Cheesy  I have added the relevant information to the how to. Cool
hero member
Activity: 533
Merit: 500
^Bitcoin Library of Congress.
I you only have
Code:
listen=1
in your bitcoin.conf file then Bitcoin Core won't be connecting through Tor.  Can you explain what you mean by "can't sync for some reason"?  Also, are you able to get Bitcoin Core running with Tor if you're not using Armory?
newbie
Activity: 15
Merit: 0
I replaced listen=1 with port=8333 in bitcoin.conf as port serves the same purpose as listen but only listens on port 8333.

After a couple another day of testing and experimenting I find that if I use the full text in your original post above Bitcoin Core goes online when you open up Armory (and only then), but can't sync for some reason.  Whereas if you just use:

listen=1

as the full text of your bitcoin.conf file Bitcoin Core goes online when Armory is open and everything syncs up.

Mac OSX 10.10.1
Tor Browser Bundle 4.0
Bitcoin-Qt 0.9.3.0
Armory 0.92.3-beta



newbie
Activity: 15
Merit: 0
There has been some discussion in the "Armory - Discussion Thread" on how to setup Armory to work while Bitcoin Core runs through Tor.  However, it has kinda gotten lost in the mountain of info there.  I've noticed some more questions about this subject pop up and thought I'd post a how to here.

...

Let me know if you have any questions, or if this setup does not work for you! Wink

...


This setup does not seem to work on Mac OS.  Having followed the above guidance, Bitcoin Core returns the following error on launch:

"Cannot parse configuration file: the options configuration file contains an invalid line '{\rtf\ansi\ansicpg1252\cocoartf1343\cocoasubrtf160'.Only use key=value syntax"

...and then quits out of the launch process.

Answer for those who come after me (thanks to key help from picobit):

The Mac OS text editor is setup to operate with rich text and if one changes the bitcoin file extension to .conf from .rtf it won't change the format of the content, thus generating the above reported error.  Thus one must:

1.  Set TextEdit for plain text in the New Document pane of TextEdit preferences AND...
2.  Open the Save dialog, choose Customize Encoding List from the drop-down menu for Plain-Text Encoding, add Western (ASCII) as an option, and choose that option for saving the bitcoin.conf file in Users//Library/Application Support/Bitcoin

The bitcoin.conf file you create/edit with TextEdit should contain the (ASCII) text suggested by the OP in the first post of this thread.


   
newbie
Activity: 15
Merit: 0
There has been some discussion in the "Armory - Discussion Thread" on how to setup Armory to work while Bitcoin Core runs through Tor.  However, it has kinda gotten lost in the mountain of info there.  I've noticed some more questions about this subject pop up and thought I'd post a how to here.

...

Let me know if you have any questions, or if this setup does not work for you! Wink

...


This setup does not seem to work on Mac OS.  Having followed the above guidance, Bitcoin Core returns the following error on launch:

"Cannot parse configuration file: the options configuration file contains an invalid line '{\rtf\ansi\ansicpg1252\cocoartf1343\cocoasubrtf160'.Only use key=value syntax"

...and then quits out of the launch process.
hero member
Activity: 533
Merit: 500
^Bitcoin Library of Congress.
I replaced listen=1 with port=8333 in bitcoin.conf as port serves the same purpose as listen but only listens on port 8333.
hero member
Activity: 746
Merit: 502
Looking for advertising deal
Thank you.
Worked like a charm.
I encourage everybody using bitcoin core to do it asap.
hero member
Activity: 533
Merit: 500
^Bitcoin Library of Congress.
1) "C:\Program Files (x86)\Bitcoin\bitcoin-qt.exe" -datadir=d:\BitCoinData (this will allow BitcoinQT to use bitcoin.conf and bitcoin DATA info).

- This needs to be done before configuring TOR network on the main bitcoin setting.

2) Proceed to configure TOR network via bitcoin setting as instructed above.

3) Then via armory shortcut you will need to add satoshi-datadir=d:\BitCoinData (notice "satoshi-datadir") in order to work. Initialization phase will be skipped because BitcoinQT is already running, however it will have to rebuild the database and re-scan transaction history. Then all of the transaction will be done via TOR.

Feel free to add.

It's taking up spaces via appdata.. I don't understand why. It's my intention to have all armory database on a seperate drive as instructed. Ah, nevermind, I just have to add another target.. --datadir=d:\BitCoinDataCache via armory shortcut. That solves my problem! HOORAY!

4) add another target.. --datadir=d:\BitCoinDataCache via armory shortcut (where BitCoinDataCache resides in your Armory directory).

TA-DAH!
These steps are only necessary if you need to use a data directory besides the default.

An easier way to get this to work (assuming you want Bitcoin Core/Bitcoind to run in the background) is to simply:
1) Open Armory
2) Click on File
3) Click on Settings
4) Put the data directory you want Bitcoin Core/Bitcoind to use in the text field labeled "Bitcoin Home Dir"
5) Now close Armory and create a shorcut for it on your desktop
6) Right-Click the shortcut and click properties
7) In the text field labeled "Target:" add --datadir="your_new_data_directory" (no quotes)
Cool Now run Armory!*

*If you have already synced and/or used addresses from your wallet in the existing data directory just copy everything from the existing data directory to the new one before running Armory with the new settings.
hero member
Activity: 533
Merit: 500
^Bitcoin Library of Congress.
Quote
Isn't TOR sock5 port is 9150 instead of 9050 since they changed it?

Not too sure about this anymore. It's something like the Tor bundle uses 9150 and the Tor daemon uses 9050.
This is correct, that's why I specified Tor Broswer Bundle and port 9150 in the how to.

Note: Edited first post to reflect that only Tor Broswer Bundle and Armory need to be opened after initial setup.
sr. member
Activity: 331
Merit: 250
So I should turn it off for it to work or no? And how do I moniter BitcoinQt's traffic? Wireshark?

It isnt necessary turn off bitcoin auto management in Armory as long as you have all your Bitcoin settings set in the bitcoin.conf (as opposed to passing them as command line arguments).

As for traffic, since you're on Windows, you can see what IPs each process connects to through Windows' Resource Monitor, in the Network tab.

Quote
Isn't TOR sock5 port is 9150 instead of 9050 since they changed it?

Not too sure about this anymore. It's something like the Tor bundle uses 9150 and the Tor daemon uses 9050.

So it doesn't matter if I use 9150 or 9050? I assume it's ideal to use 9050 for Bitcoin-Qt. Accoring to the resource monitor: I only see port 9150 and 9151. I don't see 9050.

EDIT: Nevermind, my bitcoinQt was set to 9150 not 9050. Duh. :p
legendary
Activity: 3766
Merit: 1364
Armory Developer
So I should turn it off for it to work or no? And how do I moniter BitcoinQt's traffic? Wireshark?

It isnt necessary turn off bitcoin auto management in Armory as long as you have all your Bitcoin settings set in the bitcoin.conf (as opposed to passing them as command line arguments).

As for traffic, since you're on Windows, you can see what IPs each process connects to through Windows' Resource Monitor, in the Network tab.

Quote
Isn't TOR sock5 port is 9150 instead of 9050 since they changed it?

Not too sure about this anymore. It's something like the Tor bundle uses 9150 and the Tor daemon uses 9050.
sr. member
Activity: 331
Merit: 250
I thought Armory calls Bitcoin Core process and use them when Armory is executed? Thanks.

You can turn that off in File -> Settings, although it is on by default

To confirm its working you need to monitor BitcoinQt's traffic, make sure it all goes through Tor's proxy, which is 127.0.0.1:9050 by default.

As long as you get past that point, all of Bitcoin traffic is now behind Tor. Then it's a matter of getting Armory to connect to BitcoinQt.

So I should turn it off for it to work or no? And how do I moniter BitcoinQt's traffic? Wireshark?

Wireshark doesn't capture localhost, but RawCap.exe does. I capture like 2k packets and I coudln't find anything related to bitcoinQT or maybe I am not looking enough? LMK.

Isn't TOR sock5 port is 9150 instead of 9050 since they changed it?

EDIT:

(Make sure you bind=127.0.0.1 and listen=1 via bitcoin.conf via Armory directory).

1) "C:\Program Files (x86)\Bitcoin\bitcoin-qt.exe" -datadir=d:\BitCoinData (this will allow BitcoinQT to use bitcoin.conf and bitcoin DATA info).

- This needs to be done before configuring TOR network on the main bitcoin setting.

2) Proceed to configure TOR network via bitcoin setting as instructed above.

3) Then via armory shortcut you will need to add satoshi-datadir=d:\BitCoinData (notice "satoshi-datadir") in order to work. Initialization phase will be skipped because BitcoinQT is already running, however it will have to rebuild the database and re-scan transaction history. Then all of the transaction will be done via TOR.

Feel free to add.

It's taking up spaces via appdata.. I don't understand why. It's my intention to have all armory database on a seperate drive as instructed. Ah, nevermind, I just have to add another target.. --datadir=d:\BitCoinDataCache via armory shortcut. That solves my problem! HOORAY!

4) add another target.. --datadir=d:\BitCoinDataCache via armory shortcut (where BitCoinDataCache resides in your Armory directory).

TA-DAH!
legendary
Activity: 3766
Merit: 1364
Armory Developer
I thought Armory calls Bitcoin Core process and use them when Armory is executed? Thanks.

You can turn that off in File -> Settings, although it is on by default

To confirm its working you need to monitor BitcoinQt's traffic, make sure it all goes through Tor's proxy, which is 127.0.0.1:9050 by default.

As long as you get past that point, all of Bitcoin traffic is now behind Tor. Then it's a matter of getting Armory to connect to BitcoinQt.
sr. member
Activity: 331
Merit: 250
How do I confirm this is working? LMK! Thanks!

Sub.

Do I have to manually run these program in order:

1) Tor
2) Bitcoin Core
3) Armory

I thought Armory calls Bitcoin Core process and use them when Armory is executed? Thanks.
hero member
Activity: 533
Merit: 500
^Bitcoin Library of Congress.
There has been some discussion in the "Armory - Discussion Thread" on how to setup Armory to work while Bitcoin Core runs through Tor.  However, it has kinda gotten lost in the mountain of information there.  I've noticed some more questions about this subject pop up and thought I'd post a how to here.

Tor Browser Bundle setup:
1) Download and extract Tor Browser Bundle (no need to change any settings, you can just run Tor Browser Bundle as default)

Bitcoin Core setup:
1) Download and install Bitcoin Core
2) Run Bitcoin Core and deselect "Map port using UPnP" and select "Connect through SOCKS proxy".
3) Make sure you settings match these:  (Proxy IP: 127.0.0.1, Port: 9150, SOCKS Version: 5)
(replaced with some lines in bitcoin.conf to make setup easier)
4) Close Bitcoin Core and wait for the "Bitcoin Core is shutting down..." message to disappear
5) Navigate to the bitcoin data directory (if you don't know where this is look here:https://en.bitcoin.it/wiki/Data_directory)
6) If bitcoin.conf doesn't already exist, create a text file and rename it to bitcoin.conf.  (You may have to show file extensions to make sure you didn't accidentally name the file bitcion.conf.txt.  For windows users follow these steps to show file extensions:http://malektips.com/windows-7-view-file-extensions.html#.U4Dxk1PLfN4 *If you are using a Mac see note below.)
7) Add this code to your bitcoin.conf file:
Code:
bind=127.0.0.1
port=8333
upnp=0
proxy=127.0.0.1:9150

Armory setup:
1) Download and install Armory
2) Open Armory and navigate to File, Settings, Privacy Settings.  Then select "Enable settings for proxies/Tor"
3) Close Armory

Now to run Armory while Bitcoin Core runs through Tor, simply start Tor Browser Bundle, Bitcoin Core, and Armory! Grin

Let me know if you have any questions, or if this setup does not work for you! Wink

WARNING: This setup does not guarantee complete anonymity from Armory, but all external Bitcoin Core traffic should run through Tor.

Edit: Removed Bitcoin Core from the list of programs to run since Bitcoind is automatically run in the background by Armory.
Edit 2: Replaced listen=1 with port=8333 in bitcoin.conf as "port=" serves the same purpose as "listen=" but only listens on port 8333.
Edit 3: Added information involving bitcoin.conf to help Mac users (courtesy of NewBTCGuy).
Edit 4: Changed various instructions to reflect changes in Bitcoin Core and Armory.

*For Mac users:
Answer for those who come after me (thanks to key help from picobit):

The Mac OS text editor is setup to operate with rich text and if one changes the bitcoin file extension to .conf from .rtf it won't change the format of the content.  Thus one must:

1.  Set TextEdit for plain text in the New Document pane of TextEdit preferences AND...
2.  Open the Save dialog, choose Customize Encoding List from the drop-down menu for Plain-Text Encoding, add Western (ASCII) as an option, and choose that option for saving the bitcoin.conf file in Users//Library/Application Support/Bitcoin
Jump to: