Giter VIP home page Giter VIP logo

botsheloramela / netchat Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 32 KB

NetChat provides a secure and simple solution for real-time communication between multiple clients connected to a server. The app uses encryption algorithms to ensure the confidentiality of messages transmitted over the network.

Java 100.00%
java java-client-server java-encryption real-time-chat-app tcp aes-encryption

netchat's Introduction

About NetChat

The Java TCP client-server group chat app, NetChat, with encrypted messages is a simple yet effective solution for secure communication within a group. This project enables multiple clients to connect to a single server, allowing them to exchange messages with one another in real-time. The app incorporates encryption algorithms to ensure the confidentiality of messages being sent between the clients.

The application is built using Java Socket programming to establish a TCP connection between the server and clients. The chat messages are encrypted using symmetric encryption techniques such as AES or DES before being sent over the network. The server acts as a mediator between the clients and ensures that each message is delivered to the intended recipients.

Overall, the Java TCP client-server group chat app with encrypted messages is an excellent choice for organizations or groups that require secure communication channels. It provides a convenient and reliable way for users to communicate and collaborate, ensuring that their messages remain private and secure.

How to run NetChat

Requirements

  • You need to have Java installed on your system

Server Options

  • To run NetChat on your local machine change the client socket host in Client.java to use the host 127.0.0.1. This is set by default.
  • To run NetChat on your local network:
    1. Identifyy the IP address of the computer where the NetChat server will run. You can do this by opening a command prompt or terminal and typing ipconfig or ifconfig.
    2. Make sure that the computer's firewall is configured to allow incoming connections on the port used by the NetChat server.
    3. Change the host to the IP address.

Step 1: Compile

First compile Server.java and Client.java.

  • javac Server.java
  • javac Client.java

Step 2: Start the server

Start the server on one machine.

  • java Server

Step 3: Start the client

The client should be started on all machines that you intend to join the chat on.

  • java Client

netchat's People

Contributors

botsheloramela avatar

Stargazers

 avatar  avatar

Watchers

 avatar

netchat's Issues

First message from the client is not decrypted after server startup

Description:
When the server is started, the first message sent by the client is always encrypted and doesn't get decrypted. This issue seems to be related to the encryption and decryption logic implemented inside the Connection Handler class.

Steps to Reproduce:

  1. Start the server
  2. Connect a client to the server
  3. Send a message from the client to the server

Expected behavior:
The message should be decrypted successfully and handled by the server.

Actual behavior:
The first message sent by the client is always encrypted and doesn't get decrypted. Subsequent messages are decrypted successfully.

Possible solution:
It is recommended to review the encryption and decryption logic implemented inside the Connection Handler class, especially regarding the first message received from the client after the server startup. It might be necessary to change the order of operations or add a specific logic to handle the first message differently from the subsequent ones.

Impact:
This issue affects the reliability and security of the communication between the client and the server. It can also cause unexpected behavior in the application, leading to potential errors or crashes.

Priority:
This issue should be addressed with a high priority, as it affects the core functionality of the application and the security of the communication between the client and the server.

Message encryption

It is possible that the encryption of the message in ConnectionHandler's run() method is not implemented correctly, and encryption may need to be implemented somewhere else.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.