Code Monkey home page Code Monkey logo

Comments (2)

cookiengineer avatar cookiengineer commented on August 20, 2024

After further analysis and read-up of the DNS-SD website this will be the workflow for Stealth's peer-to-peer DNS capabilities; while preserving integration with legacy Web Browsers that try to discover local peers and their webservers:

  • Multicast address is 224.0.0.251 and/or ff02::fb on port 5353.
  • DNS-SD is specified as <instance>.<service>.tholian.local where service is equivalent to _stealth._wss.
  • TTL is 1 for dgram udp packets to stay inside local NAT.

DNS-SD Discovery of other Avahi Clients or Web Browsers

DNS-SD scenario on UDP port 5353 to discover peers when starting Stealth:

  1. Send out question for PTR record of _stealth._wss.tholian.local.

  2. Primary answer is PTR for _stealth._wss.tholian.local pointing to username._stealth._wss.tholian.local on port 65432.
    Additional records must contain:

    • SRV for username._stealth._wss.tholian.local with target set to username.tholian.local
    • TXT for username._stealth._wss.tholian.local with version=X0
    • A for username.tholian.local
    • AAAA for username.tholian.local
  3. If no response was sent, then do the same for _stealth._ws.tholian.local (to find peers without TLS certificates)

Peer-to-Peer DNS to relay DNS requests via other Peers

Peer-DNS scenario on UDP port 65432 to resolve domains via other Peers that might not be blocked:

  1. Send out question for A and AAAA of example.com to multicast address.

  2. Reply with local cached hosts[] entries.

    • If no hosts[] entries are available:
    • If internet connection is available, then resolve domain from public DNS servers.
    • If no internet connection is available, stay silent and do nothing.
  3. Initial Client's peer-DNS query timeouts should lead to retry of DNS query to public DNS servers.

from stealth.

cookiengineer avatar cookiengineer commented on August 20, 2024

The MDNS Protocol has been implemented and is already integrated. Now it's up to the stealth/server/Compeer instance to add peers to the this.stealth.peers[] Array.

from stealth.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.