Find a file
2025-01-06 00:05:16 +01:00
src fix: follow environment log level 2025-01-06 00:05:16 +01:00
.envrc init 2024-12-24 17:20:59 +01:00
.gitignore init 2024-12-24 17:20:59 +01:00
Cargo.lock fix: follow environment log level 2025-01-06 00:05:16 +01:00
Cargo.toml fix: follow environment log level 2025-01-06 00:05:16 +01:00
example.json feat: allow for empty matches 2025-01-05 15:08:16 +01:00
flake.lock init 2024-12-24 17:20:59 +01:00
flake.nix fix: splice 2025-01-01 21:02:07 +01:00
Readme.md feat: remove tokio 2025-01-01 20:19:37 +01:00

MDNS Relay

You ever wanted to split your network into multiple indepented ones, while still being able to find your printer or join a spotify session in another network? Then this project is for you.

The purpose of this program is to relay multicast DNS (mDNS) packets between multiple private networks. Existing solution, such a avahi allow you to do this as well but only unconditionally, relaying all questions and answers, with this you can decide what queries get relayed and which get blocked.

Usage

mdns-relay -c <config> where config is a json file containing these options:

{
    "interfaces": "A regex used to filter interfaces on which to listen, to exclude for example the public net or VPNs completely",
    // A list of rules to be applied to incoming packages
    "rules" : [
        {
            "from": "A regex to match the incoming interface",
            "to": "The exact name of the interface to which matching packets will be relayed",
            "allow_questions": "Regex matching any questions",
            "allow_answers": "Regex matching any answers",
        }
    ]
}

To apply a rule has to either have a single matching question or answer.