#!/bin/bash set -euo pipefail # ============================================================================== # Mullvad Browser Installation # ============================================================================== # Privacy-focused browser developed by Mullvad VPN and Tor Project # - Based on Firefox ESR with Tor Browser privacy patches # - Tor-like fingerprint resistance WITHOUT using Tor network # - No telemetry, no accounts, no tracking # - Designed to make all users look identical (anti-fingerprinting) # ============================================================================== # 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} $*"; } section() { echo -e "${BLUE}=== $* ===${NC}"; } section "Mullvad Browser Installation" echo "" # Check if already installed if command -v mullvad-browser &>/dev/null; then log "Mullvad Browser already installed" read -p "Reinstall/upgrade? [y/N] " -n 1 -r echo if [[ ! $REPLY =~ ^[Yy]$ ]]; then log "Skipping installation" exit 0 fi fi # Detect distro if [ -f /etc/os-release ]; then . /etc/os-release DISTRO="${ID:-unknown}" DISTRO_VERSION="${VERSION_CODENAME:-${VERSION_ID:-unknown}}" else error "Cannot detect distribution" exit 1 fi log "Detected: $DISTRO $DISTRO_VERSION" case "$DISTRO" in debian|ubuntu|linuxmint|pop) section "Installing via Mullvad APT Repository" # Install dependencies log "Installing dependencies..." sudo apt update sudo apt install -y curl gnupg apt-transport-https ca-certificates # Add Mullvad signing key log "Adding Mullvad signing key..." sudo curl -fsSLo /usr/share/keyrings/mullvad-keyring.asc https://repository.mullvad.net/deb/mullvad-keyring.asc sudo chmod 644 /usr/share/keyrings/mullvad-keyring.asc # Add the repository log "Adding Mullvad repository..." ARCH=$(dpkg --print-architecture) echo "deb [signed-by=/usr/share/keyrings/mullvad-keyring.asc arch=$ARCH] https://repository.mullvad.net/deb/stable stable main" | \ sudo tee /etc/apt/sources.list.d/mullvad.list > /dev/null # Update and install log "Installing Mullvad Browser..." sudo apt update sudo apt install -y mullvad-browser ;; fedora|rhel|centos) section "Installing via Mullvad RPM Repository" # Add Mullvad repo log "Adding Mullvad repository..." sudo dnf config-manager --add-repo https://repository.mullvad.net/rpm/stable/mullvad.repo # Install log "Installing Mullvad Browser..." sudo dnf install -y mullvad-browser ;; arch|manjaro|endeavouros) section "Installing via AUR" if command -v yay &>/dev/null; then log "Installing via yay..." yay -S --noconfirm mullvad-browser-bin elif command -v paru &>/dev/null; then log "Installing via paru..." paru -S --noconfirm mullvad-browser-bin else warn "No AUR helper found (yay/paru)" log "Installing mullvad-browser-bin manually..." cd /tmp git clone https://aur.archlinux.org/mullvad-browser-bin.git cd mullvad-browser-bin makepkg -si --noconfirm cd .. rm -rf mullvad-browser-bin fi ;; *) error "Unsupported distribution: $DISTRO" log "Please install manually from: https://mullvad.net/en/download/browser" exit 1 ;; esac # Verify installation echo "" if command -v mullvad-browser &>/dev/null; then section "Installation Complete!" log "Mullvad Browser installed successfully" echo "" log "Launch with: mullvad-browser" log "Documentation: https://mullvad.net/en/browser" else error "Installation may have failed - mullvad-browser command not found" exit 1 fi echo "" section "Privacy Features" echo "" cat << 'EOF' Mullvad Browser provides Tor Browser-level privacy WITHOUT Tor: ANTI-FINGERPRINTING: - All users have identical browser fingerprint - Resistant to canvas, WebGL, audio fingerprinting - Letterboxing to hide window size - Timezone spoofing TRACKING PROTECTION: - uBlock Origin pre-installed - First-party isolation - Strict tracking protection - No telemetry or crash reports PRIVACY BY DEFAULT: - No accounts or sync - Private browsing mode encouraged - HTTPS-Only mode - WebRTC leak prevention USE CASE: - When you want Tor-level privacy but need regular internet speed - When Tor is blocked or too slow - For general private browsing without anonymity requirements NOTE: Does NOT route traffic through Tor - use Tor Browser for anonymity EOF echo ""