Skip to content

Use osdns for cross-platform DNS management #41

Description

@orielhaim

Hi i noticed Splitway currently handles system DNS integration itself, including resolvectl on Linux and /etc/resolver on macOS, together with the apply/revert logic around those changes

I maintain osdns a Rust crate built specifically to make this layer reusable for VPNs, split-tunnel clients, mesh networks, and similar networking software

It provides a cross-platform API for system DNS configuration and currently supports Linux, Windows, and macOS, including systemd-resolved, NetworkManager, resolvconf/openresolv, direct /etc/resolv.conf, Windows IP Helper/NRPT, and macOS SystemConfiguration

More importantly, it handles the harder lifecycle details around DNS state: transactional apply/restore, read-back verification, ownership tracking, external modifications, crash recovery, native change watching, and split-DNS routing domains

For Splitway, I think this could replace a good portion of the platform-specific DNS plumbing and let the project focus on its actual split-tunneling policy instead of maintaining OS-specific resolver behavior and shelling out to platform tools

osdns is already used in production by Tunnet, a Rust mesh networking project, so it is being exercised against real VPN-style workloads and edge cases. I also intend to keep maintaining it as a standalone crate, with the goal of making this kind of DNS integration shared infrastructure instead of something every networking project has to reimplement

If this sounds useful, I'd be happy to help with the integration or add anything Splitway currently needs that the crate does not yet expose

Repo: https://github.com/orielhaim/osdns
Docs: https://docs.rs/osdns

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions