Implement `mycelium_mode` option
According to #384
I'm using this branch for Yggdrasil + Mycelium networks. Details in the commit description.
Sorry about the autofmt, but I think it's required anyway, according to the new version, also #385
It's important to note that I've changed the yggdrasil_only option to yggdrasil_mode, as it is now being used as the pair. This branch may be merged in a future major release, as it requires a configuration update. For now, we can keep the legacy option, though I'm not sure if it is really necessary.
By the way, I would like to upgrade the codebase to the 2024 edition.
UPD. Perhaps the regex option is a better solution in this case, as it is neither the first IPv6 network nor the last.
How about we also add support for cjdns? And then five more different systems that will eventually show up? :)
P.S. In reality, something like accepted_nets with a list of network masks would make more sense. Just a more universal solution.
@ufm about CJDNS, I'm not using it and don't know how to test it.
Thoughts about the regex option, or perhaps a network range parser. I don't like the current filter implementation (hardcoded OR logic), but I made this PR just because I'm using this branch for now so sharing it with others as is.
If you really want this network, we can try to play with octal address bytes: https://github.com/Revertron/Alfis/blob/master/src/commons/mod.rs#L110
Found this crate, maybe it's better solution for simple (and stable) filtering from the config string: https://crates.io/crates/iprange
Not sure about the performance only, because it uses deserealization.