kadtools/kad


peer-to-peer application framework implementing the kademlia distributed hash table for node.js and the browser

https://kadtools.github.io

License: AGPL-3.0

Language: JavaScript

Keywords: javascript, kad, kademlia, peer-to-peer


Kad

Build Status | Coverage Status | NPM

Peer-to-peer application framework implementing the Kademlia distributed hash table for Node.js and the browser.

Looking for documentation for Kad v1.6.x? Go here!

Usage

Install kad as a dependency of your package using NPM.

npm install kad --save

Choose a transport, storage layer, and your node's contact information.

const kad = require('kad');

const node = kad({
  transport: new kad.HTTPTransport(),
  storage: require('levelup')('path/to/storage.db'),
  contact: { hostname: 'your.host.name', port: 8080 }
});

const seed = [
  'ea48d3f07a5241291ed0b4cab6483fa8b8fcc127',
  { hostname: 'seed.host.name', port: 8080 }
];

node.listen(1337);
node.join(seed, function() {
  console.log(`Connected to ${node.router.size} peers!`);
});

For complete documentation, tutorials, and examples on how to extend the base protocol for building your own distributed networks, check out the complete documentation.

Resources

License

Kad - Peer-to-peer application framework implementing Kademlia DHT
Copyright (C) 2017 Gordon Hall

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Project Statistics

Sourcerank 11
Repository Size 599 KB
Stars 294
Forks 49
Watchers 17
Open issues 4
Dependencies 19
Contributors 11
Tags 69
Created
Last updated
Last pushed

Top Contributors See all

Gordyn Hall Trey Griffith gordonwritescode Robert Riemann omphalos TyIsI Braydon Fuller William Blankenship Bryan White Alexander Leitner Marc Schubert

Packages Referencing this Repo

kad
extensible implementation of the kademlia dht
Latest release 2.5.1 - Updated - 294 stars
kad-js
implementation of the kademlia dht for node
Latest release 1.6.9 - Updated - 294 stars

Recent Tags See all

v2.5.1 January 23, 2018
v2.5.0 December 26, 2017
v2.4.1 September 25, 2017
v2.4.0 August 10, 2017
v2.3.3 July 30, 2017
v2.3.2 June 24, 2017
v2.3.1 June 20, 2017
v2.3.0 May 30, 2017
v2.2.1 May 13, 2017
v2.2.0 April 20, 2017
v2.1.0 April 20, 2017
v2.0.1 April 19, 2017
v2.0.0 March 17, 2017
v1.6.5 March 14, 2017
v1.6.4 December 11, 2016

Interesting Forks See all

Storj/kad
peer-to-peer application framework implementing the kademlia distributed hash table for node.js a...
JavaScript - Updated - 3 stars - 1 forks
MicroMinion/kad
extensible implementation of the kademlia distributed hash table for node.js and the browser
JavaScript - Last pushed - 1 stars

Something wrong with this page? Make a suggestion

Last synced: 2018-02-28 07:03:05 UTC

Login to resync this repository