mirror of
				https://github.com/ChristopherA/Learning-Bitcoin-from-the-Command-Line.git
				synced 2025-10-31 02:17:24 +00:00 
			
		
		
		
	Merge pull request #213 from prayank23/tor-v3
Replace Tor v2 address with v3
This commit is contained in:
		
						commit
						48667a7bb6
					
				| @ -94,7 +94,7 @@ mgcym6je63k44b3i5uachhsndayzx7xi4ldmwrm7in7yvc766rykz6yd.onion | ||||
| 
 | ||||
| When you have all of that information you can issue a `bitcoin-cli` command using `torify` and specifying the `-rpcconnect` as your onion address, the `-rpcport` as your hidden service port, and the `-rpcpassword` as your password: | ||||
| ``` | ||||
| $ torify bitcoin-cli -rpcconnect=mgcym6je63k44b3i5uachhsndayzx7xi4ldmwrm7in7yvc766rykz6yd.onion -rpcport=1309 -rpcpassword=685316cc239c24ba71fd0969fa55634f getblockcount | ||||
| $ torify bitcoin-cli -rpcconnect=mgcym6je63k44b3i5uachhsndayzx7xi4ldmwrm7in7yvc766rykz6yd.onion -rpcport=1309 -rpcuser=StandUp -rpcpassword=685316cc239c24ba71fd0969fa55634f getblockcount | ||||
| ``` | ||||
| 
 | ||||
| ### Verify Your Tor Setup for Bitcoind | ||||
| @ -104,10 +104,12 @@ Bitcoin Standup also ensures that your `bitcoind` is set up to optionally commun | ||||
| You can verify the initial setup of Tor for `bitcoind` by grepping for "tor" in the `debug.log` in your data directory: | ||||
| ``` | ||||
| $ grep "tor:" ~/.bitcoin/testnet3/debug.log | ||||
| 2020-07-15T17:56:34Z tor: ADD_ONION successful | ||||
| 2020-07-15T17:56:34Z tor: Got service ID zbyqk2tmq4c4vzeo, advertising service zbyqk2tmq4c4vzeo.onion:18333 | ||||
| 2020-07-15T17:56:34Z tor: Cached service private key to /home/standup/.bitcoin/testnet3/onion_private_key | ||||
| 2021-06-09T14:07:04Z tor: ADD_ONION successful | ||||
| 2021-06-09T14:07:04Z tor: Got service ID vazr3k6bgnfafmdpcmbegoe5ju5kqyz4tk7hhntgaqscam2qupdtk2yd, advertising service vazr3k6bgnfafmdpcmbegoe5ju5kqyz4tk7hhntgaqscam2qupdtk2yd.onion:18333 | ||||
| 2021-06-09T14:07:04Z tor: Cached service private key to /home/standup/.bitcoin/testnet3/onion_v3_private_key | ||||
| ``` | ||||
| > :information_source: **NOTE:** Bitcoin Core does not support v2 addresses anymore. Tor v2 support was removed in [#22050](https://github.com/bitcoin/bitcoin/pull/22050) | ||||
| 
 | ||||
| > **TESTNET vs MAINNET:** Mainnet `bitcoind` responds on port 8333, testnet on port 18333. | ||||
| 
 | ||||
| You can verify that a Tor hidden service has been created for Bitcoin with the `getnetworkinfo` RPC call: | ||||
| @ -127,14 +129,14 @@ $ bitcoin-cli getnetworkinfo | ||||
|       "score": 1 | ||||
|     }, | ||||
|     { | ||||
|       "address": "zbyqk2tmq4c4vzeo.onion", | ||||
|       "address": "vazr3k6bgnfafmdpcmbegoe5ju5kqyz4tk7hhntgaqscam2qupdtk2yd.onion", | ||||
|       "port": 18333, | ||||
|       "score": 4 | ||||
|     } | ||||
|   ], | ||||
| ... | ||||
| ``` | ||||
| This shows three addresses to access your Bitcoin server, an IPv4 address (`173.255.245.83`), an IPv6 address (`2600:3c01::f03c:92ff:fe86:f26`), and a Tor address (`zbyqk2tmq4c4vzeo.onion`). | ||||
| This shows three addresses to access your Bitcoin server, an IPv4 address (`173.255.245.83`), an IPv6 address (`2600:3c01::f03c:92ff:fe86:f26`), and a Tor address (`vazr3k6bgnfafmdpcmbegoe5ju5kqyz4tk7hhntgaqscam2qupdtk2yd.onion`). | ||||
| 
 | ||||
| > :warning: **WARNING:** Obviously: never reveal your Tor address in a way that's associated with your name or other PII! | ||||
| 
 | ||||
| @ -191,12 +193,12 @@ You can see similar information with `getnetworkinfo`. | ||||
|       "score": 1 | ||||
|     }, | ||||
|     { | ||||
|       "address": "zbyqk2tmq4c4vzeo.onion", | ||||
|       "address": "vazr3k6bgnfafmdpcmbegoe5ju5kqyz4tk7hhntgaqscam2qupdtk2yd.onion", | ||||
|       "port": 18333, | ||||
|       "score": 4 | ||||
|     } | ||||
|   ], | ||||
|   "warnings": "Warning: unknown new rules activated (versionbit 28)" | ||||
|   "warnings": "" | ||||
| } | ||||
| ``` | ||||
| This hidden service will allow anonymous connections to your `bitcoind` over the Bitcoin Network. | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user