Skip to content

Conversation

@oooo-ps
Copy link

@oooo-ps oooo-ps commented Jul 19, 2025

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.

…yggdrasil_mode`, apply latest auto fmt (to changed files), minor tests optimization
@ufm
Copy link
Contributor

ufm commented Jul 19, 2025

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.

@oooo-ps
Copy link
Author

oooo-ps commented Jul 19, 2025

@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

@oooo-ps
Copy link
Author

oooo-ps commented Jul 19, 2025

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.

@oooo-ps oooo-ps mentioned this pull request Jul 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants