Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

Secure Chat Application

A secure chat application with both CLI and GUI versions, featuring end-to-end encryption using RSA, user authentication, and file transfer capabilities.

Demo Video and Code Explanation

https://www.youtube.com/watch?v=jKf932j7vQc

Project Structure

b11902171/
├── README.md              # Project documentation and setup instructions
├── code/
    ├── CLI/               # Command-line interface version
    │   ├── server.cpp
    │   ├── client.cpp
    │   └── Makefile
    │
    └── GUI/               # Graphical user interface version
        ├── server.cpp
        ├── client.cpp
        ├── Makefile
        └── imgui/         # ImGui library files
            ├── imgui.cpp
            ├── imgui.h
            ├── imgui_draw.cpp
            ├── imgui_internal.h
            ├── imgui_widgets.cpp
            ├── imgui_tables.cpp
            ├── imconfig.h
            ├── imstb_rectpack.h
            ├── imstb_textedit.h
            ├── imstb_truetype.h
            └── backends/
                ├── imgui_impl_glfw.cpp
                ├── imgui_impl_glfw.h
                ├── imgui_impl_opengl3.cpp
                ├── imgui_impl_opengl3.h
                └── imgui_impl_opengl3_loader.h

CLI Version

Compilation

cd CLI
make openssl # Generate SSL certificates
make # Compile the application

Server Usage

  1. Start the server:

    ./server

The server will listen on port 8080 by default.

Client Usage

  1. Start the client:

    ./client
  2. Available Commands:

  • /help - Show help message
  • /register - Register a new account
  • /login - Login to existing account
  • /logout - Logout from current account
  • /list - Get list of connected clients
  • /relay [IP]:[port] [message] - Send message to specific client
  • /sendfile [IP]:[port] [filepath] - Send file to specific client (filepath is relative to the client executable location)
  • /exit - Exit program and cleanup key files

GUI Version

Dependencies

For macOS:

make mac-deps

For Ubuntu/Debian:

make ubuntu-deps

Compilation

cd GUI
make setup # Download and setup ImGui
make openssl # Generate SSL certificates
make # Compile the application

Server Usage

  1. Start the server:
./server

The server will listen on port 8080 by default.

Client Usage

The GUI client provides a more user-friendly interface with the following features:

  1. Login/Register Window

    • Enter username (max 10 characters)
    • Enter password (max 32 characters)
  2. Main Chat Window

    • Chat history display
    • Online users list
    • File transfer capabilities
    • Private messaging
  3. Available Actions:

    • Login/Register
    • Send messages
    • Send files
    • View online users
    • Private chat
    • File transfer progress monitoring

Security Features

  1. End-to-end encryption using RSA
  2. Password-protected user accounts
  3. Encrypted communication channels
  4. Encrypted file transfer

Additional Notes

  1. The server must be running before clients can connect
  2. Default server IP is 127.0.0.1 (localhost)
  3. Default client IP is 127.0.0.1 (localhost)
  4. Default server port is 8080
  5. SSL certificates are required for secure communication
  6. Client key files are automatically generated and cleaned up, server key files are not
  7. Maximum message buffer size is 1024 bytes
  8. File transfers are handled in 2MB chunks

System Requirements

  • OpenSSL library
  • GLFW (for GUI version)
  • ImGui (for GUI version)

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages