Skip to content
This repository was archived by the owner on Dec 8, 2021. It is now read-only.
/ Kad2-TCP Public archive

Java implementation of Kademlia DHT using TCP

Notifications You must be signed in to change notification settings

DrBrad/Kad2-TCP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JKademlia

This is an implementation of Kademlia DHT Wikipedia Link this implementation was refrenced from Stanford Paper

Note: This repository is an IntelliJ project.

This project is depricated moving project to:

Kad3

Features

  • PING
  • FIND NODE
  • FIND VALUE
  • STORE
  • External IP resolution over fallback nodes, websites and UPnP

Usage

Here is an example for the routing and creation of a couple DHT nodes. Example

Configuration

Download Jar Library Download and include the library to your project.

Creating a node

int port = 8080;
boolean local = true;
KademliaNode knode = new KademliaNode(port, local);

Joining / Bootstrap to node

int port = 8070;
int toPort = 8080;
boolean local = true;
KademliaNode knode = new KademliaNode(port, local);
knode.join(InetAddress.getLocalHost(), toPort);

Storing data on DHT

KademliaNode knode = new KademliaNode(port, local);
knode.store("STRING DATA");

Getting data on DHT

KademliaNode knode = new KademliaNode(port, local);
knode.get(new KID("STRING DATA"));

License

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE

About

Java implementation of Kademlia DHT using TCP

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages