End-to-End Encrypted Hub & Spoke Communications Network with Mesh P2P WebRTC Voice and Video Calling
Gossip is a secure, decentralized communications platform that combines the reliability of a hub-and-spoke architecture with the privacy and efficiency of peer-to-peer (P2P) connections. Built with Go and modern web technologies, Gossip provides end-to-end encrypted messaging, voice, and video calling capabilities.
āāāāāāāāāāāāāāāāāāā āāāāāāāāāāāāāāāāāāā āāāāāāāāāāāāāāāāāāā
ā Gossip Client ā ā Gossip Server ā ā Gossip Common ā
ā (Desktop App) āāāāāŗā (Signaling) āāāāāŗā (Shared Lib) ā
āāāāāāāāāāāāāāāāāāā āāāāāāāāāāāāāāāāāāā āāāāāāāāāāāāāāāāāāā
ā ā ā
ā ā ā
ā¼ ā¼ ā¼
āāāāāāāāāāāāāāāāāāā āāāāāāāāāāāāāāāāāāā āāāāāāāāāāāāāāāāāāā
ā WebRTC P2P ā ā TCP Server ā ā Crypto Utils ā
ā Connections ā ā (Port 1720) ā ā & Packets ā
āāāāāāāāāāāāāāāāāāā āāāāāāāāāāāāāāāāāāā āāāāāāāāāāāāāāāāāāā
gossip/
āāā gossip-client/ # Desktop client application
ā āāā frontend/ # Svelte-based UI
ā ā āāā src/
ā ā ā āāā App.svelte # Main application component
ā ā ā āāā Chat.svelte # Chat interface
ā ā ā āāā components/ # UI components
ā ā āāā package.json
ā āāā app.go # Main application logic
ā āāā stream.go # WebRTC streaming implementation
ā āāā audio.go # Audio capture and playback
ā āāā events.go # Event handling
ā āāā main.go # Application entry point
āāā gossip-server/ # Central signaling server
ā āāā main.go # Server entry point
ā āāā events.go # Server event handling
āāā gossip-common/ # Shared utilities and protocols
āāā crypto.go # Encryption/decryption functions
āāā packet.go # Network packet definitions
āāā utility.go # Common utilities
Clone the repository
git clone https://github.com/yourusername/gossip.git
cd gossip
Build the common library
cd gossip-common
go mod download
go build
cd ..
Build the server
cd gossip-server
go mod download
go build -o gossip-server
cd ..
Build the client
cd gossip-client
go mod download
cd frontend
npm install
npm run build
cd ..
wails build
cd gossip-server
./gossip-server [options]
Options:
-h string IP to listen on (default "127.0.0.1")
-p int Port to listen on (default 1720)
-k string Server password (default "anonymous")
-d Enable debug logging
-l Enable connection logging
Launch the application
cd gossip-client
./gossip-client
Connect to a server
Start communicating
Gossip implements a sophisticated zero-knowledge key exchange mechanism that ensures the server cannot decrypt any client-to-client communications, even though it facilitates the key distribution process.
// Server encrypts client keys before forwarding
encryptedKey, err := gossip_common.GWEncrypt(clientPublicKey, recipientPublicKey)
keyPacket := gossip_common.NewSignalPacketFromData("ckp", recipientID, senderID, encryptedKey)
// Client decrypts received keys
decryptedKey, err := gossip_common.GWDecrypt(packet.Payload)
publicKeys[packet.Sender] = decryptedKey
The server creates configuration files in the system temp directory:
gossip_server.name
: Server display namegossip_channels.list
: Available channels (one per line)Client settings are stored in gossip_settings.json
:
{
"selectedTheme": "wintry",
"defaultUsername": "your_username",
"defaultHost": "127.0.0.1",
"defaultPort": "1720"
}
Install Wails CLI
go install github.com/wailsapp/wails/v2/cmd/wails@latest
Install frontend dependencies
cd gossip-client/frontend
npm install
Run in development mode
cd gossip-client
wails dev
Client A Server Client B
| | |
|-- GMSigPacket(grtng) -->| |
|<-- GMSigPacket(hru) ----| |
|-- GMSigPacket(ighru) -->| |
|<-- GMSigPacket(ig) -----| |
|-- GMSigPacket(gmk) -----| |
|<-- GMSigPacket(ckp) ----|-- GMSigPacket(ckp) ----->|
| | |
|-- GMDataPacket(msg) ---->|-- GMDataPacket(msg) ---->|
| | |
Packet Security Levels:
GWEncrypt()
, GWDecrypt()
, GenerateKeys()
SendSignalPacket()
, SendDataPacket()
SendOfferToClient()
, HandleOffer()
, SendAudioToChannels()
// Connection management
Boot(host string, port int, username string, password string) error
Disconnect() error
// Messaging
SendMessage(message string, expiry int64, channel string) error
// Voice/Video
StartRecording()
StopRecording()
ToggleGoMute()
ToggleGoDeaf()
UpdateCallID(callerID string)
// Settings
LoadSettings() (Settings, error)
SaveSettings(settings Settings) error
grtng
: Client greeting with public keyhru
: Server response with server public keyighru
: Encrypted password authenticationig
: Server confirmation of authenticationgmk
: Request for all client public keysckp
: Encrypted client public key packetcup
: Encrypted channel update packeteok
: End of keys transmissionrmk
: Remove client key notificationmsg
: Encrypted text messagegmp
: Get call participantsstart_call
: Initialize call sessionoffer
: WebRTC offeranswer
: WebRTC answerice
: ICE candidate exchangehang-up
: Terminate call sessiongrtng
, hru
, gmk
, eok
, rmk
(metadata only)ighru
, ig
, ckp
, cup
(server can decrypt for routing)msg
, offer
, answer
, ice
(server cannot decrypt)git checkout -b feature/amazing-feature
)git commit -m 'Add amazing feature'
)git push origin feature/amazing-feature
)Connection Failed
Audio/Video Issues
Encryption Errors
Enable debug logging for detailed troubleshooting:
# Server
./gossip-server -d -l
# Client (set debugLogging = true in main.go)
This project is licensed under the MIT License - see the LICENSE file for details.
Gossip - Secure communications for the modern world. Built open and free by m4yc3x under the Open Research Initiative for Web Technologies Foundation