extensible implementation of the kademlia dht

| |

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

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


Install kadas 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 = [
  { hostname: 'seed.host.name', port: 8080 }

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.



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/.





  • pikaday

    A refreshing JavaScript Datepicker — lightweight, no dependencies, modular CSS Pikaday ======== NP...

    2 年前
  • pickadate.js

    pickadate.js是什么 什么是pickadate.js,The mobilefriendly, responsive, and lightweight jQuery date & ...

    2 年前
  • pickadate

    The composable date & time picker. pickadate.js The composable date & time picker 🕰 (ht...

    1 个月前
  • kad-traverse

    nat traversal extension for kad Kad Traverse ============ Build Status(https://img.shields.io/trav...

    9 天前
  • kad-spartacus

    spartacus attack mitigation plugin for kad Kad Spartacus ============= Build Status(https://img.sh...

    9 天前
  • kad-quasar

    publishsubscribe system for kad Kad Quasar ========== Build Status(https://img.shields.io/travis/k...

    9 天前
  • kad-logger-json

    newline separated json logger as a readable stream for kad Kad JSON Logger =============== Build S...

    9 天前
  • fuckadblock

    Detects ad blockers (AdBlock, ...) FuckAdBlock (v3.2.1) =========== You can detect nasty ad blo...

    2 年前
  • blockadblock

    Detects ad blockers (AdBlock, ...) BlockAdBlock (v3.2.1) =========== (FuckAdBlock(https://githu...

    2 年前
  • @types/pikaday

    TypeScript definitions for pikaday Installation Summary This package contains type definit...

    5 个月前


扫码加入 JavaScript 社区