该项目 repo 已失效,下落不明 :-)。
不推荐使用! KadTools 现在是 Kadence!
为 Node.js 和浏览器实施 Kademlia 分布式哈希表的点对点应用程序框架。
不推荐使用! KadTools现在是Kadence!(Deprecated! KadTools is now Kadence!)
该项目 repo 已失效,下落不明 :-)。
不推荐使用! KadTools 现在是 Kadence!
为 Node.js 和浏览器实施 Kademlia 分布式哈希表的点对点应用程序框架。
名稱與所有者 | kadtools/kad |
---|---|
主編程語言 | TypeScript |
編程語言 | JavaScript (語言數: 6) |
平台 | |
許可證 | MIT License |
創建於 | 2015-07-15 02:12:52 |
---|---|
推送於 | 2024-01-25 05:34:52 |
最后一次提交 | 2021-02-27 16:10:03 |
發布數 | 141 |
最新版本名稱 | v10.9.2 (發布於 2023-12-08 21:04:03) |
第一版名稱 | v0.0.1 (發布於 2015-07-15 12:12:11) |
星數 | 12.4k |
---|---|
關注者數 | 78 |
派生數 | 535 |
提交數 | 839 |
已啟用問題? | |
問題數 | 1252 |
打開的問題數 | 166 |
拉請求數 | 445 |
打開的拉請求數 | 29 |
關閉的拉請求數 | 169 |
已啟用Wiki? | |
---|---|
已存檔? | |
是復刻? | |
已鎖定? | |
是鏡像? | |
是私有? |
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!
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.
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/.