Skip to content

dhr412/lanwhisp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LanWhisp

LanWhisp is a lightweight, encrypted peer-to-peer group chat application for local networks. It features a rich terminal user interface (TUI) built with Go and Bubble Tea. It enables secure and private communication between devices on the same LAN, ensuring message confidentiality through end-to-end encryption.

Features

  • Group Chat: Automatically discover and connect with other users on the same network.
  • Rich Terminal UI: A modern, terminal-based interface powered by Bubble Tea.
  • End-to-End Encryption: Messages are secured with AES-GCM using a shared passphrase.
  • Typing Indicators: See when other users are typing a message.
  • Colored Nicknames: Each user gets a unique color for easy identification.
  • Decentralized: No central server required.

How It Works

  1. Peer Discovery: The application uses UDP multicast to broadcast its presence and discover other users on the local network who are part of the same group (i.e., using the same passphrase).
  2. Key Derivation: A symmetric encryption key is derived from a shared passphrase using SHA-256. All participants must use the same passphrase to communicate.
  3. Encrypted Communication: Encrypted chat messages and typing notifications are sent directly between peers over TCP connections. All data is encrypted using AES-GCM.

Installation

Option 1: Download from Releases

Pre-built binaries for major platforms are available in the Releases section of the project's GitHub page.

  1. Go to the Releases page.

  2. Download the binary for your OS.

  3. Make it executable (Linux/macOS):

    chmod +x lanwhisp

Option 2: Build from Source

Prerequisites

  • Go 1.20 or later

Steps

# Clone the repository
git clone https://github.com/dhr412/lanwhisp.git
cd lanwhisp

# Install dependencies
go mod tidy

# Build the application
go build -o whisp ./src

This will generate a single executable file whisp in the current directory.


Usage

Start the app on each device. All users must use the same passphrase and be on the same local network.

./whisp -name <your-name> [-port 9600] [-passphrase "shared-secret"]
  • -name: Your display name in the chat (required).
  • -port: The TCP port for connections (default: 9600).
  • -passphrase: The passphrase for the private group (default: "sharedpassphrase"). Everyone must use the same one.

Once started, the terminal will switch to the chat interface.

  • Simply type your message and press Enter to send it to the group.
  • Press Ctrl+C or Esc to exit the application.

License

This project is licensed under the MIT License. See the LICENSE file for details.