CLI Chatroom is a collection of command-line based chatroom applications in Python that offer different modes of operation. It includes three implementations:
- Single-Room Chatroom: A simple, single chatroom implementation.
- Multi-Room Chatroom (No TLS): Supports multiple chatrooms without encryption.
- Multi-Room Chatroom (TLS): Supports multiple chatrooms with TLS encryption for secure communications.
Each version is self-contained within its own directory and includes its respective server and client scripts, a packet diagram (PacketDiagram.md
) explaining the communication protocol, and an additional README for detailed usage instructions.
- cli-chatroom/
LICENSE
README.md
(Main README file)- single-room/
client.py
server.py
PacketDiagram.md
README.md
- multi-room-no-tsl/
client.py
server.py
PacketDiagram.md
README.md
- multi-room-tsl/
client.py
server.py
PacketDiagram.md
README.md
sslcertgen.sh
(Shell script for generating SSL certificates for Linux/Mac)sslcertgen.bat
(Batch script for generating SSL certificates for Windows)
- Python 3.x: Ensure Python is installed on your system.
- OpenSSL: Required for generating certificates when using the TLS version.
- Open a terminal and navigate to the
single-room
directory. - Start the server:
- Run:
python server.py
- Run:
- In another terminal, start the client:
- Run:
python client.py
- Run:
- Follow the on-screen prompts to join the chat.
- Open a terminal and navigate to the
multi-room-no-tsl
directory. - Start the server:
- Run:
python server.py
- Run:
- In separate terminals, start one or more clients:
- Run:
python client.py
- Run:
- This version supports multiple chatrooms; check the included README for details.
- Open a terminal and navigate to the
multi-room-tsl
directory. - Generate SSL Certificates:
- For Unix/Linux/Mac: Run
bash sslcertgen.sh
- For Windows: Run
sslcertgen.bat
- For Unix/Linux/Mac: Run
- Start the server:
- Run:
python server.py
- Run:
- In another terminal, start the client:
- Run:
python client.py
- Run:
- The connection will be secured using TLS. Refer to the included README for more in-depth instructions.
Each implementation contains a PacketDiagram.md
file, which describes the structure of the data packets used in the communication protocol.
Contributions, bug fixes, and feature enhancements are welcome. Feel free to fork the repository and submit a pull request with your improvements.
This project is licensed under the terms specified in the LICENSE file.