uxbh / ztdns

DNS server for a ZeroTier virtual network
MIT License
246 stars 50 forks source link

Feature: Support for multiple network IDs #7

Closed EricTendian closed 6 years ago

EricTendian commented 6 years ago

I am on multiple ZeroTier networks where some hosts also share multiple networks with each other. I'd rather not run multiple DNS servers per network ID, but instead have a single server being able to provide DNS answers for a comma-separated list of network IDs.

Here's how I currently have this implemented: https://github.com/uxbh/ztdns/compare/master...EricTendian:multiple-network-ids?expand=1

Right now this is a breaking change as the hostname would change from member.zt to member.networkname.zt, so I'm making this issue to ask for feedback about 1) if this feature would be valuable to others, and 2) how to deal with the breaking change. Perhaps only add the .networkname if more than one ID is specified?

AarynSmith commented 6 years ago

I used your idea for multiple networks but instead of having multiple network ID's coma separates, I moved the network definition to a separate section on the config, allowing for multiple "domains" for each network.

Check out branch multinetwork /uxbh/ztdns/tree/multinetwork and see if this fits your needs. It is currently a breaking change from the old format, but I think it is worth the greater use.

EricTendian commented 6 years ago

@unixblackhole thanks! I just tested out the new version and it works for my needs, I like the ability to set a custom domain rather than just relying on the ZeroTier network name. Looks good to me!

AarynSmith commented 6 years ago

Good deal. I'll pull it into the master later with some other updates I've been working on.

AarynSmith commented 6 years ago

Commit a4d327b3059b66266825b5b85f50c62d925d2485 adds multinetwork support.