oxen-io / lokinet

Lokinet is an anonymous, decentralized and IP based overlay network for the internet.
https://lokinet.org/
GNU General Public License v3.0
1.72k stars 220 forks source link

make ipv6 snapp protocol message type be able to carry ip4 as well #2059

Open majestrate opened 1 year ago

majestrate commented 1 year ago

right now we have a snapp protocol message type for only ip4 and another for only ip6, this makes it difficult to allow users to do ipv6 internally if they want to as we can really only easily use one or the other but not both.

we can allow ipv6 packets with src and dst being ipv4 mapped addresses be converted into ipv4 packets when going to the os and conversely transform ipv4 packets read from the os into ipv6 with ip4 mapped addresses.

this would additionally help consolidate any duplicate code paths.