Skip to content

nestoree/termsg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Termsg

Termsg es un sistema de chat seguro por terminal escrito en Python, que utiliza TLS con autenticación mutua (mTLS) para comunicaciones cifradas entre clientes y servidor.

Está pensado como:

  • Proyecto educativo
  • Chat ligero por terminal
  • Laboratorio de redes, TLS y sockets
  • Base para extender a más funcionalidades

🚀 Características

  • 🔐 Comunicación cifrada con TLS
  • 🧾 Autenticación por certificados (cliente y servidor)
  • 🧵 Soporte para múltiples clientes simultáneos
  • 🖥️ Interfaz por terminal
  • 📡 Compatible con Wireshark (tráfico TLS)
  • 🧼 Sin colores ANSI (compatible con Windows, Linux y macOS)

📦 Requisitos

  • Python 3.9+
  • OpenSSL
  • Sistema operativo: Windows / Linux / macOS

🔑 Certificados (TLS con mTLS)

Termsg utiliza TLS con autenticación mutua, lo que significa:

  • El servidor verifica a los clientes
  • Los clientes verifican al servidor
  • Solo usuarios con certificado válido pueden conectarse

Autoridad certificadora (CA)

El archivo ca.cnf define la CA local usada para firmar los certificados

Para generar los certificados usaremos:

openssl genrsa -out [tu_nombre].key 2048
openssl req -new -key [tu_nombre].key -out [tu_nombre].csr -subj "/C=ES/ST=[CIUDAD]/L=[Localidad]/O=ChatTerm/OU=ChatTermUnit/CN=[tu_nombre]"
openssl x509 -req -in [tu_nombre].csr -CA ca.crt -CAkey ca.key -CAcreateserial -out [tu_nombre].crt -days 365

🖥️ Uso

Iniciar el servidor

python3 server.py <nombre_de_la_sala>

Conectar un cliente

python3 client.py <IP_del_servidor> <nombre.crt> <nombre.key>

💬 Comandos disponibles

Comando Descripción
/usuarios Muestra usuarios conectados
/clear Limpia la pantalla
/quit Salir del chat

⚠️ Seguridad

Este proyecto NO está pensado para producción sin mejoras adicionales:

  • No hay control de revocación (CRL / OCSP)
  • No hay persistencia de usuarios
  • No hay protección contra DoS

Está orientado a aprendizaje y experimentación.


📜 Licencia

MIT License

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages