Terminal Chat

A fully terminal-based, TLS-encrypted, and manually-approved chat application built for maximum privacy and minimalism. No UI, no cloud, no sharing of client files β just a one-liner invite command with tight access control.
π‘ Features
- π TLS Encryption β All communication is secured using SSL.
- π€ Name + Key Authentication β Clients submit their name and a shared secret.
- β Manual Approval β Server prompts for each connection; only approved users join.
- π§ No Client Code Sharing β Clients fetch the bootstrap client code via a secure one-liner.
- π§Ό Minimal & Clean β 100% terminal-based. No GUI distractions.
π Directory Structure
secure_terminal_chat/
βββ server.py # Main chat server with TLS & approval logic
βββ client.py # Lightweight, secure bootstrap client (fetched remotely)
βββ invite.py # Tiny HTTP server to serve the client_boot.py file
βββ certs/
β βββ cert.pem # TLS certificate
β βββ key.pem # TLS private key
π How to Use
1. π§ Setup TLS Certs
mkdir certs
openssl req -new -x509 -days 365 -nodes -out certs/cert.pem -keyout certs/key.pem
2. π Start the Chat Server
python3 server.py
Youβll see prompts for each connection request:
[REQUEST] Connection from 192.168.1.23
Name: Karna
Key: letmein1337
Accept? (y/n):
3. π Start the Invite Host
python3 invite.py
This serves client.py
to the public via HTTP on port 9000
.
4. π§βπ» Share the Invite Command
Give this to your friends:
python3 <(curl -s http://YOUR.IP.ADDRESS:9000/client.py)
Theyβll be prompted for their name and shared key. Youβll be asked to accept or deny.
π They never see or get the code, and only you can approve who joins.
βοΈ Configuration
Inside server.py
and client_boot.py
, set:
PORT = 7777
SHARED_KEY = 'letmein1337'
Update HOST
in client_boot.py
to your actual IP (or automate it via serve_invite.py
).
π Security Tips
- Change your TLS certs regularly.
- Use a strong shared key.
- Change ports often.
- Never run this on open Wi-Fi without a VPN.
- Use firewall rules to restrict unexpected traffic.
π‘ Future Improvements
- π Per-user tokens or dynamic shared keys
- π‘οΈ IP rate-limiting
- β³ One-time access links with expiration
- π Chat logs (optional)
- π§° Admin commands like
/kick
or/mute