A secure chat application with both CLI and GUI versions, featuring end-to-end encryption using RSA, user authentication, and file transfer capabilities.
https://www.youtube.com/watch?v=jKf932j7vQc
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
cd CLI
make openssl # Generate SSL certificates
make # Compile the application-
Start the server:
./server
The server will listen on port 8080 by default.
-
Start the client:
./client
-
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 theclientexecutable location)/exit- Exit program and cleanup key files
make mac-depsmake ubuntu-depscd GUI
make setup # Download and setup ImGui
make openssl # Generate SSL certificates
make # Compile the application- Start the server:
./serverThe server will listen on port 8080 by default.
The GUI client provides a more user-friendly interface with the following features:
-
Login/Register Window
- Enter username (max 10 characters)
- Enter password (max 32 characters)
-
Main Chat Window
- Chat history display
- Online users list
- File transfer capabilities
- Private messaging
-
Available Actions:
- Login/Register
- Send messages
- Send files
- View online users
- Private chat
- File transfer progress monitoring
- End-to-end encryption using RSA
- Password-protected user accounts
- Encrypted communication channels
- Encrypted file transfer
- The server must be running before clients can connect
- Default server IP is 127.0.0.1 (localhost)
- Default client IP is 127.0.0.1 (localhost)
- Default server port is 8080
- SSL certificates are required for secure communication
- Client key files are automatically generated and cleaned up, server key files are not
- Maximum message buffer size is 1024 bytes
- File transfers are handled in 2MB chunks
- OpenSSL library
- GLFW (for GUI version)
- ImGui (for GUI version)