Published on: 2012-06-27T19:51:08+00:00
The discussion revolves around the possibility of incorporating tor binaries into bitcoin software to automatically create a Tor Hidden Service for users. However, it is assumed that the bitcoin user has already taken care of this aspect. The conversation also touches upon the use of IPv6 addresses and why not use .onion addresses directly. It is suggested that using IPv6 addresses is simpler than managing onions, i2p's, etc. throughout the code and private bitcoin p2p mesh.While the use of onioncat, GarliCat, or Phantom may not conflict with bitcoin's use of IPv6 mapping, configuring bitcoin to use Tor or I2P proxy ports may seem odd when one can dump the IPv6 traffic to the OS stack after setting up the *Cat shims and Phantom. It is important to note that onioncat is not used in bitcoin, and the connections are regular Tor hidden service connections, not the more risky and low-performance IP in TCP onioncat connections.Although there have been some nodes with onion:8333 and possibly some on I2P prior to this work, they could only be used as -connect or -addnode seeds with additional host setup. Therefore, the incorporation of tor binaries within the bitcoin software would provide a simpler and complete solution.In June 2012, Pieter Wuille discussed exchanging and relaying addresses via the P2P network using the fd87:d87e:eb43::/48 IPv6 range. Andy Parkins suggested using bits from the addr.services to store address families such as AF_INET, AF_INET6, AF_CUSTOM_TOR, and leaving space for a few more. These address families would only use four bits out of the mostly unused 64 bits.In an email exchange on June 26, 2012, grarpamp proposed including the block of the Phantom project for people who use overlay networks that are routable but use private space. There was also a suggestion to add blocks to the IsRoutable check. It was noted that while these blocks may not be expected to be routable, people may still have interfaces, routing tables, and packet filters on their machines configured with up to all three of those networks for specific purposes.The hidden service support in Bitcoin uses a compatible IPv6 mapping with Onioncat, but it is important to clarify that it is not Onioncat, does not use Onioncat, does not need Onioncat, and would not benefit from Onioncat. The Onioncat style advertisement is used because the protocol already relays IPv6 addresses. The connections are regular Tor hidden service connections, not the more risky and low performance IP in TCP onioncat connections.The Phantom project has reused the fd87:d87e:eb43::/48 IPv6 range to map each address in an 80-bit range to an onion address and treat it as belonging to a separate network. This network range is the same as used by the OnionCat application but is not utilized in any way. Other clients can use the test case 5wyqrzbvrdsumnok.onion == FD87:D87E:EB43:edb1:8e4:3588:e546:35ca, which involves decoding the base32 onion address and storing the resulting 80 bits of data as the low-order bits of an IPv6 address, prefixed by fd87:d87e:eb43:. Since this range is not routable, there should be no compatibility issues.Furthermore, the Phantom project has provided blocks for other similar projects, including fd00:2522:3493::/48 and fd60:db4d:ddb5::/48 for garlicat on I2P. While these blocks are not expected to be routable, some people may have interfaces, routing tables, and packet filters on their machines configured with up to all three networks for specific purposes.The Bitcoin Core team has merged Tor hidden service support in mainline, allowing users to run a hidden service bitcoin node and connect to other bitcoin hidden services via a Tor proxy. This feature is expected to be included in the 0.7 release. Each address in the fd87:d87e:eb43::/48 IPv6 range is mapped to an onion address and treated as belonging to a separate network. Other clients wishing to implement similar functionality can use the test case 5wyqrzbvrdsumnok.onion == FD87:D87E:EB43:edb1:8e4:3588:e546:35ca. The conversion simply involves decoding the base32 onion address and storing the resulting 80 bits of data as the low-order bits of an IPv6 address, prefixed by fd87:d87e:eb43:. This range is part of the RFC4193 Unique Local IPv6 range, which is normally not globally routable.
Updated on: 2023-08-01T03:44:02.492397+00:00