Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@mildred
Last active May 8, 2018 22:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mildred/576bed0945d5ce3e9efa37418a83201e to your computer and use it in GitHub Desktop.
Save mildred/576bed0945d5ce3e9efa37418a83201e to your computer and use it in GitHub Desktop.
P2P sending files / decentralized website

Components:

  • a laptop with a file hierarchy to send
  • a server that will receive the files

Operation:

  • Client generates a unique key pair
  • Client configures server to accept files from this public key
  • Server advertise itself on bittorrent DHT using hash(this protocol name, "server" role, public key)
  • Client pushes file hierarchy to IPFS and get an IPFS hash
  • Client ask Bittorrent DHT for servers using the hash above
  • Client finds the server address(es)
  • Client contact the server to tell about the IPFS hash signed with the secret key
  • Server notices the new ipfs hash and starts downloading it
  • Server finishes the download
  • Client gets notified that the server finished downloading
  • Client goes offline

Resources:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment