All Projects → richardschneider → Net Mdns

richardschneider / Net Mdns

Licence: mit
Simple multicast DNS

Projects that are alternatives of or similar to Net Mdns

Toriptables2
Tor Iptables script is an anonymizer that sets up iptables and tor to route all services and traffic including DNS through the Tor network.
Stars: ✭ 287 (+173.33%)
Mutual labels:  zero-configuration, dns
Devdns
Automagic Docker DNS for local development
Stars: ✭ 99 (-5.71%)
Mutual labels:  dns
1hosts
DNS filter-/blocklists | safe. private. clean. browsing!
Stars: ✭ 85 (-19.05%)
Mutual labels:  dns
Bind Restapi
A RESTful json api to BIND DNS
Stars: ✭ 91 (-13.33%)
Mutual labels:  dns
Ten34
A globally-distributed, eventually-consistent, 100% available key-value store ;)
Stars: ✭ 87 (-17.14%)
Mutual labels:  dns
Cazador unr
Hacking tools
Stars: ✭ 95 (-9.52%)
Mutual labels:  dns
Is Google
Verify that a request is from Google crawlers using Google's DNS verification steps
Stars: ✭ 82 (-21.9%)
Mutual labels:  dns
Collection Document
Collection of quality safety articles. Awesome articles.
Stars: ✭ 1,387 (+1220.95%)
Mutual labels:  dns
Rita
Real Intelligence Threat Analytics (RITA) is a framework for detecting command and control communication through network traffic analysis.
Stars: ✭ 1,352 (+1187.62%)
Mutual labels:  dns
Dnscrypt Protocol
DNSCrypt protocol specification
Stars: ✭ 91 (-13.33%)
Mutual labels:  dns
.o
The domain records for the ".o" TLD on @OpenNIC. Claim your domain today!
Stars: ✭ 87 (-17.14%)
Mutual labels:  dns
Elixir Dns
DNS library for Elixir
Stars: ✭ 86 (-18.1%)
Mutual labels:  dns
Ntf
Network Testing Framework
Stars: ✭ 96 (-8.57%)
Mutual labels:  dns
Pric
Simple zero-config tool to create Private Certificate Authority & issue locally-trusted development server certificates with any domain names you'd like. SSL certificates for development purposes.
Stars: ✭ 87 (-17.14%)
Mutual labels:  zero-configuration
Kubernetes Pfsense Controller
Integrate Kubernetes and pfSense
Stars: ✭ 100 (-4.76%)
Mutual labels:  dns
Dns
Async DNS resolution for PHP based on Amp.
Stars: ✭ 82 (-21.9%)
Mutual labels:  dns
Dnoise
DNS noise generator that looks at your network activity and blends in. Requires pi-hole.
Stars: ✭ 88 (-16.19%)
Mutual labels:  dns
Jetpack
🚀 Jetpack – Webpack made more convenient.
Stars: ✭ 1,326 (+1162.86%)
Mutual labels:  zero-configuration
Bass
Bass grabs you those "extra resolvers" you are missing out on when performing Active DNS enumeration. Add anywhere from 100-6k resolvers to your "resolver.txt"
Stars: ✭ 104 (-0.95%)
Mutual labels:  dns
Gitzone
git-based zone management tool for static and dynamic domains
Stars: ✭ 100 (-4.76%)
Mutual labels:  dns

net-mdns

build status travis build CircleCI Coverage Status Version docs

A simple Multicast Domain Name Service based on RFC 6762. Can be used as both a client (sending queries) or a server (responding to queries).

A higher level DNS Service Discovery based on RFC 6763 that automatically responds to any query for the service or service instance.

Features

  • Targets Framework 4.6.1, .NET Standard 1.4 and 2.0
  • Supports IPv6 and IPv4 platforms
  • CI on Circle (Debian GNU/Linux), Travis (Ubuntu Xenial and OSX) and AppVeyor (Windows Server 2016)
  • Detects new and/or removed network interfaces
  • Supports multicasting on multiple network interfaces
  • Supports reverse address mapping
  • Supports service subtypes (features)
  • Handles legacy unicast queries, see #61

Getting started

Published releases are available on NuGet. To install, run the following command in the Package Manager Console

PM> Install-Package Makaretu.Dns.Multicast

or using .NET CLI run the following command in the project folder

> dotnet add package Makaretu.Dns.Multicast

Usage Service Discovery

Advertising

Always broadcast the service ("foo") running on local host with port 1024.

using Makaretu.Dns;

var service = new ServiceProfile("x", "_foo._tcp", 1024);
var sd = new ServiceDiscovery();
sd.Advertise(service);

See the example advertiser for a working program.

Discovery

Find all services running on the local link.

using Makaretu.Dns;

var sd = new ServiceDiscovery();
sd.ServiceDiscovered += (s, serviceName) => { // Do something };

Find all service instances running on the local link.

using Makaretu.Dns;

var sd = new ServiceDiscovery();
sd.ServiceInstanceDiscovered += (s, e) => { // Do something };

See the example browser for a working program.

Usage Multicast

Event Based Queries

Get all the Apple TVs. The query is sent when a network interface is discovered. The AnsweredReceived callback contains any answer that is seen, not just the answer to the specific query.

using Makaretu.Dns;

var mdns = new MulticastService();
mdns.NetworkInterfaceDiscovered += (s, e) => mdns.SendQuery("appletv.local");
mdns.AnswerReceived += (s, e) => { // do something with e.Message };
mdns.Start();

Async Queries

Get the first answer to Apple TVs. Wait 2 seconds for an answer.

using Makaretu.Dns;

var service = "appletv.local";
var query = new Message();
query.Questions.Add(new Question { Name = service, Type = DnsType.ANY });
var cancellation = new CancellationTokenSource(2000);

using (var mdns = new MulticastService())
{
    mdns.Start();
    var response = await mdns.ResolveAsync(query, cancellation.Token);
    // Do something
}

Broadcasting

Respond to a query for the service. Note that ServiceDiscovery.Advertise is much easier.

using Makaretu.Dns;

var service = "...";
var mdns = new MulticastService();
mdns.QueryReceived += (s, e) =>
{
    var msg = e.Message;
    if (msg.Questions.Any(q => q.Name == service))
    {
        var res = msg.CreateResponse();
        var addresses = MulticastService.GetIPAddresses()
            .Where(ip => ip.AddressFamily == AddressFamily.InterNetwork);
        foreach (var address in addresses)
        {
            res.Answers.Add(new ARecord
            {
                Name = service,
                Address = address
            });
        }
        mdns.SendAnswer(res);
    }
};
mdns.Start();

Related projects

  • net-dns - DNS data model and Name Server with serializer for the wire and master file format
  • net-udns - client for unicast DNS, DNS over HTTPS (DOH) and DNS over TLS (DOT)

License

Copyright © 2018-2019 Richard Schneider ([email protected])

The package is licensed under the MIT license. Refer to the LICENSE file for more information.

Buy Me A Coffee

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].