Skip to content

Added customization for Unicast DNS server IP and Port#892

Open
akanashin wants to merge 1 commit intoAMWA-TV:masterfrom
akanashin:master
Open

Added customization for Unicast DNS server IP and Port#892
akanashin wants to merge 1 commit intoAMWA-TV:masterfrom
akanashin:master

Conversation

@akanashin
Copy link

Here I add an option to customize IP address and Port number for mock Unicast DNS server of nmos-testing-tool.
This allows for easier use of this mock:

  • no need to do elevated permissions when use privileged port (53).
  • no conflicts with already present DNS services in system.
  • no conflicts with DHCP services which might already provide DNS server addresses.

Configure custom IP:Port for mock DNS server and use it in Your client code.

What is done:

  • added 'None' values for CONFIG.DNS_IP and CONFIG.DNS_PORT variables (Config.py)
  • elevated permissions check in NMOSTesting.py modified to not start when DNS_PORT is initialized to any value
  • DNS.Py: modified code for DNS server start/stop and logging
  • configuration options are mentioned in docs

@jonathan-r-thorpe
Copy link
Contributor

Hi @akanashin, thank you for your PR.

Can I ask the motivation for being able to change the DNS IP address?
Also, although it is possible to change the port that clients use for DNS, it is non standard and not recommended, How have you been configuring your platforms to use a non-standard DNS port?

@akanashin
Copy link
Author

Hey!
First, it allows to not require elevated permissions. And this makes using of the utility a lot simpler.
Second, it allows testing utility to not interfere with already present DNS servers.
Additional bonus: testing utility automatically chooses IP address which constantly change when You connect to different WiFi networks. You can set it to 127.0.1.1 and it will stay available and well-known no matter where You work (useful if You work when outside Your Office/Home).

Personally, I'm using my own DNS SD implementation so I don't need to reconfigure my system to use customized ports.

Think, this feaure might be useful in some (rare) cases while not being overall bad.

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.

3 participants