Skip to content

yagarea/java-chat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

java-chat

Encrypted terminal chat written in java.

Introduction

The entire project is available for all personal or educational purposes. If this project helped you, mark this repository with a star. If you want to contribute, I'm open to your pull requests. Feel free to contact me on j.cerny.zdar@gmail.com.

Security

  • Communication between server and client is encrypted by RSA.
  • Passwords are saved as SHA hashes.
  • Password are hashed with randomized salt

Project description

Project is written in Java 1.8 using Maven as dependency management.

Used libraries:


Usage

Build project using maven

If you do not have maven already installed on your system you can install by:

  • On arch based systems: sudo pacman -S maven
  • On debian based systems: sudo apt install maven

If you are using other operating system than mentioned above visit official maven install documentation.

When you have maven installed just run maven package in project directory. All compiled files will appear in target directory.

Running server

You can run it from your IDE or just using the terminal:

java -jar server.jar authenticationFile port

Example:

java -jar target/server.jar Authentication.txt 4444

The authenticationFile can be any text file which server can use to store registered accounts. Make sure server has rights for reading and writing to this file.

Server console contains these commands:

  • clients - print list of connected clients
  • kick (nickname of the user to be kicked) - kick specific connected client
  • broadcast (message) - send message to all connected clients
  • help - print list of server console commands

Running client

You can run it from your IDE to, but in IntelliJ IDEA, password input is not hidden and appears as normal test input. You can of course execute it from the terminal:

java -jar client.jar ipAddressOfServer port

Example:

java -jar target/client.jar localhost 4444
Client contains these features:
  • :clients - prints list of connected clients
  • @nickname - send private message only to tagged user

Releases

No releases published

Packages

No packages published

Languages