-
Notifications
You must be signed in to change notification settings - Fork 105
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
Explain PEX for .onion addresses #57
Comments
To add new kind of connection (ipv6 or i2p) we need to modify these:
+ Modify AnnounceZero and Bootstrapper plugin to store and send new kind of peer addresses. So it's not extendable easily... |
I made a pull request (#64) and it is merged. The PEX packet is much more flexible than I expect. Let me propose the PEX encoding for IPv6 addresses and Next-generation onion services. IPv6 address in PEX: A packed IPv6 address is an element in the Next-generation (v3) onion address in PEX: A next-generation onion address is an element in the You can vote below. If this gets enough votes, we can make this spec official. Recipe for parsing and packing IPv6 addresses (Python 3) >>> import ipaddress
>>> ipaddress.IPv6Address
<class 'ipaddress.IPv6Address'>
>>> ipv6 = ipaddress.IPv6Address("::1")
>>> ipv6.packed
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01'
>>> len(ipv6.packed)
16
>>> ipaddress.IPv6Address(ipv6.packed)
IPv6Address('::1')
>>> ipv4 = ipaddress.IPv4Address('8.8.8.8')
>>> ipv4.packed
b'\x08\x08\x08\x08'
>>> len(ipv4.packed)
4 |
Sounds great for me. Still have to decide if we should pack next-gen onion addresses to "peers_onion" node and ipv6 ones to "peers" or separate ones. |
Does ZeroNet put onion peers in PEX requests? There should be a https://zeronet.readthedocs.io/en/latest/help_zeronet/network_protocol/#pex-site-peers-need |
Yes, thanks, added! |
Explain PEX for .onion addresses. If we get more organized we can figure out how to implement IPv6 peer exchange.
The text was updated successfully, but these errors were encountered: