This project is a peer-to-peer chat and VoIP system built with Python.
It includes:
- Encrypted JSON-over-PNG Database (
pngdb.py) – stores data securely in image files. - Async WebSocket Server (
server.py) – handles chat, file transfer, and VoIP signaling. - Terminal Client (TUI) (
client.py) – provides chat UI, file sharing, and VoIP with noise reduction.
- 🔐 End-to-End Encryption with Fernet (AES-256 under the hood).
- 🖼️ PNG Database: JSON-based data stored encrypted in PNG images.
- 💬 Real-time Messaging: Chat with contacts using Socket.IO over WebSockets.
- 📂 File Sharing: Send/receive encrypted files.
- 📞 VoIP Calls: Real-time audio calls with noise reduction and jitter buffering.
- 🖥️ TUI Interface: Chat, status, and call control in the terminal with
curses.
git clone https://github.com/EndermanPC/Chat-VoIP.git
cd Chat-VoIPpip install -r requirements.txtpython server.pyServer defaults:
- WebSocket API:
http://localhost:5000 - Database:
chat_db.png(AES-encrypted)
python client.pyYou’ll be prompted for:
- Phone (
+84…) - Password
- Ctrl+N → start new chat
- Ctrl+F → send file
- Ctrl+O → start/end call
- Ctrl+K / Ctrl+L → switch chats
- Ctrl+C / Ctrl+D → exit
Set via environment variables:
| Variable | Default | Description |
|---|---|---|
CHAT_SERVER_URL |
http://localhost:5000 |
Server address |
CHAT_CLIENT_PHONE |
prompted | Your phone number |
CHAT_CLIENT_PASS |
prompted | Your password |
CHAT_DOWNLOAD_DIR |
. |
Directory to save files |
CHAT_DB_FILE |
chat_db.png |
PNG database file |
CHAT_DB_PASSWORD |
change_me |
Database password |
VOIP_UDP_HOST |
127.0.0.1 |
Server IP for VoIP relay |
VOIP_UDP_PORT |
10000 |
UDP port for VoIP relay |
Here’s how the TUI looks:
| Phone (Termux) | Desktop (Linux) |
|---|---|
![]() |
![]() |
(Place your screenshots in docs/screenshots/ folder, filenames can be changed as needed.)
See requirements.txt.
Major libraries:
python-socketio[aiohttp]– WebSocket server & clientcryptography– Fernet encryptionpycryptodome– AES encryption for PNG DBPillow– PNG image handlingsounddevice,numpy,noisereduce– VoIP audio processingbcrypt– password hashing
├── client.py # Terminal chat & VoIP client
├── server.py # Async chat/VoIP server
├── pngdb.py # PNG-based encrypted DB
├── requirements.txt
├── README.md
└── screenshots
- Group chats
- End-to-end encrypted calls
- Desktop client (GUI)
Apache License 2.0 © 2025 Bùi Nguyễn Tấn Sang

