privacy-toolkit/tools/simplex/install.sh
2025-12-31 19:44:07 -07:00

107 lines
3.3 KiB
Bash
Executable file

#!/bin/bash
set -euo pipefail
# ==============================================================================
# SimpleX Installation Script
# ==============================================================================
# Installs SimpleX Chat - E2E encrypted messaging without identifiers
#
# Threat Model:
# - Phone number linking (Signal, WhatsApp require phone)
# - Metadata correlation (most messengers link messages to identities)
# - Central server compromise (centralized messengers)
# - Contact graph analysis (who talks to whom)
#
# How SimpleX Protects:
# - No user identifiers (no phone, email, username)
# - Decentralized message routing
# - Ephemeral message queues
# - Perfect forward secrecy
# - No contact graph (each contact uses different routing)
#
# Source: https://simplex.chat/
# ==============================================================================
# Colors
readonly GREEN='\033[0;32m'
readonly YELLOW='\033[1;33m'
readonly BLUE='\033[0;34m'
readonly RED='\033[0;31m'
readonly NC='\033[0m'
log() { echo -e "${GREEN}[INFO]${NC} $*"; }
warn() { echo -e "${YELLOW}[WARN]${NC} $*"; }
error() { echo -e "${RED}[ERROR]${NC} $*"; exit 1; }
echo "=== SimpleX Chat Installation ==="
echo ""
# Detect system
log "Detecting system..."
GLIBC_VERSION=$(ldd --version | head -1 | awk '{print $NF}')
DEBIAN_VERSION=$(cat /etc/debian_version 2>/dev/null || echo "unknown")
log "System info:"
log " Debian: $DEBIAN_VERSION"
log " glibc: $GLIBC_VERSION"
echo ""
# Determine which package to use
if [[ "$DEBIAN_VERSION" == "13"* ]] || [[ "$GLIBC_VERSION" > "2.39" ]]; then
PACKAGE_VERSION="24-04"
log "✅ Debian Trixie detected - using Ubuntu 24.04 package"
else
PACKAGE_VERSION="22-04"
warn "Older Debian/Ubuntu detected - using Ubuntu 22.04 package"
fi
echo ""
log "Fetching latest SimpleX release..."
LATEST_RELEASE=$(curl -s https://api.github.com/repos/simplex-chat/simplex-chat/releases/latest)
VERSION=$(echo "$LATEST_RELEASE" | jq -r '.tag_name')
if [ -z "$VERSION" ] || [ "$VERSION" = "null" ]; then
error "Could not fetch latest version"
fi
log "Latest version: $VERSION"
# Construct download URL
PACKAGE_NAME="simplex-desktop-x86_64-ubuntu-${PACKAGE_VERSION}.deb"
DOWNLOAD_URL="https://github.com/simplex-chat/simplex-chat/releases/download/${VERSION}/${PACKAGE_NAME}"
log "Download URL: $DOWNLOAD_URL"
echo ""
# Download
log "Downloading SimpleX Desktop..."
cd /tmp
wget -O simplex-desktop.deb "$DOWNLOAD_URL"
# Install
log "Installing SimpleX Desktop..."
sudo apt install -y ./simplex-desktop.deb
# Cleanup
rm simplex-desktop.deb
log "✅ SimpleX installed successfully!"
echo ""
echo "=== Installation Complete ==="
echo ""
echo "Usage:"
echo " 1. Launch 'SimpleX' from application menu"
echo " 2. Create new profile OR restore from backup"
echo " 3. Share your connection link with contacts"
echo " 4. No phone number, email, or username required!"
echo ""
echo "Key Features:"
echo " • No user identifiers - truly anonymous"
echo " • Each contact uses different routing"
echo " • Decentralized message queues"
echo " • Perfect forward secrecy"
echo " • Disappearing messages"
echo ""
echo "📖 Documentation: https://simplex.chat/docs/"
echo "🔒 Security: https://simplex.chat/blog/simplex-chat-v5-6-quantum-resistance-signal-double-ratchet-algorithm/"