Giter VIP home page Giter VIP logo

dddns's Introduction

Decentralized Address Resolution

Like DDNS, but decentralized. Live demo.

Purpose

Say I want to open an encrypted socket into a LAN server from a static site to power a self-hosted app. I could use a DDNS service, but what's the point of P2P networking if it's facilitated by a centralized service? I could hard-code the IP, but that changes too easily. What I want is Decentralized DDNS.

So I used IPFS to store my IP candidates allowing me to read them back from a web gateway, of which several exist. You could imagine observing your IP and publishing a new JSON object under an IPNS key, but you don't have to. IPFS propagates this information automatically through its WAN peer DHT. Bonus points because IPFS already implements STUN and UPnP.

Now the problem becomes how to get the values out of the DHT from a browser. As it would happen, the libp2p team is working on exactly this problem and provides some attractive gateways serving as routing delegates. Their sole job is tracking the peer DHT. Instantiate a libp2p node served by those delegates and you can (finally) open a socket.

This site serves as a light frontend to the routing delegates providing network address lookups for peer IDs. You could use the same principles to power a fully P2P application.

Drawbacks

This approach still relies on federated servers. If they go down or change the protocol, the approach falls apart. On the flipside, you can easily host your own and run it alongside. You should do that for any critical application anyway.

Usage

  • Start a local IPFS node using ipfs-core:
    // Use the JavaScript implementation.
    // The Golang version doesn't advertise in the same way.
    require('ipfs-core').create()
  • Copy and paste the peer ID into the DDDNS search form.

dddns's People

Contributors

psychollama avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

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.