DecentChat

A global decentralized P2P chat network.


Project maintained by IshaanRaja Hosted on GitHub Pages — Theme by mattgraham

DecentChat

The official reference implementation for the DecentChat network.

Screenshot

Table of Contents

What is DecentChat?

DecentChat is global, peer-to-peer, decentralized chatroom. It does not rely on a moderator or central server and can continue to exist perpetually as long as there are nodes online.

Using RSA, users are able to create consistent forms of identification on the network. All users are identified via their public key and a human readable username.

Peers forward messages to other peers, allowing messages to propagate across the network in an anonymous fashion.

The network relies on a proof of work system to deter spam attacks. The difficulty of this proof of work is constantly adjusted to ensure that it is one step ahead of any prospective message spammers.

Features

Some notable features include:

Whitepaper

The whitepaper can be found here.

License

This project is licensed under the terms of the MIT license.

Downloads

Stable releases are available for download in Releases.

Getting Started

Before running DecentChat, ensure Java 8 or above is installed.

Then, download the latest stable release and run it.

If running DecentChat on a headless machine, make sure that headlessMode is set to truein config.json.

When started, DecentChat will look for other peers, ask for their peers, and try to establish connections to up to the configured maximum amount of peers (see config.json).

All peers are stored in peers.txt

Sending Messages

Messages can be between 1 and 256 characters. To send a message, simply type in the box at the bottom of the client, and press the “Send” button or the Enter key to send it to the network.

Keep in mind that due to the proof-of-work, messages can take between 1 and 10 seconds to send, sometimes longer on slower computers.

Seed Nodes

When a client connects to the network for the first time ever, it automatically resolves peers from the project’s domain via DNS. The network needs seed peers run by different people to reduce the threat of centralization.

Running a seed node is great away of contributing back to the network.

If you would like to run a seed peer, please fill out this form.

Configuration

Configuration is primarily done through the GUI and the config.json file. This file is generated after DecentChat is first run.

The default config.json looks like this:

{
	"maximumConnections": 256,
	"username": "Newbie",
	"upnpEnabled": true,
	"headlessMode": false
}

Identification

There are three parts to a chat message, the username, the 10 character key identifier, and the message itself. An example message looks like this:

bob@a044a6ae59: Hello,world!

Commands

In order for every user to easily be able to use DecentChat’s various features, the client provides a commands system.

To use a command, type a “/” at the beginning of your message, to indicate that you want to use a command rather than broadcast a message to the rest of the network.

Available commands are as follows:

Command arguments are specified in brackets (“[]”). More commands may be added in the future to accommodate additional features or functionality

Ignoring

Inevitably, there will be users that you do not want to see messages from. To assist with this, DecentChat provides an ignoring functionality. To ignore a user, use the /ignore command with the user you wish to ignore’s 10 character key identifier. This will stop the client from displaying messages from that user.

To stop ignoring a user, use the /unignore command.

All ignored identifiers are stored in ignorelist.txt

Building

To build DecentChat from source, use the following commands:

git clone https://github.com/IshaanRaja/DecentChat
cd DecentChat
./gradlew fatJar

This will automatically download all dependencies, compile, and build a runnable .jar file.

DecentChat uses the following dependencies:

Issues

Please attach your debug.log file and explain the steps that led up to the issue when reporting a bug/glitch on GitHub.

Contributing

Pull Requests are always welcomed! Please ensure that any code contributions have proper Javadoc comments included.