diff --git a/.env.example b/.env.example index 0791e52..8b99e47 100644 --- a/.env.example +++ b/.env.example @@ -1,4 +1,3 @@ # Build-time environment (never commit real values) -LD_FDPI_APP_SECRET= TAURI_SIGNING_PRIVATE_KEY= TAURI_SIGNING_PRIVATE_KEY_PASSWORD= diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d26fdcb..b9a70e3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -63,7 +63,6 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }} TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }} - LD_FDPI_APP_SECRET: ${{ secrets.LD_FDPI_APP_SECRET }} with: tagName: ${{ github.event_name == 'workflow_dispatch' && format('v{0}', inputs.version) || github.ref_name }} releaseName: "LD FDPI ${{ github.event_name == 'workflow_dispatch' && inputs.version || github.ref_name }}" diff --git a/.gitignore b/.gitignore index 4810b13..1dc2508 100644 --- a/.gitignore +++ b/.gitignore @@ -17,8 +17,11 @@ src-tauri/binaries/*.log !src-tauri/binaries/spoofdpi-x86_64-pc-windows-msvc.exe !src-tauri/binaries/.gitkeep -# Build outputs (uploaded to GitHub Releases instead) +# Build outputs (uploaded to Releases instead) release/ +linuxFDPI/release/ +*.AppImage +*.deb # Logs & OS *.log @@ -34,11 +37,18 @@ Thumbs.db *.sln *.sw? -# Personal SSH shortcut (never publish) -/baðlan.bat - +# Security & Local Server Scripts (NEVER commit) +bağlan.bat +*baglan*.bat +ba*lan.bat *.bat - +publish.ps1 +publish.bat +release.ps1 +.keys/ +secrets.* +config.local.* +linuxFDPI/docs/TEST_RESULTS.md # Private AmneziaWG client config (embedded locally into the installer; never publish source) src-tauri/resources/amnezia_for_awg.conf @@ -66,8 +76,14 @@ src-tauri/.tauri/ *.rej .vscode/ .idea/ +__pycache__/ +*.pyc +*.pyo src-tauri/binaries/*.log -src-tauri/resources/amnezia_for_awg.conf -# Website local output +# Website local output & release archives site/*.tmp +site/*.deb +site/*.zip +site/*-live.html +site/app-live.js \ No newline at end of file diff --git a/LICENSE b/LICENSE index 06fd617..492631d 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2026 LD FDPI Contributors +Copyright (c) 2026 LilDosto Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 48fb8ff..32ebac4 100644 --- a/README.md +++ b/README.md @@ -1,294 +1,96 @@
- LD FDPI logo -

LD FDPI

-

Zero-touch VPN + DPI bypass for Windows.
- Tauri v2 · Rust · React · AmneziaWG · SpoofDPI

-

- - Download - - Windows - MIT - Rust -

+ +# LD FDPI + +**7/24 kesintisiz, hız kayıpsız SpoofDPI yerel proxy ve DPI bypass aracı • 24/7 SpoofDPI local proxy and DPI bypass desktop tool for Windows** + +[![License: MIT](https://img.shields.io/badge/License-MIT-10B981?style=for-the-badge)](./LICENSE) +[![Version](https://img.shields.io/badge/Version-v1.8.12-blue?style=for-the-badge)](https://git.ttmadethat.shop/LilDosto/LD-FDPI/releases/latest) +[![Stack](https://img.shields.io/badge/Stack-Tauri%20v2%20%7C%20Rust%20%7C%20React%2018-orange?style=for-the-badge)](https://v2.tauri.app) +[![Platform](https://img.shields.io/badge/Platform-Windows%2010%2F11%20x64-0078D6?style=for-the-badge)](https://git.ttmadethat.shop/LilDosto/LD-FDPI/releases/latest) + +[🇹🇷 Türkçe](#-türkçe) • [🇬🇧 English](#-english) • [📦 Releases](https://git.ttmadethat.shop/LilDosto/LD-FDPI/releases/latest) +
-**LD FDPI**, Windows 10/11 x64 için iki modlu bir ağ aracıdır: - -- **FDPI:** SpoofDPI tabanlı yerel proxy ile DPI/SNI engellerini aşar. -- **VPN:** AmneziaWG ile Almanya çıkışlı, WFP kill-switch korumalı tünel açar. - -VPN tarafı **zero-touch** çalışır: token, aktivasyon kodu, `.conf` dosyası veya -“İstemciyi Kur” adımı yoktur. İlk **BAĞLAN**’da AmneziaWG ve cihaz profili -otomatik hazırlanır. - -> Bu proje eğitim ve kişisel kullanım için geliştirilmiştir. Bulunduğun ülkenin -> yasalarına ve kullandığın hizmetlerin koşullarına uymak kullanıcının -> sorumluluğundadır. +> **Not / Note:** Bu proje eğitim ve kişisel kullanım içindir; bulunduğunuz ülkenin yasalarına ve hizmet koşullarına uymak kullanıcının sorumluluğundadır. • Intended for educational and personal use; users are responsible for complying with local laws and terms of service. --- -## Özellikler +## 🇹🇷 Türkçe -### Zero-touch VPN +**LD FDPI**, Windows 10/11 x64 üzerinde trafiği uzak VPN sunucuları yerine yerel `127.0.0.1` proxy üzerinden ClientHello parçalama ve Akıllı DoH ile yönlendiren, Tauri v2 ve Rust tabanlı 7/24 DPI bypass aracıdır. -- AmneziaWG istemcisinin sessiz MSI kurulumu. -- MachineGuid + donanım parmak izi ile cihaz kimliği. -- Otomatik `/api/v1/auto-enroll`; token/.conf gerekmez. -- Sunucu tarafında idempotent peer tahsisi. -- Handshake ve servis sağlığı için watchdog. -- Peer düşerse WFP temizliği + otomatik yeniden kayıt + reconnect. +### Özellikler -### Ağ güvenliği +- **FDPI Motoru & Akıllı Strateji:** SHA-256 doğrulamalı SpoofDPI 0.12.2 sidecar (`spoofdpi.exe`), **Normal**, **Oyun (WinINet + WinHTTP)** ve **Eduroam (kampüs MTU 1400 + DIRECT istisnaları)** modları. +- **3 Kademeli Otomatik Profil & Canlı Doğrulama:** `discord.com:443` CONNECT + SChannel TLS probu ile doğrulama ve kısıtlı ağlarda degraded fallback desteği. +- **Akıllı DoH:** Cloudflare, Google ve AdGuard DoH sunucuları arasında en hızlı ölçüm ve ağ değişiminde otomatik önbellek temizliği (`invalidate_doh_cache`). +- **7/24 Dayanıklılık & Proxy Sentinel:** Görev Zamanlayıcısı (`LD_FDPI_AutoStart`) ile açılışta başlatma, ağ hazır olana kadar erken bekleme döngüsü, uyku/ağ değişimi/çökmelere karşı 15 saniyelik supervisor ve çıkış/kapanış anında yedeklenen WinINet/WinHTTP proxy ayarlarını temiz geri yükleme (`--restore-only` kurtarma desteği). +- **WFP QUIC & LAN PAC:** Chrome, Edge, Brave, Opera, Firefox ve Discord için isteğe bağlı WFP QUIC (UDP/443) uyumluluk katmanı ve RFC1918 peer filtreli LAN PAC sunucusu. +- **Güvenli Güncelleme & Arayüz:** Minisign imzalı Tauri updater, güncelleme öncesi otomatik motor/proxy temizliği, tanılama gizleme (`redaction`), sistem tepsisi ve TR/EN arayüz. -- Kalıcı **WFP kill-switch**. -- Tünel DNS’i (`1.1.1.1:53`) dışındaki DNS/DoT çıkışlarının bloklanması. -- IPv6 catch-all ve WebRTC/STUN blokları. -- WFP filtreleri GUI çökse bile çekirdekte kalır; `--restore-only` temizler. -- FDPI için isteğe bağlı **QUIC (UDP/443) uyumluluk modu**. - - Yalnızca Chrome, Edge, Brave, Opera, Firefox ve Discord süreçleri. - - Ayrı WFP sublayer/GUID seti; VPN kill-switch’e dokunmaz. - - Varsayılan kapalı. -- FDPI modunda fiziksel IPv6 DNS/HTTPS sızıntısına karşı opsiyonel WFP bloğu. +### Teknoloji Yığını -### FDPI +- **Masaüstü & Çekirdek:** Tauri v2, Rust (`tokio`, `winreg`, `windows-sys` WinINet/WFP/IP Helper, `sha2`, `sysinfo`, `native-tls`), SpoofDPI 0.12.2 +- **Arayüz:** React 18, Tailwind CSS, Lucide Icons, Vite -- SpoofDPI 0.12.2 sidecar. -- Sistem proxy’si + WinHTTP desteği (game/eduroam modları). -- 3 kademeli otomatik strateji: - 1. Kayıtlı/standart profil - 2. Alternatif DoH + pencere boyu - 3. Turbo/parçalama + yedek DoH -- Her profil `discord.com:443` CONNECT + TLS ile doğrulanır. -- Üç profil de başarısız olursa temel profil açık bırakılır; uygulama çökmez. -- DoH sağlayıcı seçimi: Cloudflare / Google / AdGuard / otomatik. +### Kurulum ve Kullanım -### Dayanıklılık - -- Elektrik kesintisi/`taskkill` sonrası açılışta kirli durum kurtarma. -- Ölü `127.0.0.1:` proxy’sinin sessizce temizlenmesi. -- Yetim `spoofdpi` süreçlerinin temizlenmesi. -- Log rotasyonu (5 MB). -- Tüm yardımcı komutlarda `CREATE_NO_WINDOW`. -- Windows Sandbox/VM testleri için ayrı ortam önerilir. - -### Güncelleme - -- Minisign imzalı Tauri updater. -- `latest.json` + `.sig` doğrulaması. -- İmza/indirme hatasında otomatik kurulum yapılmaz; kullanıcıya hata gösterilir. -- Güncelleme öncesi FDPI/VPN/proxy temizliği (dosya kilidi koruması). - ---- - -## Hızlı Başlangıç - -1. [ttmadethat.shop/ld-fdpi](https://ttmadethat.shop/ld-fdpi) veya - [Releases](https://github.com/L1lDosto/LD-FDPI/releases/latest) sayfasından - `LD-FDPI_*_x64-setup.exe` indir. -2. Kurulumu yönetici olarak çalıştır. -3. Uygulamayı aç. -4. **VPN → BAĞLAN**. -5. FDPI kullanacaksan **FDPI → BAĞLAN**. - -İlk VPN bağlantısında: - -- AmneziaWG otomatik kurulur. -- Cihaz kimliği üretilir. -- Sunucu peer’ı otomatik atanır. -- WFP kill-switch devreye girer. - -Kurulum sonrası internet erişimi kesilirse: - -```powershell -& "C:\Program Files\LD FDPI\ld-fdpi.exe" --restore-only -``` - -Bu komut kalıcı WFP filtrelerini ve proxy sentinel’ini temizler. - ---- - -## Sistem Gereksinimleri - -| Gereksinim | Değer | -|---|---| -| İşletim sistemi | Windows 10 22H2 / Windows 11 x64 | -| Yetki | Yönetici (UAC) | -| WebView2 | Installer içinde bootstrapper | -| İnternet | İlk kayıt ve VPN için | -| Desteklenmeyen | Windows 7, ARM64, Windows Sandbox | - -FDPI’nin kapsamı sistem proxy’sini kullanan uygulamalarla sınırlıdır. Oyunlar, -bazı launcher’lar ve UDP ses trafiği proxy’den geçmez; bu durumda VPN modu -kullanılmalıdır. - ---- - -## Mimari - -```text -┌──────────────────────────────┐ -│ React / Tauri WebView │ -│ BAĞLAN · Ayarlar · Durum │ -└──────────────┬───────────────┘ - │ invoke / commands -┌──────────────▼───────────────┐ -│ Rust core │ -│ supervisor · watchdog │ -│ WFP · proxy sentinel │ -│ updater · identity │ -└───────┬──────────────┬───────┘ - │ │ -┌───────▼──────┐ ┌────▼─────────────┐ -│ SpoofDPI │ │ AmneziaWG │ -│ local proxy │ │ Windows service │ -└──────────────┘ └────┬─────────────┘ - │ - ┌──────▼─────────────┐ - │ Enrollment agent │ - │ peer + /16 pool │ - └────────────────────┘ -``` - ---- - -## Kaynaktan Derleme - -### Gereksinimler - -- Node.js 20+ -- Rust stable (MSVC toolchain) -- Visual Studio Build Tools (C++ Desktop) -- WebView2 Runtime (geliştirme ortamında) - -### Komutlar +**Son Kullanıcı:** +1. [Releases](https://git.ttmadethat.shop/LilDosto/LD-FDPI/releases/latest) sayfasından `LD-FDPI_1.8.12_x64-setup.exe` dosyasını indirin ve yönetici olarak kurun (Windows 10 22H2 / Windows 11 x64). +2. Zorla kapatma sonrasında sistem proxy'si takılı kalırsa temizlemek için: + ```powershell + & "C:\Program Files\LD FDPI\ld-fdpi.exe" --restore-only + ``` +**Geliştirici (Kaynaktan Derleme):** ```powershell npm ci -npm run tauri build -``` - -Çıktı: - -```text -src-tauri/target/release/bundle/nsis/LD FDPI__x64-setup.exe -``` - -### Build-time secret - -Otomatik kayıt için `LD_FDPI_APP_SECRET` derleme sırasında verilmelidir: - -```powershell -$env:LD_FDPI_APP_SECRET = "" -npm run tauri build -``` - -Secret repoya **commit edilmez**. GitHub Actions’ta repository secret olarak -tanımlanır. Bu değer istemci binary’sinden çıkarılabilir; gerçek kullanıcı -kimlik doğrulaması değildir. Sunucu tarafında rate-limit ve cihaz bazlı kayıt -koruma sağlar. - -### Updater imzası - -```powershell -$env:TAURI_SIGNING_PRIVATE_KEY = Get-Content "$HOME\.tauri\ld-fdpi-updater.key" -Raw -$env:TAURI_SIGNING_PRIVATE_KEY_PASSWORD = "" -npm run tauri build -``` - -Private key ve password **asla repoya eklenmez**. Kaybedilirse yeni sürümler -imzalanamaz. - ---- - -## Proje Yapısı - -```text -. -├── src/ React arayüzü -├── src-tauri/ Rust çekirdeği -│ ├── src/ -│ │ ├── engine.rs SpoofDPI yönetimi + probing -│ │ ├── vpn.rs AmneziaWG + watchdog -│ │ ├── wfp_killswitch.rs WFP filtreleri -│ │ ├── identity.rs cihaz kimliği + enrollment -│ │ ├── proxy_sentinel.rs proxy kurtarma -│ │ └── updater.rs güvenli güncelleme -│ ├── capabilities/ Tauri izinleri -│ └── resources/ AmneziaWG MSI -├── deploy/ld-fdpi-enroll/ Python enrollment agent -├── scripts/ build/test yardımcıları -├── site/ tanıtım sayfası -├── docs/ teknik dokümanlar -└── .github/workflows/ CI/CD +npm run check:rust # Rust tip/derleme kontrolü +npm test # Doğrulama testleri +npm run tauri build # Kurulum paketi üretimi ``` --- -## Geliştirme +## 🇬🇧 English +**LD FDPI** is a 24/7 Windows 10/11 x64 DPI bypass and local HTTP/TLS proxy tool powered by Tauri v2, Rust, and SpoofDPI 0.12.2, routing traffic locally through `127.0.0.1` via ClientHello splitting and Smart DoH instead of remote VPN servers. + +### Features + +- **FDPI Engine & Adaptive Strategy:** SHA-256-verified SpoofDPI 0.12.2 sidecar (`spoofdpi.exe`) with **Normal**, **Game (WinINet + WinHTTP)**, and **Eduroam (MTU 1400 + DIRECT bypasses)** modes. +- **3-Tier Profile Probing & Fallback:** Validates profiles with `discord.com:443` CONNECT + SChannel TLS probes and falls back gracefully on restricted networks. +- **Smart DoH:** Benchmarks Cloudflare, Google, and AdGuard DoH resolvers and automatically invalidates cache on network changes (`invalidate_doh_cache`). +- **24/7 Supervisor & Proxy Sentinel:** Task Scheduler (`LD_FDPI_AutoStart`) integration, early-boot network readiness polling, 15s supervisor auto-heal on sleep/IP changes, and guaranteed WinINet/WinHTTP proxy restoration on exit (`--restore-only` recovery command). +- **WFP QUIC & LAN PAC:** Optional WFP QUIC (UDP/443) compatibility sublayers for major browsers/Discord and optional LAN PAC sharing restricted to RFC1918 peers. +- **Signed Updater & Diagnostics:** Minisign-verified Tauri updater, clean pre-update proxy teardown, log redaction, tray icon, and TR/EN UI. + +### Tech Stack + +- **Desktop & Backend:** Tauri v2, Rust (`tokio`, `winreg`, `windows-sys` WinINet/WFP/IP Helper, `sha2`, `sysinfo`, `native-tls`), SpoofDPI 0.12.2 +- **Frontend:** React 18, Tailwind CSS, Lucide Icons, Vite + +### Installation & Usage + +**End Users:** +1. Download `LD-FDPI_1.8.12_x64-setup.exe` from [Releases](https://git.ttmadethat.shop/LilDosto/LD-FDPI/releases/latest) and run the installer as Administrator (Windows 10 22H2 / Windows 11 x64). +2. To manually clear persistent WFP/proxy state after a forced shutdown: + ```powershell + & "C:\Program Files\LD FDPI\ld-fdpi.exe" --restore-only + ``` + +**Developers (Build from Source):** ```powershell npm ci -npm run dev -npm run check:rust -npm test -``` - -Faydalı komutlar: - -```text -npm run tauri dev -npm run tauri build -npm run setup:sidecar -npm run icon:make -``` - -Test bayrakları yalnızca açıkça etkinleştirildiğinde çalışır: - -```powershell -$env:LD_FDPI_TEST_CLI = "1" +npm run check:rust # Rust compile check +npm test # Verification suite +npm run tauri build # Build Windows installer ``` --- -## Güvenlik ve Gizlilik +## 📄 Lisans / License -- Kaynak kod açıktır; güvenlik açıkları için [SECURITY.md](SECURITY.md) izle. -- `APP_SECRET` bir kullanıcı hesabı değildir; cihaz kaydı için abuse bariyeridir. -- Updater yalnızca Minisign imzası doğrulanan paketleri kurar. -- WFP filtreleri yönetici gerektirir; uygulama `requireAdministrator` manifestosuyla çalışır. -- VPN yapılandırması özel anahtar içerir; `%LOCALAPPDATA%\LD-FDPI` altında tutulur. -- Loglara özel anahtar veya token yazılmaz. -- Kod imzası (Authenticode) yoktur; SmartScreen “bilinmeyen yayıncı” uyarabilir. - -### Bilinen sınırlar - -- FDPI, sistem proxy’sini kullanmayan uygulamaları kapsamaz. -- Discord sesi UDP kullanır; FDPI proxy’si UDP taşımaz. -- Tek VPN endpoint’i vardır; otomatik sunucu seçimi/failover yoktur. -- IPv6 için VPN tüneli sınırlıdır; FDPI modunda IPv6 sızıntı bloğu opsiyoneldir. -- Kurumsal GPO/antivirüs, proxy veya WFP değişikliklerini engelleyebilir. - ---- - -## Katkı - -Katkı rehberi: [CONTRIBUTING.md](CONTRIBUTING.md) - -- Yeni özellikler için önce issue aç. -- Secret, anahtar, `.conf` veya kişisel log ekleme. -- `npm run check:rust` ve `npm test` çalıştır. -- PR açıklamasında test ortamını belirt. - ---- - -## Lisans - -[MIT](LICENSE) © 2026 LD FDPI Contributors - -Üçüncü taraf bileşenler: - -- [SpoofDPI](https://github.com/xvzc/SpoofDPI) — MIT -- [AmneziaWG](https://github.com/amnezia-vpn/amneziawg-windows-client) — ilgili lisans -- [Tauri](https://tauri.app) — MIT/Apache-2.0 -- [React](https://react.dev) — MIT +Bu proje [MIT Lisansı](./LICENSE) altında lisanslanmıştır. • Licensed under the [MIT License](./LICENSE). diff --git a/SECURITY.md b/SECURITY.md index f4f03e8..ff811a1 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -4,8 +4,8 @@ | Sürüm | Destek | |---|---| -| 1.7.x | ✅ | -| 1.6.x ve öncesi | ❌ | +| 1.8.x | ✅ | +| 1.7.x ve öncesi | ❌ | ## Güvenlik açığı bildirimi @@ -23,17 +23,14 @@ Alternatif olarak depo sahibine GitHub üzerinden özel mesaj gönder. Özellikle şunlar ilgi alanına girer: -- WFP kill-switch veya FDPI filtrelerinin atlatılması +- FDPI QUIC/WFP uyumluluk kurallarının veya yan etkilerinin atlatılması/kalıcı kilit bırakması - Proxy sentinel’in ölü proxy bırakması -- Enrollment/peer yetkisiz erişim - Updater imza doğrulamasının atlatılması - Path traversal, komut enjeksiyonu, ayrıcalık yükseltme - Hassas anahtar/token sızıntısı ## Bilinen tasarım sınırları -- `LD_FDPI_APP_SECRET` istemci binary’sinden çıkarılabilir; gerçek kullanıcı - kimlik doğrulaması değildir. - Authenticode yoktur; SmartScreen uyarısı beklenir. - FDPI yalnızca sistem proxy’sini kullanan uygulamaları kapsar. - Windows Sandbox, host proxy politikası nedeniyle desteklenmez. diff --git a/deploy/fix_enroll_head.py b/deploy/fix_enroll_head.py deleted file mode 100644 index f8566b8..0000000 --- a/deploy/fix_enroll_head.py +++ /dev/null @@ -1,12 +0,0 @@ -from pathlib import Path -p = Path('/opt/tylorindar-safelink/main.py') -t = p.read_text(encoding='utf-8') -t = t.replace('@app.head("/{code}")\n@app.post("/api/v1/auto-enroll")', '@app.post("/api/v1/auto-enroll")', 1) -old = '@app.get("/{code}")\nasync def redirect_shortlink' -new = '@app.head("/{code}")\n@app.get("/{code}")\nasync def redirect_shortlink' -if old in t: - t = t.replace(old, new, 1) - p.write_text(t, encoding='utf-8') - print('head restored') -else: - print('redirect marker missing') diff --git a/deploy/ld-fdpi-enroll/agent.py b/deploy/ld-fdpi-enroll/agent.py deleted file mode 100644 index 6812937..0000000 --- a/deploy/ld-fdpi-enroll/agent.py +++ /dev/null @@ -1,399 +0,0 @@ -#!/usr/bin/env python3 -"""Dependency-free LD FDPI enrollment agent (host, Docker access only locally).""" -import base64, hashlib, hmac, json, os, re, secrets, sqlite3, subprocess, sys -from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer -from datetime import datetime, timezone - -DB = os.environ.get("LD_FDPI_ENROLL_DB", "/opt/ld-fdpi-enroll/enroll.db") -CONTAINER = os.environ.get("LD_FDPI_AWG_CONTAINER", "amnezia-awg2") -CONF = os.environ.get("LD_FDPI_AWG_CONF", "/opt/amnezia/awg/awg0.conf") -SERVER_PUB = os.environ["LD_FDPI_SERVER_PUB"] -ENDPOINT = os.environ.get("LD_FDPI_ENDPOINT", "116.202.14.171:42771") -APP_SECRET = os.environ.get("LD_FDPI_APP_SECRET", "") -AWG_JSON = os.environ.get("LD_FDPI_AWG_PARAMS_FILE", "/opt/ld-fdpi-enroll/awg.json") -try: - with open(AWG_JSON, encoding="utf-8") as fh: - AWG = json.load(fh) -except Exception: - AWG = {} -PUBKEY_RE = re.compile(r"^[A-Za-z0-9+/]{42}[AEIMQUYcgkosw048]=$") -DEVICE_RE = re.compile(r"^[a-f0-9]{64}$") - - -def conn(): - c = sqlite3.connect(DB, timeout=10, isolation_level=None) - c.execute("PRAGMA journal_mode=WAL") - c.execute("PRAGMA busy_timeout=10000") - c.execute("""CREATE TABLE IF NOT EXISTS tokens ( - token_hash TEXT PRIMARY KEY, used_by_device TEXT, allocated_ip TEXT, - public_key TEXT, psk TEXT, used_at TEXT)""") - c.execute("""CREATE TABLE IF NOT EXISTS devices ( - device_id TEXT PRIMARY KEY, allocated_ip TEXT UNIQUE, public_key TEXT UNIQUE, - psk TEXT NOT NULL, created_at TEXT NOT NULL, updated_at TEXT NOT NULL)""") - c.execute("""CREATE TABLE IF NOT EXISTS rate ( - bucket TEXT PRIMARY KEY, ts INTEGER NOT NULL, count INTEGER NOT NULL)""") - return c - - -def th(token): - return hashlib.sha256(token.encode()).hexdigest() - - -def rate(c, bucket, limit=5): - now = int(datetime.now(timezone.utc).timestamp()) - c.execute("DELETE FROM rate WHERE ts < ?", (now - 600,)) - row = c.execute("SELECT ts,count FROM rate WHERE bucket=?", (bucket,)).fetchone() - if not row or now - row[0] > 60: - c.execute("INSERT OR REPLACE INTO rate VALUES(?,?,1)", (bucket, now)) - elif row[1] >= limit: - raise ValueError("rate") - else: - c.execute("UPDATE rate SET count=count+1 WHERE bucket=?", (bucket,)) - - -def ensure_pool_route(): - """Keep the expanded pool routed through awg0 after container restarts.""" - subprocess.run( - ["docker", "exec", CONTAINER, "ip", "route", "replace", - "10.8.0.0/16", "dev", "awg0"], - check=False, - ) - - -def candidate_ips(): - for i in range(20, 255): - yield f"10.8.1.{i}" - for third in range(2, 255): - for fourth in range(2, 255): - yield f"10.8.{third}.{fourth}" - - -def ip_alloc(c, evict=False): - def used_ips(): - return {r[0] for r in c.execute( - "SELECT allocated_ip FROM devices WHERE allocated_ip IS NOT NULL " - "UNION SELECT allocated_ip FROM tokens WHERE allocated_ip IS NOT NULL" - )} - - used = used_ips() - for ip in candidate_ips(): - if ip not in used: - if not ip.startswith("10.8.1."): - ensure_pool_route() - return ip - if evict: - evicted = evict_inactive(c) - if evicted: - used = used_ips() - for ip in candidate_ips(): - if ip not in used: - if not ip.startswith("10.8.1."): - ensure_pool_route() - return ip - raise ValueError("pool") - - -def awg_handshakes(): - result = subprocess.run( - ["docker", "exec", CONTAINER, "awg", "show", "awg0", "latest-handshakes"], - capture_output=True, text=True, check=False, - ) - if result.returncode != 0: - return None - handshakes = {} - for line in result.stdout.splitlines(): - parts = line.split() - if len(parts) >= 2 and parts[1].isdigit(): - handshakes[parts[0]] = int(parts[1]) - return handshakes - - -def evict_inactive(c): - """Free one IP from a peer with no handshake for 30+ days.""" - handshakes = awg_handshakes() - if handshakes is None: - return False - cutoff = int(datetime.now(timezone.utc).timestamp()) - 30 * 24 * 3600 - rows = list(c.execute( - "SELECT device_id, public_key, allocated_ip, updated_at FROM devices" - )) - candidates = [] - for device, pub, ip, updated in rows: - last = handshakes.get(pub, 0) - if last == 0 or last < cutoff: - candidates.append((last, updated or "", device, pub, ip)) - candidates.sort() - for last, _updated, device, pub, ip in candidates: - subprocess.run( - ["docker", "exec", CONTAINER, "awg", "set", "awg0", "peer", pub, "remove"], - check=False, - ) - awg_remove_conf(pub) - c.execute("DELETE FROM devices WHERE device_id=?", (device,)) - print(f"evicted inactive peer device={device[:8]} ip={ip} last={last}", file=sys.stderr) - return True - return False - - -def awg_remove_conf(pub): - """Drop a rotated peer block so a container restart cannot revive it.""" - script = ( - f"awk -v pub='{pub}' '" - "/^\\[Peer\\]$/ { inpeer=1; block=$0 \"\\n\"; next } " - "inpeer { block=block $0 \"\\n\"; " - "if ($0 ~ /^AllowedIPs[[:space:]]*=/) { " - "if (index(block, \"PublicKey = \" pub) == 0) printf \"%s\", block; " - "inpeer=0; block=\"\" } next } " - "{ print } END { if (inpeer) printf \"%s\", block }' " - f"{CONF} > {CONF}.tmp && mv {CONF}.tmp {CONF}" - ) - subprocess.run(["docker", "exec", CONTAINER, "sh", "-c", script], check=False) - - -def awg_set(pub, ip, psk, persist=True): - append = "" - if persist: - append = ( - f"printf '\\n[Peer]\\nPublicKey = {pub}\\nPresharedKey = ' >> {CONF}; " - f"cat /tmp/ld-fdpi.psk >> {CONF}; " - f"printf '\\nAllowedIPs = {ip}/32\\n' >> {CONF}; " - ) - script = ( - "umask 077; cat > /tmp/ld-fdpi.psk; " - f"awg set awg0 peer {pub} preshared-key /tmp/ld-fdpi.psk allowed-ips {ip}/32; " - + append + - "rm -f /tmp/ld-fdpi.psk" - ) - subprocess.run(["docker", "exec", "-i", CONTAINER, "sh", "-c", script], - input=psk.encode(), check=True) - - -def legacy_enrollment(pub, device): - c = conn() - try: - c.execute("BEGIN IMMEDIATE") - row = c.execute("SELECT used_by_device,allocated_ip,public_key,psk FROM tokens WHERE used_by_device=?", - (device,)).fetchone() - if not row: - raise ValueError("unauthorized") - used, ip, old_pub, psk = row - if old_pub == pub: - c.execute("COMMIT") - return ip, psk - token = c.execute("SELECT token_hash FROM tokens WHERE used_by_device=?", (device,)).fetchone()[0] - if old_pub: - subprocess.run(["docker", "exec", CONTAINER, "awg", "set", "awg0", "peer", old_pub, "remove"], check=False) - awg_remove_conf(old_pub) - psk = base64.b64encode(secrets.token_bytes(32)).decode() - awg_set(pub, ip, psk) - c.execute("UPDATE tokens SET public_key=?,psk=?,used_at=? WHERE token_hash=?", - (pub, psk, datetime.now(timezone.utc).isoformat(), token)) - c.execute("COMMIT") - return ip, psk - finally: - c.close() - - -def auto_enrollment(pub, device): - """Idempotent per-device enrollment. Same key returns the same peer/IP.""" - c = conn() - try: - c.execute("BEGIN IMMEDIATE") - row = c.execute("SELECT allocated_ip,public_key,psk FROM devices WHERE device_id=?", - (device,)).fetchone() - if row: - ip, old_pub, psk = row - if old_pub == pub: - # Idempotent retry: re-apply the peer, because it may have been - # removed from the container while the DB record remained. - awg_set(pub, ip, psk, persist=False) - c.execute("COMMIT") - return ip, psk - other = c.execute("SELECT device_id FROM devices WHERE public_key=? AND device_id<>?", - (pub, device)).fetchone() - if other: - c.execute("ROLLBACK") - raise ValueError("key-in-use") - if old_pub: - subprocess.run(["docker", "exec", CONTAINER, "awg", "set", "awg0", "peer", old_pub, "remove"], check=False) - awg_remove_conf(old_pub) - psk = base64.b64encode(secrets.token_bytes(32)).decode() - awg_set(pub, ip, psk, persist=True) - c.execute("UPDATE devices SET public_key=?,psk=?,updated_at=? WHERE device_id=?", - (pub, psk, datetime.now(timezone.utc).isoformat(), device)) - c.execute("COMMIT") - return ip, psk - - other = c.execute("SELECT device_id FROM devices WHERE public_key=?", (pub,)).fetchone() - if other: - c.execute("ROLLBACK") - raise ValueError("key-in-use") - ip = ip_alloc(c, evict=True) - psk = base64.b64encode(secrets.token_bytes(32)).decode() - awg_set(pub, ip, psk, persist=True) - now = datetime.now(timezone.utc).isoformat() - c.execute("INSERT INTO devices(device_id,allocated_ip,public_key,psk,created_at,updated_at) " - "VALUES(?,?,?,?,?,?)", (device, ip, pub, psk, now, now)) - c.execute("COMMIT") - return ip, psk - except Exception: - try: - c.execute("ROLLBACK") - except Exception: - pass - raise - finally: - c.close() - - -def response_for(ip, psk): - return 200, { - "address": f"{ip}/32", - "dns": ["1.1.1.1", "1.0.0.1"], - "server_public_key": SERVER_PUB, - "preshared_key": psk, - "endpoint": ENDPOINT, - "allowed_ips": ["0.0.0.0/0", "::/0"], - "awg": { - "jc": 5, "jmin": 10, "jmax": 50, - "s1": 12, "s2": 12, "s3": 12, "s4": 12, - "h1": 1, "h2": 2, "h3": 3, "h4": 4, - "header_protection_key": AWG.get("header_protection_key", ""), - "rekey_after_time": "100-120", "rekey_timeout": "3-7", - "reject_after_time": "150-180", "keepalive_timeout": "5-15", - "max_handshake_attempts": "15-20", - "random_trailers": True, "disable_cookies": True, - }, - } - - -def parse_request(handler): - length = int(handler.headers.get("Content-Length", "0")) - if length <= 0 or length > 8192: - raise ValueError("bad request") - body = json.loads(handler.rfile.read(length)) - pub = str(body.get("public_key", "")) - device = str(body.get("device_id", "")) - if not PUBKEY_RE.match(pub) or not DEVICE_RE.match(device): - raise ValueError("invalid key/device") - base64.b64decode(pub, validate=True) - return pub, device - - -def handle_enroll(handler): - try: - pub, device = parse_request(handler) - except Exception: - return 400, {"error": "bad request"} - token = handler.headers.get("Authorization", "").removeprefix("Bearer ").strip() - if not token: - return 401, {"error": "missing token"} - c = conn() - try: - c.execute("BEGIN IMMEDIATE") - rate(c, th(token)) - row = c.execute("SELECT used_by_device,allocated_ip,public_key,psk FROM tokens WHERE token_hash=?", - (th(token),)).fetchone() - if not row: - c.execute("ROLLBACK") - return 401, {"error": "invalid token"} - used, ip, old_pub, psk = row - if used is not None and used != device: - c.execute("ROLLBACK") - return 409, {"error": "token used on another device"} - if used == device and ip and psk: - if old_pub and old_pub != pub: - subprocess.run(["docker", "exec", CONTAINER, "awg", "set", "awg0", "peer", old_pub, "remove"], check=False) - psk = base64.b64encode(secrets.token_bytes(32)).decode() - awg_set(pub, ip, psk) - else: - ip = ip_alloc(c) - psk = base64.b64encode(secrets.token_bytes(32)).decode() - awg_set(pub, ip, psk) - c.execute("UPDATE tokens SET used_by_device=?,allocated_ip=?,public_key=?,psk=?,used_at=? WHERE token_hash=?", - (device, ip, pub, psk, datetime.now(timezone.utc).isoformat(), th(token))) - c.execute("COMMIT") - except ValueError as e: - c.execute("ROLLBACK") - return (429 if str(e) == "rate" else 401), {"error": str(e)} - except Exception: - c.execute("ROLLBACK") - return 500, {"error": "enrollment failed"} - finally: - c.close() - return response_for(ip, psk) - - -def handle_auto_enroll(handler): - if not APP_SECRET: - return 503, {"error": "auto-enroll disabled"} - if not hmac.compare_digest(handler.headers.get("X-App-Secret", ""), APP_SECRET): - return 401, {"error": "unauthorized"} - try: - pub, device = parse_request(handler) - except Exception: - return 400, {"error": "bad request"} - ip_hint = (handler.headers.get("X-Real-IP") or handler.headers.get("CF-Connecting-IP") - or handler.client_address[0]) - c = conn() - try: - c.execute("BEGIN IMMEDIATE") - rate(c, "ip:" + ip_hint, 20) - rate(c, "dev:" + ip_hint + ":" + device, 5) - c.execute("COMMIT") - except ValueError as e: - c.execute("ROLLBACK") - return (429 if str(e) == "rate" else 400), {"error": str(e)} - except Exception: - c.execute("ROLLBACK") - return 500, {"error": "enrollment failed"} - finally: - c.close() - try: - ip, psk = auto_enrollment(pub, device) - except ValueError as e: - if str(e) == "pool": - return 503, {"error": "pool exhausted"} - if str(e) == "key-in-use": - return 409, {"error": "public key already enrolled"} - return 400, {"error": str(e)} - except Exception: - return 502, {"error": "peer setup failed"} - return response_for(ip, psk) - - -class Handler(BaseHTTPRequestHandler): - def log_message(self, fmt, *args): - sys.stderr.write("enroll: " + fmt % args + "\n") - - def do_POST(self): - if self.path == "/api/v1/enroll": - code, payload = handle_enroll(self) - elif self.path == "/api/v1/auto-enroll": - code, payload = handle_auto_enroll(self) - else: - code, payload = 404, {"error": "not found"} - self.reply(code, payload) - - def reply(self, code, payload): - data = json.dumps(payload).encode() - self.send_response(code) - self.send_header("Content-Type", "application/json") - self.send_header("Content-Length", str(len(data))) - self.end_headers() - self.wfile.write(data) - - -if __name__ == "__main__": - if len(sys.argv) > 1 and sys.argv[1] == "--mint": - token = "LDFDPI-" + "-".join( - "".join(secrets.choice("ABCDEFGHJKLMNPQRSTUVWXYZ23456789") for _ in range(4)) - for _ in range(3) - ) - c = conn() - c.execute("INSERT INTO tokens(token_hash) VALUES(?)", (th(token),)) - c.close() - print(token) - raise SystemExit(0) - ensure_pool_route() - ThreadingHTTPServer(("172.17.0.1", 9471), Handler).serve_forever() diff --git a/deploy/ld-fdpi-enroll/ld-fdpi-enroll.service b/deploy/ld-fdpi-enroll/ld-fdpi-enroll.service deleted file mode 100644 index d6a9322..0000000 --- a/deploy/ld-fdpi-enroll/ld-fdpi-enroll.service +++ /dev/null @@ -1,19 +0,0 @@ -[Unit] -Description=LD FDPI Enrollment Agent -After=network.target docker.service -Requires=docker.service - -[Service] -Type=simple -User=root -WorkingDirectory=/opt/ld-fdpi-enroll -EnvironmentFile=/opt/ld-fdpi-enroll/.env -ExecStartPre=/usr/bin/python3 /opt/ld-fdpi-enroll/sync_peers.py -ExecStart=/usr/bin/python3 /opt/ld-fdpi-enroll/agent.py -Restart=always -RestartSec=3 -NoNewPrivileges=true -PrivateTmp=true - -[Install] -WantedBy=multi-user.target diff --git a/deploy/ld-fdpi-enroll/main.py b/deploy/ld-fdpi-enroll/main.py deleted file mode 100644 index 9d993a2..0000000 --- a/deploy/ld-fdpi-enroll/main.py +++ /dev/null @@ -1,209 +0,0 @@ -"""LD FDPI one-time, device-bound enrollment agent. - -Run as a host systemd service (not inside the public FastAPI container) so it -can call `docker exec` without exposing the Docker socket to the web app. - -Environment: - LD_FDPI_ENROLL_DB default /opt/ld-fdpi-enroll/enroll.db - LD_FDPI_AWG_CONTAINER default amnezia-awg2 - LD_FDPI_SERVER_PUB AmneziaWG server public key (base64) - LD_FDPI_ENDPOINT default 116.202.14.171:42771 - LD_FDPI_AWG_PARAMS_JSON optional JSON object with jc/jmin/... fields - LD_FDPI_ADMIN_TOKEN token that can mint enrollment codes via /admin/token -""" - -from __future__ import annotations - -import base64 -import hashlib -import hmac -import json -import os -import re -import secrets -import sqlite3 -import subprocess -from datetime import datetime, timezone - -from fastapi import FastAPI, Header, HTTPException -from pydantic import BaseModel, Field - -DB = os.environ.get("LD_FDPI_ENROLL_DB", "/opt/ld-fdpi-enroll/enroll.db") -CONTAINER = os.environ.get("LD_FDPI_AWG_CONTAINER", "amnezia-awg2") -CONF = os.environ.get("LD_FDPI_AWG_CONF", "/opt/amnezia/awg/awg0.conf") -SERVER_PUB = os.environ["LD_FDPI_SERVER_PUB"] -ENDPOINT = os.environ.get("LD_FDPI_ENDPOINT", "116.202.14.171:42771") -ADMIN_TOKEN = os.environ.get("LD_FDPI_ADMIN_TOKEN", "") -AWG = json.loads(os.environ.get("LD_FDPI_AWG_PARAMS_JSON", "{}")) -PUBKEY_RE = re.compile(r"^[A-Za-z0-9+/]{42}[AEIMQUYcgkosw048]=$") -DEVICE_RE = re.compile(r"^[a-f0-9]{64}$") - -app = FastAPI(title="LD FDPI enrollment", docs_url=None, redoc_url=None) - - -def db() -> sqlite3.Connection: - conn = sqlite3.connect(DB, timeout=10, isolation_level=None) - conn.execute("PRAGMA journal_mode=WAL") - conn.execute("PRAGMA busy_timeout=10000") - conn.execute( - """CREATE TABLE IF NOT EXISTS tokens ( - token_hash TEXT PRIMARY KEY, - used_by_device TEXT, - allocated_ip TEXT, - public_key TEXT, - psk TEXT, - used_at TEXT - )""" - ) - conn.execute( - """CREATE TABLE IF NOT EXISTS rate ( - bucket TEXT PRIMARY KEY, - ts INTEGER NOT NULL, - count INTEGER NOT NULL - )""" - ) - return conn - - -def token_hash(token: str) -> str: - return hashlib.sha256(token.encode()).hexdigest() - - -def check_rate(conn: sqlite3.Connection, bucket: str) -> None: - now = int(datetime.now(timezone.utc).timestamp()) - row = conn.execute("SELECT ts, count FROM rate WHERE bucket=?", (bucket,)).fetchone() - if not row or now - row[0] > 60: - conn.execute("INSERT OR REPLACE INTO rate(bucket, ts, count) VALUES(?,?,1)", (bucket, now)) - return - if row[1] >= 5: - raise HTTPException(429, "rate limit") - conn.execute("UPDATE rate SET count=count+1 WHERE bucket=?", (bucket,)) - - -def allocate_ip(conn: sqlite3.Connection) -> str: - used = { - row[0] - for row in conn.execute("SELECT allocated_ip FROM tokens WHERE allocated_ip IS NOT NULL") - } - for i in range(20, 251): - ip = f"10.8.1.{i}" - if ip not in used: - return ip - raise HTTPException(503, "IP pool exhausted") - - -def awg_set(public_key: str, ip: str, psk: str) -> None: - script = ( - "umask 077; cat > /tmp/ld-fdpi.psk; " - f"awg set awg0 peer {public_key} preshared-key /tmp/ld-fdpi.psk allowed-ips {ip}/32; " - f"printf '\\n[Peer]\\nPublicKey = {public_key}\\nPresharedKey = %s\\nAllowedIPs = {ip}/32\\n' " - '"$(cat /tmp/ld-fdpi.psk)" >> ' + CONF + "; rm -f /tmp/ld-fdpi.psk" - ) - subprocess.run( - ["docker", "exec", "-i", CONTAINER, "sh", "-c", script], - input=psk.encode(), - check=True, - ) - - -class Enroll(BaseModel): - public_key: str = Field(min_length=44, max_length=44) - client_version: str = Field(max_length=32) - device_id: str = Field(min_length=64, max_length=64) - - -@app.post("/api/v1/enroll") -def enroll(req: Enroll, authorization: str = Header(default="")): - token = authorization.removeprefix("Bearer ").strip() - if not token or not PUBKEY_RE.match(req.public_key) or not DEVICE_RE.match(req.device_id): - raise HTTPException(400, "invalid request") - - base64.b64decode(req.public_key, validate=True) - th = token_hash(token) - conn = db() - try: - conn.execute("BEGIN IMMEDIATE") - check_rate(conn, th) - row = conn.execute( - "SELECT used_by_device, allocated_ip, public_key, psk FROM tokens WHERE token_hash=?", - (th,), - ).fetchone() - if not row: - raise HTTPException(401, "invalid token") - - used_by, ip, old_pub, psk = row - if used_by is not None and used_by != req.device_id: - raise HTTPException(409, "token already used on another device") - - if used_by == req.device_id and ip and psk: - # Idempotent re-install: same device gets the same IP/PSK. - if old_pub and old_pub != req.public_key: - subprocess.run( - ["docker", "exec", CONTAINER, "awg", "set", "awg0", "peer", old_pub, "remove"], - check=False, - ) - psk = base64.b64encode(secrets.token_bytes(32)).decode() - awg_set(req.public_key, ip, psk) - else: - ip = allocate_ip(conn) - psk = base64.b64encode(secrets.token_bytes(32)).decode() - awg_set(req.public_key, ip, psk) - - conn.execute( - "UPDATE tokens SET used_by_device=?, allocated_ip=?, public_key=?, psk=?, used_at=? " - "WHERE token_hash=?", - (req.device_id, ip, req.public_key, psk, datetime.now(timezone.utc).isoformat(), th), - ) - conn.execute("COMMIT") - except HTTPException: - conn.execute("ROLLBACK") - raise - except Exception as exc: - conn.execute("ROLLBACK") - raise HTTPException(500, "enrollment failed") from exc - finally: - conn.close() - - return { - "address": f"{ip}/32", - "dns": ["1.1.1.1", "1.0.0.1"], - "server_public_key": SERVER_PUB, - "preshared_key": psk, - "endpoint": ENDPOINT, - "allowed_ips": ["0.0.0.0/0", "::/0"], - "awg": { - "jc": 5, "jmin": 10, "jmax": 50, - "s1": 12, "s2": 12, "s3": 12, "s4": 12, - "h1": 1, "h2": 2, "h3": 3, "h4": 4, - "header_protection_key": AWG.get("header_protection_key", ""), - "rekey_after_time": "100-120", "rekey_timeout": "3-7", - "reject_after_time": "150-180", "keepalive_timeout": "5-15", - "max_handshake_attempts": "15-20", - "random_trailers": True, "disable_cookies": True, - }, - } - - -class TokenRequest(BaseModel): - note: str = "" - - -@app.post("/admin/token") -def mint_token(req: TokenRequest, authorization: str = Header(default="")): - if not ADMIN_TOKEN or not hmac.compare_digest( - authorization.removeprefix("Bearer ").strip(), ADMIN_TOKEN - ): - raise HTTPException(401, "unauthorized") - token = "LDFDPI-" + "-".join( - "".join(secrets.choice("ABCDEFGHJKLMNPQRSTUVWXYZ23456789") for _ in range(4)) - for _ in range(3) - ) - conn = db() - try: - conn.execute( - "INSERT INTO tokens(token_hash) VALUES(?)", - (token_hash(token),), - ) - finally: - conn.close() - return {"token": token, "note": req.note} diff --git a/deploy/ld-fdpi-enroll/sync_peers.py b/deploy/ld-fdpi-enroll/sync_peers.py deleted file mode 100644 index fe9fc5e..0000000 --- a/deploy/ld-fdpi-enroll/sync_peers.py +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/env python3 -"""Restore persisted LD FDPI peers after a container/host restart.""" -import os, sqlite3, subprocess - -DB = os.environ.get("LD_FDPI_ENROLL_DB", "/opt/ld-fdpi-enroll/enroll.db") -CONTAINER = os.environ.get("LD_FDPI_AWG_CONTAINER", "amnezia-awg2") - -conn = sqlite3.connect(DB) -conn.execute( - """CREATE TABLE IF NOT EXISTS tokens ( - token_hash TEXT PRIMARY KEY, used_by_device TEXT, allocated_ip TEXT, - public_key TEXT, psk TEXT, used_at TEXT)""" -) -conn.execute( - """CREATE TABLE IF NOT EXISTS devices ( - device_id TEXT PRIMARY KEY, allocated_ip TEXT UNIQUE, public_key TEXT UNIQUE, - psk TEXT NOT NULL, created_at TEXT NOT NULL, updated_at TEXT NOT NULL)""" -) -rows = conn.execute( - "SELECT public_key, psk, allocated_ip FROM tokens " - "WHERE public_key IS NOT NULL AND allocated_ip IS NOT NULL AND psk IS NOT NULL " - "UNION " - "SELECT public_key, psk, allocated_ip FROM devices " - "WHERE public_key IS NOT NULL AND allocated_ip IS NOT NULL AND psk IS NOT NULL" -).fetchall() -conn.close() - -for pub, psk, ip in rows: - script = ( - "umask 077; cat > /tmp/psk_sync; " - f"awg set awg0 peer {pub} preshared-key /tmp/psk_sync allowed-ips {ip}/32; " - "rm -f /tmp/psk_sync" - ) - subprocess.run( - ["docker", "exec", "-i", CONTAINER, "sh", "-c", script], - input=psk.encode(), - check=False, - ) diff --git a/deploy/update_index_card.py b/deploy/update_index_card.py index 55462d8..7f384e3 100644 --- a/deploy/update_index_card.py +++ b/deploy/update_index_card.py @@ -6,9 +6,9 @@ old_desc = ("Windows için yerel proxy ve DPI bypass aracı. v1.5.10: kalıcı W "VPN endpoint/DHCP/LAN izinleri, DNS 53-853 engeli, IPv6 catch-all ve WebRTC STUN blokları. " "GUI veya tünel servisi çökse bile filtreler çekirdekte kalır; --restore-only temizler. " "C1 cihaz kaydı ve C3 NetMode korunuyor. Rust/Tauri v2 + React + SpoofDPI 0.12.2.") -new_desc = ("Windows için DPI bypass + AmneziaWG VPN. Kur, BAĞLAN'a bas: cihaz profili otomatik oluşur; " - "token veya .conf gerekmez. Kalıcı WFP kill-switch, DNS/IPv6/STUN sızıntı koruması ve " - "10 saniyede kendini onaran tünel. Rust/Tauri v2 + React + SpoofDPI 0.12.2.") +new_desc = ("Windows için hız kayıpsız SpoofDPI yerel proxy ve DPI bypass aracı. Kur, BAĞLAN'a bas: " + "otomatik başlangıç, Akıllı DoH, Proxy Sentinel ve 15 saniyede kendini onaran 7/24 koruma. " + "Rust/Tauri v2 + React + SpoofDPI 0.12.2.") if old_desc not in t: raise SystemExit('card desc not found') t = t.replace(old_desc, new_desc, 1) diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md index f435bc0..8f4afe2 100644 --- a/docs/ARCHITECTURE.md +++ b/docs/ARCHITECTURE.md @@ -3,25 +3,26 @@ ## 1. Katmanlar - **Arayüz (`src/`):** React 18 + Tailwind. `src/utils/engineArgs.js` saf yardımcılar (CLI argümanları, PAC, Tauri tespiti), `src/utils/tauriBridge.js` ise `invoke` sarmalayıcısı ve DOMPurify süzgeci. Simülasyon/mock dalı yoktur; Tauri yoksa açık hata verir. -- **Ayarlar (`src-tauri/src/config.rs`):** `%LOCALAPPDATA%\LD-FDPI\config.json`; `autoStart`, `autoConnect`, `minimizeToTray` varsayılan olarak `true`. Webview yüklenmeden Rust tarafından okunur. -- **Otomatik başlatma (`src-tauri/src/autostart.rs`):** `schtasks /Create /TN LD_FDPI_AutoStart /SC ONLOGON /RL HIGHEST /DELAY 0000:20 /F`. `HKCU\...\Run` kullanılmaz; `requireAdministrator` bir exe oradan UAC'siz başlayamaz. -- **Durum & komutlar (`src-tauri/src/lib.rs`):** `AppState` → `Runtime` + `AppConfig` + `PacHandle`. Uzun işler `spawn_blocking`; UI `get_status` ile 2,5 sn'de bir hafif durum okur. -- **Motor (`src-tauri/src/engine.rs`):** SpoofDPI 0.12.2 sidecar'ı (exe dizini → `binaries/` → manifest), PE + ≥1.5 MB doğrulama, gerçek bayraklar, port bekleme, CONNECT + SChannel TLS probu. +- **Ayarlar (`src-tauri/src/config.rs`):** `%LOCALAPPDATA%\LD-FDPI\config.json` (`version: 6`); `autoStart`, `autoConnect`, `minimizeToTray` varsayılan olarak `true`. Eski config JSON dosyalarındaki miras alanlar (`vpnAutoConnect`, `wfpDnsBlock`) deserializasyon öncesi ayıklanır ve sürüm `< 6` profilleri tek seferde "7/24 kur ve unut" varsayılanlarına geçirilir. +- **Otomatik başlatma (`src-tauri/src/autostart.rs`):** Görev Zamanlayıcısı XML kaydı (`LD_FDPI_AutoStart`, `LogonTrigger` `PT3S` gecikme, `HighestAvailable`, `DisallowStartIfOnBatteries=false`, `StopIfGoingOnBatteries=false`, `ExecutionTimeLimit=PT0S`, `RunOnlyIfNetworkAvailable=false`, `RestartOnFailure` 1 dk × 5; XML başarısız olursa `/SC ONLOGON /RL HIGHEST /DELAY 0000:05` fallback). +- **Durum & komutlar (`src-tauri/src/lib.rs`):** `AppState` → `Runtime` + `AppConfig` + `PacHandle`. Uzun işler `spawn_blocking`; UI `get_status` ile 2,5 sn'de bir hafif durum okur. Windows kapanış/oturum kapatma sinyallerinde (`SetConsoleCtrlHandler` + `WindowEvent::Destroyed`) motor ve sistem proxy'si temizlenir. +- **Motor (`src-tauri/src/engine.rs`):** SpoofDPI 0.12.2 sidecar'ı (exe dizini → `binaries/` → manifest), PE + >=1.5 MB doğrulama, gerçek bayraklar, port bekleme, CONNECT + SChannel TLS probu, 10 dakikalık DoH önbelleği ve ağ değişiminde `invalidate_doh_cache()`, hızlı fiziksel arayüz kontrolü (`physical_network_up()`). +- **WFP Uyumluluk (`src-tauri/src/wfp_killswitch.rs`):** İsteğe bağlı FDPI QUIC/UDP-443 uyumluluk katmanı (`enable_fdpi_quic_block` / `disable_fdpi_quic_block`) ve eski kalıcı kuralları açılışta temizleyen `disable_killswitch()`. - **Sistem proxy (`src-tauri/src/proxy_sentinel.rs`):** Tam yedek (ProxyEnable, ProxyServer, ProxyOverride, AutoConfigURL, AutoDetect), PAC/WPAD'i devre dışı bırakma, `InternetSetOptionW` + `WM_SETTINGCHANGE`, yedek yoksa no-op, dış değişiklik koruması, WinHTTP bayrağı. - **WinHTTP (`src-tauri/src/winhttp.rs`):** Oyun Modu'nda yalnızca mevcut ayar "Direct access" ise `netsh winhttp set proxy`; geri yüklemede `reset proxy`. - **PAC (`src-tauri/src/pac_server.rs`):** `0.0.0.0:`, tokio, `Semaphore(50)`, RFC1918 + `.local` için DIRECT. -## 2. "Kur ve unut" akışı +## 2. "Kur ve unut" (7/24 kesintisiz) akışı -1. `run()` açılmadan önce `run_startup_sentinel_check()` + zombi temizliği. -2. `config.json` okunur, normalize edilir, yazılır. -3. `autostart::apply(auto_start)` görevi oluşturur/siler. +1. `run()` açılmadan önce `hunt_zombie_processes()` + eski WFP/QUIC temizliği + `run_startup_sentinel_check()`. +2. `config.json` okunur, normalize/migrate edilir, yazılır. +3. `autostart::apply(auto_start)` Görev Zamanlayıcısı XML görevini oluşturur/siler. 4. `setup`: - `--minimized`/`--autostart` yoksa pencere gösterilir (config'te `visible:false`). - - `auto_connect` ise **React'ten önce** bir iş parçacığı `do_start` çağırır. + - `auto_connect` ise **React'ten önce** erken açılış döngüsü Wi-Fi/NIC hazır olana dek (`physical_network_up()`, 30 sn / 3 sn aralık) bekleyip `do_start` çağırır ve `degraded` fallback başladıysa ağ gelince tam bağlantıya yükseltir. - `lan_sharing` ise PAC sunucusu arka planda başlatılır. - - 15 sn'lik supervisor başlatılır. -5. Supervisor her turda: `desired_connected`, `connecting`, çocuk süreç, sistem proxy yönlendirmesi ve uyanma (`sleep > 45 sn`) kontrolü. Gerekiyorsa `do_restart`/`do_start`; hata olursa 30 sn backoff. + - 15 sn'lik 7/24 supervisor başlatılır. +5. Supervisor her turda: `desired_connected`, uykudan uyanma (`woke > 25 sn`), yerel IP değişikliği (Wi-Fi/Ethernet geçişi → `invalidate_doh_cache()` + yeniden bağlanma), çocuk süreç, sistem proxy'sinin LD FDPI'dan sapması ve ~60 sn'de bir (veya `degraded` durumda her turda) canlı bağlantı probu. Hata durumunda `do_restart` → `do_start` ile kurtarır. ## 3. Bağlanma akışı @@ -53,7 +54,7 @@ Herhangi bir adım başarısızsa çocuk süreç öldürülür ve sistem proxy's ## 7. Test kapsamı -- `npm test` (21): sidecar SHA-256 + `-v`, CLI bayrak eşleşmesi, DoH listesi, CSP/IPC, simülasyon yokluğu, PAC eşliği, sentinel güvenliği, **canlı TLS**, i18n, config varsayılanları, UAC/`RL HIGHEST`, 15 sn supervisor, **hash pin + shell/unwrap yokluğu**, **PAC 4 KB/5 sn/peer filtresi**, **sıfır capability + panic hook**, **Eduroam modu**, **Smart DoH/TCP_NODELAY/LTO**, **logo entegrasyonu**, **captive portal asistanı**, **sürüm 1.5.6**. +- `npm test` (22): sidecar SHA-256 + `-v`, CLI bayrak eşleşmesi, DoH listesi, CSP/IPC, simülasyon yokluğu, PAC eşliği, sentinel güvenliği, **canlı TLS**, i18n, "Kur ve unut" v6 varsayılanları, UAC/`RL HIGHEST` + pil/yeniden başlatma dayanıklılığı, 15 sn supervisor, **hash pin + shell/unwrap yokluğu**, **PAC 4 KB/5 sn/peer filtresi**, **sıfır capability + panic hook**, **Eduroam modu**, **Smart DoH/TCP_NODELAY/LTO**, **logo entegrasyonu**, **captive portal asistanı**, **sürüm senkronizasyonu** ve **saf FDPI + 7/24 denetimi**. - `npm run test:gui` (24): WebView2 IPC, sade arayüz, BAĞLAN/KES, LAN rebind, config.json, autostart uyarısı, `--minimized` + auto-connect + gizli pencere. - `node scripts/security-e2e.mjs` (11): LAN kapalı loopback, LAN açık erişim, PAC 200/413/408, LAN kapatınca geri dönüş, Eduroam modu/status/tanılama/kapanış. - `ld-fdpi.exe --self-test` (12): motor + registry + WinHTTP bayrağı + config round-trip. diff --git a/docs/ZERO_TOUCH.md b/docs/ZERO_TOUCH.md deleted file mode 100644 index cc318ad..0000000 --- a/docs/ZERO_TOUCH.md +++ /dev/null @@ -1,159 +0,0 @@ -# Zero-touch Auto-Enrollment - -The old one-time token flow is replaced by a per-device, idempotent -auto-enrollment flow. - -## Flow - -```text -BAĞLAN - -> AmneziaWG missing? install MSI silently (app runs elevated) - -> config missing? POST /api/v1/auto-enroll - -> save %LOCALAPPDATA%\LD-FDPI\ld-fdpi.conf - -> install/start AmneziaWGTunnel$ld-fdpi - -> enable WFP kill-switch - -> wait up to 10 s for tunnel egress - -> on failure: delete config, re-enroll, retry once -``` - -## Identity - -- Windows `HKLM\SOFTWARE\Microsoft\Cryptography\MachineGuid` -- SHA-256(`ld-fdpi-hwid-v1` + lowercased MachineGuid) = 64-char hex `device_id` -- X25519 key pair remains local; private key sealed with DPAPI -- `device_id` is stable across app reinstall and `%LOCALAPPDATA%` deletion - -## API - -`POST https://ttmadethat.shop/api/v1/auto-enroll` - -Headers: - -```text -Content-Type: application/json -X-App-Secret: -``` - -Body: - -```json -{"public_key":"...","device_id":"<64 hex>","client_version":"1.5.10"} -``` - -Behavior: - -- New device -> next free `10.8.1.x/32`, new PSK, peer added. -- Existing device + same public key -> same IP/PSK, peer re-applied. -- Existing device + new public key -> old peer removed, same IP reused. -- Public key already bound to another device -> `409`. -- IP pool exhausted -> `503`. -- Per-IP rate limit: **5 requests / minute**. -- `X-App-Secret` wrong/missing -> `401`. - -## Server deployment - -`/opt/ld-fdpi-enroll/.env`: - -```text -LD_FDPI_APP_SECRET= -``` - -The FastAPI site proxies `/api/v1/auto-enroll` to `172.17.0.1:9471` and forwards -`X-App-Secret`, `X-Real-IP` (Cloudflare client IP). Backup: -`/opt/tylorindar-safelink/backups/main.py.bak-auto-enroll`. - -## Watchdog - -After a successful connect, a watchdog checks the tunnel every 3 seconds. It -does **not** use the local `latest handshake` age: WireGuard only rekeys about -every 2 minutes, and deleting the server peer does not immediately reset the -client's displayed handshake time. - -Checks: - -1. If the AWG service stopped unexpectedly, recovery starts immediately. -2. Otherwise a DNS query to `1.1.1.1:53` goes through the tunnel. WFP blocks - port 53 on the physical interface and permits only the tunnel LUID, so a - direct WAN response cannot mask a dead peer. -3. Three consecutive failed checks (~9 s) trigger WFP teardown, service - stop/delete, config removal, auto-enroll, service reinstall, and WFP re-arm. -4. Recovery is attempted at most 3 times; after that the watchdog stops and - reports an error instead of looping forever. - -If WFP teardown fails, recovery aborts instead of attempting an HTTPS request -through the catch-all block. - -## MSI installation - -The bundled MSI is copied out of `Program Files` to a plain -`%WINDIR%\Temp\ld-amneziawg.msi` path before `msiexec` runs. This avoids -extended `\\?\` paths and Program Files/MSI open failures (`1619`). The MSI log -is written to `%WINDIR%\Temp\ld-awg-msi.log` and its tail is included in the -error if installation fails. - -## Sandbox acceptance result - -Windows Sandbox (`--auto-connect-vpn`) passed: - -- WebView2 + app install -- Silent AmneziaWG MSI install via temp copy -- Automatic enrollment (new `10.8.1.x/32`) -- Service start + handshake -- Tunnel ping (8.8.8.8 through VPN, ~55 ms) -- Server peer deletion -> peer re-added, `latest handshake` refreshed in <40 s - -Not tested: forced WFP-teardown failure and reboot persistence. - -## Headless acceptance flag - -`ld-fdpi.exe --auto-connect-vpn` starts the normal zero-touch pipeline without -UI interaction and writes: - -```text -%LOCALAPPDATA%\LD-FDPI\auto-connect-result.txt -``` - -This exists for Windows Sandbox/CI acceptance testing. - -## Key rotation / stale peer blocks - -When a device re-enrolls with a new public key, the old peer is removed from -the running AWG interface **and** its `[Peer]` block is removed from -`awg0.conf`. Otherwise a container restart could revive the old key on the same -`10.8.1.x/32`, causing endpoint flapping. - -## WFP / retry ordering - -The kill-switch blocks physical egress. Re-enrolling while it is still active -would make the HTTPS request to `ttmadethat.shop` fail, so the retry path is: - -```text -handshake fail - -> disable_killswitch() with 3 attempts - -> if teardown fails: ABORT, keep the tunnel/service state, report error - -> stop service - -> delete config - -> auto-enroll over normal physical HTTPS - -> reinstall/start service -``` - -The API IP is not permanently whitelisted in WFP; that would punch a hole in the -kill-switch. The teardown result is checked instead. - -## Security warning - -`APP_SECRET` is embedded in the installer and is extractable. This is **not** -real authentication; it only stops random scanners. Anyone who extracts it can -enroll devices until the shared secret is rotated and a new client is shipped. - -The IP rate limit also means shared NAT (school/office) can hit 5/minute. -Token enrollment remains available as a legacy endpoint but is no longer used -by the UI. - -## Known limitation - -`MachineGuid` is per Windows installation, not per Windows user. Two Windows -users on the same PC share `device_id`; the last enrollment wins. Disk-cloned -Windows images without Sysprep can also share it. If that becomes common, add -the SMBIOS UUID/baseboard serial to the hash; the current audience is fine with -MachineGuid alone. diff --git a/linuxFDPI/.gitignore b/linuxFDPI/.gitignore new file mode 100644 index 0000000..4db7c1e --- /dev/null +++ b/linuxFDPI/.gitignore @@ -0,0 +1,23 @@ +# Node +node_modules/ +dist/ + +# Rust/Tauri +src-tauri/target/ +src-tauri/gen/ +target/ + +# Secrets / local config +.env +.env.* +*.key +*.pem +*.p12 +*.pfx +*.conf +*.log +*.bak +*.tmp + +# Release +release/ diff --git a/linuxFDPI/LICENSE b/linuxFDPI/LICENSE new file mode 100644 index 0000000..06fd617 --- /dev/null +++ b/linuxFDPI/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 LD FDPI Contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/linuxFDPI/README.md b/linuxFDPI/README.md new file mode 100644 index 0000000..17c36e9 --- /dev/null +++ b/linuxFDPI/README.md @@ -0,0 +1,116 @@ +# LD FDPI Linux + +Linux-native port of LD FDPI. This repository is the **Phase 1 foundation + FDPI MVP** +from the port plan; Windows-specific WFP/registry/MSI code is intentionally not +copied. + +> Status: **development MVP**. Focused purely on local SpoofDPI DPI bypass, +> GNOME system proxy management, and cgroup/nftables QUIC compatibility. See +> [ROADMAP.md](ROADMAP.md). + +![LD FDPI Linux running in Ubuntu VM](docs/screenshot-home.png) + +VM validation is recorded in [docs/TEST_RESULTS.md](docs/TEST_RESULTS.md). + +## What works in this phase + +- Tauri v2 Linux shell (React + Rust) +- Dark Settings/Connection UI +- SpoofDPI sidecar start/stop +- GNOME system proxy apply/restore +- Config persistence under `~/.config/ld-fdpi/config.json` +- Log rotation +- Privileged helper (`ld_fdpi_helper.py` + Unix socket + systemd) +- Build/install/uninstall scripts for Debian/Ubuntu + +## Roadmap items + +- QUIC cgroup filtering refinement +- Additional desktop environments (KDE Plasma / xdg-desktop-portal) +- AppImage/deb release pipeline + +Those are tracked in the roadmap and must not be presented as finished. + +## Compatibility\n\n[Debian-family compatibility matrix](docs/COMPATIBILITY.md)\n\n## Site\n\nhttps://ttmadethat.shop/linux-ld-fdpi\n\n## Requirements + +- Ubuntu 22.04/24.04 GNOME (primary target) +- Node.js 20+ +- Rust stable +- Tauri Linux dependencies: + +```bash +sudo apt install -y \ + libwebkit2gtk-4.1-dev build-essential curl wget file \ + libxdo-dev libssl-dev libayatana-appindicator3-dev librsvg2-dev +``` + +- A Linux build of SpoofDPI at `/usr/lib/ld-fdpi/spoofdpi` (or set + `spoofdpi_path` in config). + +## Development + +```bash +npm ci +npm run dev +``` + +Tauri dev: + +```bash +npm run tauri dev +``` + +## Build + +```bash +npm run tauri build -- --bundles deb,appimage +``` + +## Install + +```bash +sudo ./scripts/install.sh +``` + +This installs: + +```text +/usr/bin/ld-fdpi +/usr/lib/ld-fdpi/spoofdpi +/usr/lib/ld-fdpi/ld_fdpi_helper.py +/etc/systemd/system/ld-fdpi-helper.service +``` + +Then start the helper: + +```bash +sudo systemctl enable --now ld-fdpi-helper +``` + +The GUI never runs as root. The helper only accepts the allowlisted JSON +commands in [helper/ld_fdpi_helper.py](helper/ld_fdpi_helper.py). + +## Layout + +```text +linuxFDPI/ +├── src/ React UI +├── src-tauri/ Tauri/Rust core +├── helper/ root helper + systemd +├── scripts/ install/build/fetch +├── packaging/ desktop entry +└── docs/ architecture, security, tests +``` + +## Security + +See [docs/SECURITY.md](docs/SECURITY.md). Important limits: + +- The helper is an allowlist, not a general root shell. +- `ld-fdpi` user must be in the `ld-fdpi` group to talk to the helper. +- No credentials or app secrets are stored in the repository. +- Proxy and nftables QUIC guard changes must be tested in a VM or dedicated test host. + +## License + +MIT. See [LICENSE](LICENSE). diff --git a/linuxFDPI/ROADMAP.md b/linuxFDPI/ROADMAP.md new file mode 100644 index 0000000..0487c56 --- /dev/null +++ b/linuxFDPI/ROADMAP.md @@ -0,0 +1,53 @@ +# Linux Port Roadmap + +This is the approved phased plan. Nothing is marked complete until it has been +tested on a Linux VM or test host. + +## Phase 0 — Discovery / ADR + +- [x] Target Ubuntu 24.04 GNOME first +- [x] Platform facade (`ProxyManager`, `FirewallManager`) +- [x] Helper model: unprivileged GUI + root allowlist daemon +- [ ] nftables QUIC rule model ADR + +## Phase 1 — Platform foundation / FDPI MVP + +- [x] Tauri v2 Linux shell +- [x] React status/settings UI +- [x] Config persistence +- [x] SpoofDPI sidecar lifecycle +- [x] GNOME system proxy apply/restore +- [x] Helper socket + systemd unit +- [x] Log rotation +- [ ] CI Linux build +- [ ] .deb/AppImage smoke test + +## Phase 2 — FDPI parity + +- [ ] SpoofDPI Linux build pipeline +- [ ] KDE proxy backend +- [ ] PAC/LAN sharing +- [ ] 3-profile auto-strategy +- [ ] QUIC cgroup/nftables filtering +- [ ] Crash recovery + +## Phase 3 — UX / updates + +- [ ] Linux settings search +- [ ] Tauri updater + AppImage/deb packaging +- [ ] Tray/autostart +- [ ] Diagnostics + +## Phase 6 — Hardening + +- [ ] Multi-distro matrix +- [ ] Security review +- [ ] Upgrade/uninstall tests +- [ ] Documentation +- [ ] Release + +## Time estimate + +One senior Linux/Rust engineer: **14–17 weeks**. +With a second developer: **9–12 weeks**. +Production multi-distro parity: **4–6 months**. diff --git a/linuxFDPI/docs/ARCHITECTURE.md b/linuxFDPI/docs/ARCHITECTURE.md new file mode 100644 index 0000000..44c4529 --- /dev/null +++ b/linuxFDPI/docs/ARCHITECTURE.md @@ -0,0 +1,83 @@ +# Architecture + +## Process model + +```text +User session +┌──────────────────────────────┐ +│ React (WebKitGTK) │ +│ invoke Tauri commands │ +└──────────────┬───────────────┘ + │ +┌──────────────▼───────────────┐ +│ ld-fdpi (Rust, user) │ +│ config · SpoofDPI lifecycle │ +│ GNOME proxy · helper client │ +└───────┬─────────────┬─────────┘ + │ │ Unix socket + │ │ +┌───────▼──────┐ ┌────▼─────────────┐ +│ spoofdpi │ │ ld-fdpi-helper │ +│ local proxy │ │ root/systemd │ +└──────────────┘ │ nftables/awg │ + └──────────────────┘ +``` + +The GUI is never started with `sudo`. The helper is the only privileged +component and exposes a small JSON allowlist over +`/run/ld-fdpi/helper.sock`. + +## Platform facade + +Windows-specific code is not part of this crate. Linux managers are separate +modules so later phases can replace them: + +```text +config.rs persisted JSON +proxy.rs GNOME gsettings (KDE in Phase 2) +helper.rs Unix socket client +spoofdpi.rs sidecar lifecycle +main.rs Tauri commands + state +``` + +## FDPI flow + +```text +start_fdpi + -> port free + -> spawn spoofdpi + -> wait for local TCP + -> save GNOME proxy state + -> set GNOME HTTP/HTTPS proxy + -> store child +``` + +Stop reverses it and always restores the previous proxy, including on error. + +## Privileged helper + +- `SO_PEERCRED` peer validation. +- Allowed UID root or member of `ld-fdpi` group. +- One JSON object per line. +- No shell interpolation. +- Commands are fixed strings; unknown commands return an error. + +Implemented helper commands: + +```text +status +quic_on / quic_off (Phase 2; currently explicit not-implemented) +vpn_up / vpn_down (Phase 3; currently explicit not-implemented) +``` + +## Packaging + +Tauri bundles: + +```text +deb +appimage +``` + +Helper and systemd unit are installed by `scripts/install.sh`; this is a +development installer, not the final package layout. diff --git a/linuxFDPI/docs/COMPATIBILITY.md b/linuxFDPI/docs/COMPATIBILITY.md new file mode 100644 index 0000000..46ae330 --- /dev/null +++ b/linuxFDPI/docs/COMPATIBILITY.md @@ -0,0 +1,55 @@ +# Linux Compatibility + +## Supported + +Modern Debian-based distributions with **WebKitGTK 4.1** and **x86_64**: + +| Distribution | Status | +| --- | --- | +| Debian 12 / 13 | Debian 13 tested | +| Ubuntu 22.04 / 24.04 | supported | +| Zorin OS 17 / 18 | tested (18.1) | +| Linux Mint 21 / 22 | supported | +| Pop!_OS 22.04 / 24.04 | supported | +| Kali Linux 2024 / 2025 | supported | +| elementary OS 7 / 8 | supported | + +The `.deb` resolves the Tauri/WebKitGTK runtime dependencies through `apt`. + +## Desktop proxy backends + +| Desktop | Backend | +| --- | --- | +| GNOME, Ubuntu, Zorin, Budgie, Pantheon | `gsettings` | +| Cinnamon | `gsettings` (GNOME proxy schema) | +| MATE | `gsettings` (MATE proxy schema) | +| KDE Plasma 5/6 | `kwriteconfig` + `kioslaverc` | +| XFCE, LXQt, Openbox, headless | environment file `~/.config/environment.d/90-ld-fdpi.conf` | + +The environment backend applies to newly started applications. For XFCE/LXQt, +log out and back in after enabling FDPI so the desktop session picks it up. +GNOME/MATE/KDE apply immediately. + +## Not supported by this build + +- Debian 11 / Ubuntu 20.04 (WebKitGTK 4.0 only) +- ARM64 builds +- non-apt distributions +- immutable images without writable `/usr` (use a container or layer) + +## Verification commands + +```bash +ld-fdpi-linux --version 2>/dev/null || true +systemctl status ld-fdpi-helper --no-pager +gsettings get org.gnome.system.proxy mode 2>/dev/null || true +``` + +## Phase status + +- Phase 1: FDPI, desktop proxy, helper — done. +- Phase 2: QUIC cgroup guard + IPv6 UDP/443 guard — helper implemented. +- Phase 3: AmneziaWG VPN — pending. +- Phase 4: kill-switch — pending. +- Phase 5: updater/AppImage — pending. +- Phase 6: full matrix — pending. diff --git a/linuxFDPI/docs/SECURITY.md b/linuxFDPI/docs/SECURITY.md new file mode 100644 index 0000000..0fda7bd --- /dev/null +++ b/linuxFDPI/docs/SECURITY.md @@ -0,0 +1,38 @@ +# Security + +## Trust boundaries + +| Component | Privilege | Trust | +|---|---|---| +| React UI | user | untrusted input | +| `ld-fdpi` Rust core | user | validated commands | +| `ld-fdpi-helper` | root | allowlist daemon | +| `spoofdpi` | user | local proxy only | + +## Helper rules + +- Unix socket at `/run/ld-fdpi/helper.sock` +- mode `0660`, group `ld-fdpi` +- peer credentials checked with `SO_PEERCRED` +- only root or members of `ld-fdpi` +- JSON allowlist +- no `shell=True`, no string-built command lines +- fixed `awg`/`nft` paths + +## Network safety + +- Do not apply nftables rules on the development host without a VM. +- Phase 4 kill-switch must include an SSH lockout guard. +- All firewall changes must have a `--restore-only` equivalent. +- Helper crashes must not leave a drop-all rule active. + +## Secrets + +- No `APP_SECRET`, private key, `.conf`, or token is committed. +- VPN keys will use Secret Service/keyring in Phase 3. +- Config files are user-readable only (`0600`). + +## Known gaps + +This MVP does **not** implement the VPN kill-switch or QUIC guard. Do not +describe it as a hardened VPN client until Phases 3–4 are complete. diff --git a/linuxFDPI/docs/SIDECAR.md b/linuxFDPI/docs/SIDECAR.md new file mode 100644 index 0000000..e1904f1 --- /dev/null +++ b/linuxFDPI/docs/SIDECAR.md @@ -0,0 +1,23 @@ +# SpoofDPI Linux sidecar + +This MVP uses the Linux SpoofDPI **1.5.5** CLI (`--listen-addr host:port`, +`--dns-mode https`, `--no-tui`). + +Place a Linux build at: + +```text +/usr/lib/ld-fdpi/spoofdpi +``` + +or configure an explicit path: + +```json +{ + "spoofdpiPath": "/opt/ld-fdpi/spoofdpi" +} +``` + +Build from the upstream SpoofDPI Go project, verify its checksum, then install +with mode `0755`. Do not use the Windows `.exe` sidecar. + +Phase 2 will add a reproducible build pipeline and checksum pinning. diff --git a/linuxFDPI/docs/TESTPLAN.md b/linuxFDPI/docs/TESTPLAN.md new file mode 100644 index 0000000..dd107a5 --- /dev/null +++ b/linuxFDPI/docs/TESTPLAN.md @@ -0,0 +1,48 @@ +# Linux Test Plan + +All network/kill-switch tests must run in a **VM or disposable test host**, never +on the development workstation. + +## Phase 1 — FDPI MVP + +- [ ] Fresh Ubuntu 24.04 GNOME install +- [ ] `npm ci && npm run tauri build` succeeds +- [ ] GUI starts without root +- [ ] SpoofDPI path detected +- [ ] `start_fdpi` opens `127.0.0.1:18080` +- [ ] GNOME proxy switches to manual +- [ ] `discord.com` TLS works through proxy +- [ ] Stop restores previous GNOME proxy +- [ ] Kill GUI process; next start restores proxy backup +- [ ] Port already in use returns a clear error +- [ ] Missing SpoofDPI returns a clear error +- [ ] KDE returns “Phase 2” error, does not corrupt proxy + +## Helper + +- [ ] systemd unit starts +- [ ] socket mode `0660`, group `ld-fdpi` +- [ ] non-member UID denied +- [ ] unknown action denied +- [ ] `status` returns `ok` +- [ ] `quic_on` returns phase-2 error (no partial firewall) +- [ ] helper restart leaves no stale socket + +## Phase 2+ + +Add QUIC cgroup tests, IPv6 leaks, PAC, transparent proxy, crash recovery. + +## Phase 3+ + +Add AmneziaWG, enrollment, suspend/resume, DNS, route tests. + +## Phase 4+ + +Add nftables kill-switch, SSH lockout guard, power-loss recovery. + +## Packaging + +- [ ] `.deb` install +- [ ] `.deb` uninstall leaves no systemd/nft/proxy residue +- [ ] AppImage runs with helper installed +- [ ] User group membership applied after re-login diff --git a/linuxFDPI/docs/screenshot-home.png b/linuxFDPI/docs/screenshot-home.png new file mode 100644 index 0000000..218ea87 Binary files /dev/null and b/linuxFDPI/docs/screenshot-home.png differ diff --git a/linuxFDPI/docs/screenshot-zorin.png b/linuxFDPI/docs/screenshot-zorin.png new file mode 100644 index 0000000..5e971ca Binary files /dev/null and b/linuxFDPI/docs/screenshot-zorin.png differ diff --git a/linuxFDPI/helper/ld-fdpi-helper.service b/linuxFDPI/helper/ld-fdpi-helper.service new file mode 100644 index 0000000..1e310a9 --- /dev/null +++ b/linuxFDPI/helper/ld-fdpi-helper.service @@ -0,0 +1,24 @@ +[Unit] +Description=LD FDPI privileged helper +After=network.target +Before=ld-fdpi.service + +[Service] +Type=simple +ExecStart=/usr/bin/python3 /usr/lib/ld-fdpi/ld_fdpi_helper.py +Restart=on-failure +RestartSec=2 +RuntimeDirectory=ld-fdpi resolvconf wireguard +RuntimeDirectoryMode=0750 +Group=ld-fdpi +NoNewPrivileges=no +PrivateTmp=yes +ProtectHome=yes +ProtectSystem=full +ReadWritePaths=/run/ld-fdpi /etc/amnezia/amneziawg /run/wireguard /run/resolvconf +CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_RAW CAP_SYS_ADMIN +AmbientCapabilities=CAP_NET_ADMIN CAP_NET_RAW CAP_SYS_ADMIN +RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6 AF_NETLINK AF_PACKET + +[Install] +WantedBy=multi-user.target diff --git a/linuxFDPI/helper/ld_fdpi_helper.py b/linuxFDPI/helper/ld_fdpi_helper.py new file mode 100644 index 0000000..9fd1fd6 --- /dev/null +++ b/linuxFDPI/helper/ld_fdpi_helper.py @@ -0,0 +1,208 @@ +#!/usr/bin/env python3 +"""LD FDPI Linux privileged helper. + +JSON-lines protocol over /run/ld-fdpi/helper.sock. +Only allowlisted, parameter-free actions are accepted. + +Phase 2: app-scoped QUIC guard through nftables cgroup matching. +""" +import grp +import json +import os +import socket +import struct +import subprocess +import sys + +SOCKET = "/run/ld-fdpi/helper.sock" +GROUP = "ld-fdpi" +NFT_QUIC = "ld_fdpi_quic" + +APP_NAMES = ( + "chrome", "chromium", "chrome_crashpad", "discord", "firefox", + "brave", "opera", "vivaldi", "msedge", "telegram", "slack", + "signal", "element", "zoom", "steam", "spotify", +) + +ACTIONS = { + "status", + "quic_on", + "quic_off", + "restore", +} + + +def peer_is_allowed(conn): + creds = conn.getsockopt(socket.SOL_SOCKET, socket.SO_PEERCRED, struct.calcsize("3i")) + _pid, uid, _gid = struct.unpack("3i", creds) + if uid == 0: + return True + try: + group = grp.getgrnam(GROUP) + except KeyError: + return False + return _uid_in_group(uid, group) + + +def _uid_in_group(uid, group): + try: + import pwd + user = pwd.getpwuid(uid) + except KeyError: + return False + return group.gr_gid == user.pw_gid or user.pw_name in group.gr_mem + + +def nft_available(): + return os.path.exists("/usr/sbin/nft") or os.path.exists("/sbin/nft") + + +def nft(script): + proc = subprocess.run( + ["nft", "-f", "-"], + input=script, + text=True, + capture_output=True, + check=False, + ) + if proc.returncode != 0: + raise RuntimeError((proc.stderr or proc.stdout).strip()[:500]) + + +def nft_delete(table): + if nft_available(): + subprocess.run(["nft", "delete", "table", "inet", table], check=False, + stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL) + + +def app_cgroup_ids(): + """Return cgroup v2 inode IDs for known desktop apps. + + nftables `meta cgroup` matches the cgroup v2 inode, not the path string. + """ + ids = set() + root = "/sys/fs/cgroup" + for entry in os.scandir("/proc"): + if not entry.name.isdigit(): + continue + pid = entry.name + try: + with open(f"/proc/{pid}/comm", encoding="utf-8", errors="replace") as fh: + comm = fh.read().strip().lower() + except OSError: + continue + if not any(name in comm for name in APP_NAMES): + continue + path = None + try: + with open(f"/proc/{pid}/cgroup", encoding="utf-8", errors="replace") as fh: + for line in fh: + if line.startswith("0::"): + path = line[3:].strip() + break + except OSError: + continue + if not path: + continue + full = os.path.join(root, path.lstrip("/")) + try: + ids.add(os.stat(full).st_ino) + except OSError: + continue + return sorted(ids) + + +def quic_on(): + if not nft_available(): + return {"ok": False, "error": "nft-not-installed"} + ids = app_cgroup_ids() + if not ids: + return {"ok": False, "error": "no-supported-apps-running"} + lines = [ + f"table inet {NFT_QUIC} {{", + " chain output {", + " type filter hook output priority 0; policy accept;", + " oifname \"lo\" accept", + " meta nfproto ipv6 udp dport 443 drop", + ] + for cgid in ids[:40]: + lines.append(f" meta cgroup {cgid} udp dport 443 drop") + lines.extend([ + " }", + "}", + ]) + nft_delete(NFT_QUIC) + nft("\n".join(lines) + "\n") + return {"ok": True, "cgroups": len(ids), "table": NFT_QUIC} + + +def quic_off(): + nft_delete(NFT_QUIC) + return {"ok": True} + + +def cleanup(): + nft_delete(NFT_QUIC) + + +def handle(request): + action = str(request.get("action", "")) + if action not in ACTIONS: + return {"ok": False, "error": "action-not-allowed"} + if action == "status": + return { + "ok": True, + "nft": nft_available(), + "phase": 2, + } + if action == "quic_on": + return quic_on() + if action == "quic_off": + return quic_off() + if action == "restore": + cleanup() + return {"ok": True} + return {"ok": False, "error": "unsupported"} + + +def serve(): + os.makedirs(os.path.dirname(SOCKET), exist_ok=True) + try: + os.unlink(SOCKET) + except FileNotFoundError: + pass + server = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) + server.bind(SOCKET) + os.chmod(SOCKET, 0o660) + try: + gid = grp.getgrnam(GROUP).gr_gid + os.chown(SOCKET, 0, gid) + except KeyError: + pass + server.listen(8) + print(f"ld-fdpi-helper listening on {SOCKET}", file=sys.stderr, flush=True) + while True: + conn, _ = server.accept() + with conn: + try: + if not peer_is_allowed(conn): + conn.sendall(b'{"ok":false,"error":"permission-denied"}\n') + continue + conn.settimeout(5) + data = b"" + while not data.endswith(b"\n") and len(data) < 4096: + chunk = conn.recv(4096) + if not chunk: + break + data += chunk + if not data: + continue + request = json.loads(data.decode("utf-8", "replace")) + response = handle(request) + except Exception as exc: # noqa: BLE001 + response = {"ok": False, "error": f"bad-request: {exc}"} + conn.sendall((json.dumps(response) + "\n").encode()) + + +if __name__ == "__main__": + serve() diff --git a/linuxFDPI/helper/nftables/ld-fdpi.nft b/linuxFDPI/helper/nftables/ld-fdpi.nft new file mode 100644 index 0000000..48b74a3 --- /dev/null +++ b/linuxFDPI/helper/nftables/ld-fdpi.nft @@ -0,0 +1,6 @@ +table inet ldfdpi { + # Phase 4 placeholder. Do not load until kill-switch review is complete. + chain output { + type filter hook output priority 0; policy accept; + } +} diff --git a/linuxFDPI/index.html b/linuxFDPI/index.html new file mode 100644 index 0000000..3f1f269 --- /dev/null +++ b/linuxFDPI/index.html @@ -0,0 +1,12 @@ + + + + + + LD FDPI Linux + + +
+ + + diff --git a/linuxFDPI/package-lock.json b/linuxFDPI/package-lock.json new file mode 100644 index 0000000..510199c --- /dev/null +++ b/linuxFDPI/package-lock.json @@ -0,0 +1,2105 @@ +{ + "name": "ld-fdpi-linux", + "version": "0.1.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "ld-fdpi-linux", + "version": "0.1.0", + "dependencies": { + "@tauri-apps/api": "^2.2.0", + "lucide-react": "^0.474.0", + "react": "^18.3.1", + "react-dom": "^18.3.1" + }, + "devDependencies": { + "@tauri-apps/cli": "^2.2.0", + "@vitejs/plugin-react": "^4.3.4", + "vite": "^6.0.7" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.7.tgz", + "integrity": "sha512-Aup7aUOfpbAUg2ROOJN6Iw5f9DMBlzu0mIkm/malLQFN/YQgO48wCj0Kxa3sEHJvPVFg7siR+qRInwXd2qhQKw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-validator-identifier": "^7.29.7", + "js-tokens": "^4.0.0", + "picocolors": "^1.1.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/compat-data": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.29.7.tgz", + "integrity": "sha512-locTkQyKvwIEgBzVrn8693ebc97F2U8ZHjbXwDXJ5Fn2TCpNwTlKcaKLkdHop5c/icOFE7qt7Q9JC5hnKNa6Gg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/core": { + "version": "7.29.13", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.29.13.tgz", + "integrity": "sha512-j1nvOQCZYSgp7HLmisnCXFTpVvFODiijQ9QHkORfGKWH6YDtskTEeCJS7eV545GZ9UBzrq0e2xsOd5QQ5PjIqw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.29.7", + "@babel/generator": "^7.29.13", + "@babel/helper-compilation-targets": "^7.29.13", + "@babel/helper-module-transforms": "^7.29.13", + "@babel/helpers": "^7.29.13", + "@babel/parser": "^7.29.13", + "@babel/template": "^7.29.7", + "@babel/traverse": "^7.29.13", + "@babel/types": "^7.29.11", + "@jridgewell/remapping": "^2.3.5", + "convert-source-map": "^2.0.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.3", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + } + }, + "node_modules/@babel/generator": { + "version": "7.29.13", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.29.13.tgz", + "integrity": "sha512-T5FRo+RzVHvGjWOuF1Ljc44b+NXAOazodHkGUHp4I3zCkQ4/sNVJm56h1S278LMR0bY5xBhztGziSbli8zObIw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.29.13", + "@babel/types": "^7.29.11", + "@jridgewell/gen-mapping": "^0.3.12", + "@jridgewell/trace-mapping": "^0.3.28", + "jsesc": "^3.0.2" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-compilation-targets": { + "version": "7.29.13", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.29.13.tgz", + "integrity": "sha512-8WxJ4/Vmes3ghacj8VOJy3NW8eyHiFY/4thU/LSBuBE470+igjR/j1ZTNn8fV5VdNrLx6iXUwig526UdOvfP0w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/compat-data": "^7.29.7", + "@babel/helper-validator-option": "^7.29.7", + "browserslist": "^4.24.0", + "lru-cache": "^5.1.1", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-globals": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-globals/-/helper-globals-7.29.7.tgz", + "integrity": "sha512-3nQVUAtvkKH9zahfWgw96Jc/uFOmjACE1kQz82E2lqWmHBgjzbNlsC22nuQTfahmWeQtTq5nQ/4Nnd2A1wj4zA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-imports": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.29.7.tgz", + "integrity": "sha512-ejHwrQQYcm9xnTivShn2IDOlIzInN34AXskvq9QicvCtEzq1Vzclu/tKF8Jq1Cg8JG2GL6/EmjgsCT7lXepE3g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/traverse": "^7.29.7", + "@babel/types": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-transforms": { + "version": "7.29.13", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.29.13.tgz", + "integrity": "sha512-/U96wOz+SCoZ7Da/8kjDGltcNY280JPQcRNPK0Hk3PTbdpaiBDQImtC6JsbVwb1HGMr3usZQU2WsWVjhYNmRzw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-module-imports": "^7.29.7", + "@babel/helper-validator-identifier": "^7.29.7", + "@babel/traverse": "^7.29.13" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-plugin-utils": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.29.7.tgz", + "integrity": "sha512-G7sHYigPY17oO5SYWnfD/0MTBwVR781S/JI643e/JhUYgVgWE/61SoW3NH9KWUKyKq5LVh3npif99Wkt6j86Jw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "7.29.13", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.29.13.tgz", + "integrity": "sha512-fWegr+WsEsiMVW4KUNdIIzzMTZSzNiqhy0//6+2MRi2d5NFNsL/AYwBQW8eBnRbTBVRnDVzjaJEUqKaCWjMMdQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.29.7.tgz", + "integrity": "sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-option": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.29.7.tgz", + "integrity": "sha512-N9ZErrD+yW5geCDtBqnOoxmR8+tNKiGuxKlDpuJxfsqpa2dFcexaziGAE/qoHLiDDreVNMupxGmSoNlyvsA3gw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helpers": { + "version": "7.29.13", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.29.13.tgz", + "integrity": "sha512-laoRpD/kO/iA4CDlgJbixHekg7oPvWALK0PQyK3Ob2I2njZRvVAD77RfWCIImtqWCq6KijoBoZK7bp/HlTWASQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/template": "^7.29.7", + "@babel/types": "^7.29.11" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/parser": { + "version": "7.29.13", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.13.tgz", + "integrity": "sha512-fJM50YYjlTiBhgdkGmC1tBpv+FMAyo4annf2X6Aks+0yRlaiVkYW/3f07xAfVVkYIoZ9fFZp+mEThUFnuybhkQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.29.11" + }, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/plugin-transform-react-jsx-self": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.29.7.tgz", + "integrity": "sha512-TL0hMc9xzy86VD31nUiwzd5otRAcyEPcsegCxolO0PvcXuH1v0kECe/UIznYFihpkvU5wg/jk4v0TTEFfm53fw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-react-jsx-source": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.29.7.tgz", + "integrity": "sha512-06IyK09H3wi4cGbhDBwp5gUGo0IKtnYa8tyTiephirPCK6fbobVGiXMMI5zLQ4aKEYP3wZ3ArU44o+8KMrSG/Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/template": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.29.7.tgz", + "integrity": "sha512-puq+Gf35oI24FeN11LkoUQFqv9uwNeWpxXZi/Ji3rRIoKAzKnxRaZ+Gkj0vKS9ZCiTESfng1N9LyOyXvo+m+Gg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.29.7", + "@babel/parser": "^7.29.7", + "@babel/types": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse": { + "version": "7.29.13", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.29.13.tgz", + "integrity": "sha512-0ve0xMlFA73dgY1oyJRY6RoW+/bncdcOQqg6jjYcVfXBK90OdLXjm9R6lmRetdZVrPjXkKIoMVBqYFPjcAlZ4Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.29.7", + "@babel/generator": "^7.29.13", + "@babel/helper-globals": "^7.29.7", + "@babel/parser": "^7.29.13", + "@babel/template": "^7.29.7", + "@babel/types": "^7.29.11", + "debug": "^4.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/types": { + "version": "7.29.11", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.29.11.tgz", + "integrity": "sha512-WCsemW40Cpc6gouC1SrY6PBaZ+oLRlEVY9XBvZBI7il/HyUrb2nJ505wE1MHEFyDZNnrWDEuy4jL50WVHfTTSQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-string-parser": "^7.29.11", + "@babel/helper-validator-identifier": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.12.tgz", + "integrity": "sha512-Hhmwd6CInZ3dwpuGTF8fJG6yoWmsToE+vYgD4nytZVxcu1ulHpUQRAB1UJ8+N1Am3Mz4+xOByoQoSZf4D+CpkA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.12.tgz", + "integrity": "sha512-VJ+sKvNA/GE7Ccacc9Cha7bpS8nyzVv0jdVgwNDaR4gDMC/2TTRc33Ip8qrNYUcpkOHUT5OZ0bUcNNVZQ9RLlg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.12.tgz", + "integrity": "sha512-6AAmLG7zwD1Z159jCKPvAxZd4y/VTO0VkprYy+3N2FtJ8+BQWFXU+OxARIwA46c5tdD9SsKGZ/1ocqBS/gAKHg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.12.tgz", + "integrity": "sha512-5jbb+2hhDHx5phYR2By8GTWEzn6I9UqR11Kwf22iKbNpYrsmRB18aX/9ivc5cabcUiAT/wM+YIZ6SG9QO6a8kg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.12.tgz", + "integrity": "sha512-N3zl+lxHCifgIlcMUP5016ESkeQjLj/959RxxNYIthIg+CQHInujFuXeWbWMgnTo4cp5XVHqFPmpyu9J65C1Yg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.12.tgz", + "integrity": "sha512-HQ9ka4Kx21qHXwtlTUVbKJOAnmG1ipXhdWTmNXiPzPfWKpXqASVcWdnf2bnL73wgjNrFXAa3yYvBSd9pzfEIpA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.12.tgz", + "integrity": "sha512-gA0Bx759+7Jve03K1S0vkOu5Lg/85dou3EseOGUes8flVOGxbhDDh/iZaoek11Y8mtyKPGF3vP8XhnkDEAmzeg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.12.tgz", + "integrity": "sha512-TGbO26Yw2xsHzxtbVFGEXBFH0FRAP7gtcPE7P5yP7wGy7cXK2oO7RyOhL5NLiqTlBh47XhmIUXuGciXEqYFfBQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.12.tgz", + "integrity": "sha512-lPDGyC1JPDou8kGcywY0YILzWlhhnRjdof3UlcoqYmS9El818LLfJJc3PXXgZHrHCAKs/Z2SeZtDJr5MrkxtOw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.12.tgz", + "integrity": "sha512-8bwX7a8FghIgrupcxb4aUmYDLp8pX06rGh5HqDT7bB+8Rdells6mHvrFHHW2JAOPZUbnjUpKTLg6ECyzvas2AQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.12.tgz", + "integrity": "sha512-0y9KrdVnbMM2/vG8KfU0byhUN+EFCny9+8g202gYqSSVMonbsCfLjUO+rCci7pM0WBEtz+oK/PIwHkzxkyharA==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.12.tgz", + "integrity": "sha512-h///Lr5a9rib/v1GGqXVGzjL4TMvVTv+s1DPoxQdz7l/AYv6LDSxdIwzxkrPW438oUXiDtwM10o9PmwS/6Z0Ng==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.12.tgz", + "integrity": "sha512-iyRrM1Pzy9GFMDLsXn1iHUm18nhKnNMWscjmp4+hpafcZjrr2WbT//d20xaGljXDBYHqRcl8HnxbX6uaA/eGVw==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.12.tgz", + "integrity": "sha512-9meM/lRXxMi5PSUqEXRCtVjEZBGwB7P/D4yT8UG/mwIdze2aV4Vo6U5gD3+RsoHXKkHCfSxZKzmDssVlRj1QQA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.12.tgz", + "integrity": "sha512-Zr7KR4hgKUpWAwb1f3o5ygT04MzqVrGEGXGLnj15YQDJErYu/BGg+wmFlIDOdJp0PmB0lLvxFIOXZgFRrdjR0w==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.12.tgz", + "integrity": "sha512-MsKncOcgTNvdtiISc/jZs/Zf8d0cl/t3gYWX8J9ubBnVOwlk65UIEEvgBORTiljloIWnBzLs4qhzPkJcitIzIg==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.12.tgz", + "integrity": "sha512-uqZMTLr/zR/ed4jIGnwSLkaHmPjOjJvnm6TVVitAa08SLS9Z0VM8wIRx7gWbJB5/J54YuIMInDquWyYvQLZkgw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.12.tgz", + "integrity": "sha512-xXwcTq4GhRM7J9A8Gv5boanHhRa/Q9KLVmcyXHCTaM4wKfIpWkdXiMog/KsnxzJ0A1+nD+zoecuzqPmCRyBGjg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.12.tgz", + "integrity": "sha512-Ld5pTlzPy3YwGec4OuHh1aCVCRvOXdH8DgRjfDy/oumVovmuSzWfnSJg+VtakB9Cm0gxNO9BzWkj6mtO1FMXkQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.12.tgz", + "integrity": "sha512-fF96T6KsBo/pkQI950FARU9apGNTSlZGsv1jZBAlcLL1MLjLNIWPBkj5NlSz8aAzYKg+eNqknrUJ24QBybeR5A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.12.tgz", + "integrity": "sha512-MZyXUkZHjQxUvzK7rN8DJ3SRmrVrke8ZyRusHlP+kuwqTcfWLyqMOE3sScPPyeIXN/mDJIfGXvcMqCgYKekoQw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openharmony-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.25.12.tgz", + "integrity": "sha512-rm0YWsqUSRrjncSXGA7Zv78Nbnw4XL6/dzr20cyrQf7ZmRcsovpcRBdhD43Nuk3y7XIoW2OxMVvwuRvk9XdASg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.12.tgz", + "integrity": "sha512-3wGSCDyuTHQUzt0nV7bocDy72r2lI33QL3gkDNGkod22EsYl04sMf0qLb8luNKTOmgF/eDEDP5BFNwoBKH441w==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.12.tgz", + "integrity": "sha512-rMmLrur64A7+DKlnSuwqUdRKyd3UE7oPJZmnljqEptesKM8wx9J8gx5u0+9Pq0fQQW8vqeKebwNXdfOyP+8Bsg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.12.tgz", + "integrity": "sha512-HkqnmmBoCbCwxUKKNPBixiWDGCpQGVsrQfJoVGYLPT41XWF8lHuE5N6WhVia2n4o5QK5M4tYr21827fNhi4byQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.12.tgz", + "integrity": "sha512-alJC0uCZpTFrSL0CCDjcgleBXPnCrEAhTBILpeAp7M/OFgoqtAetfBzX0xM00MUsVVPpVjlPuMbREqnZCXaTnA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.13", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", + "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/remapping": { + "version": "2.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/remapping/-/remapping-2.3.5.tgz", + "integrity": "sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.6.0.tgz", + "integrity": "sha512-T7jf+5zgsZHwNJ4lvQ7/aezbyk0nNX+zJVWpmHA7VYsEx7a7qr5Rg5IbtJFqkgze5Y2sruq1RUY8Q837Od7iFw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.31", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz", + "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@rolldown/pluginutils": { + "version": "1.0.0-beta.27", + "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.0-beta.27.tgz", + "integrity": "sha512-+d0F4MKMCbeVUJwG96uQ4SgAznZNSq93I3V+9NHA4OpvqG8mRCpGdKmK8l/dl02h2CCDHwW2FqilnTyDcAnqjA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.67.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.67.5.tgz", + "integrity": "sha512-FdWPeulkH+FH+rBzyKBD59tuVN4tRKvmVilSJm0OcnoYsQTpd9UhD78OaPcsYqo2fX6hCwAG0YIjrDLoQ3pR3g==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.67.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.67.5.tgz", + "integrity": "sha512-bmkDuBGnF+Ji8atWlXcNjxIC52ShCbdXPbW7Nz0lRoCFi1lrvsO0XobJY36kTj7duc1vOmGJeQ9vtVuGjnzihA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-x64": { + "version": "4.67.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-x64/-/rollup-android-x64-4.67.5.tgz", + "integrity": "sha512-6KvVfnqPTqmbQ5YobMl9HYiSymAsCt8HlNeriDshwJQcveXwT+vIMW6wGL1RcJbXH9+r3BAJvjab5+rIgtSEqA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.67.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.67.5.tgz", + "integrity": "sha512-SNamgdrY69oPdBrQV9fKGo6PSmKcVhyn0D0jnDmcqgRJvrxQGGBhtekOHTUJ7TCgkW0nE8XMH9v2CwXmjNIzVA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.67.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.67.5.tgz", + "integrity": "sha512-HNdl34thiJtHDSglogjmAlQ296L8cc8zA7ODH65nnmY7E+jPP55WEbh8J5583rWFLMjxyYywxZuwPOwRvEi5tA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-freebsd-arm64": { + "version": "4.67.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.67.5.tgz", + "integrity": "sha512-WvZYtANNswfHzSNHaJAoG6Ipfc4SyZIDYuIjFdHv07xXxhHl+Xx8o+bNDWsxpOADFT2mKXcXVrfOG4OlWTLo8Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-freebsd-x64": { + "version": "4.67.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.67.5.tgz", + "integrity": "sha512-EUU+Wgf9NyHekceC+DxAdm42f6bq2ezH/7DEb/JnCb8SAUhG2xph5BiVukxplWal2m5pP8CzJZE+FLwRopywjQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.67.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.67.5.tgz", + "integrity": "sha512-dgU1CvUuE2IkaJBAeuAbxpDdMHAdZBT5oth5u22DtuoMg4gXXYr2+Sm30RigPJG1F2VEoiGJUziGLuIh9+jPxA==", + "cpu": [ + "arm" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.67.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.67.5.tgz", + "integrity": "sha512-rdgJcJig2VngYlcTCRQw2BA8kLWM6QwDFe9uLFo81lya0jPC1r8wZu92sAvTUIv48GWlkRVi6/fpsa5CoFSKoQ==", + "cpu": [ + "arm" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.67.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.67.5.tgz", + "integrity": "sha512-+jtCiQnrEFHWAUAcUpP7wppb1p6HKOgBP3mXx75cEYpDF2Y5MEqBky2HNz+osFuVx5uX44gnMTmbe5RJauzn6A==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.67.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.67.5.tgz", + "integrity": "sha512-heflX7ENhL8eHmLcUxDEHCSK8CKLyPprysb2JGoSTh5Ip7nHrzIRc+2USyxul3nxi98H8pGxJIEDEpURlS1X5A==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loong64-gnu": { + "version": "4.67.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.67.5.tgz", + "integrity": "sha512-rRtNU0zBfRHkJ8pscHN9qRtUYLq8Rao4EX7aVWvKcFmJUANkCCXFRU7ovNBEMhpEONyUEB/3DRVDXwDDguSfHA==", + "cpu": [ + "loong64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loong64-musl": { + "version": "4.67.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.67.5.tgz", + "integrity": "sha512-/6auyi9yj8MD/Q+8P+f2ay57jQ7a0j7Yp1JK86pecH6ZnRViQZ5GOjoRSjGArFeTSHFznRbM2QPQcBgDPyNMfQ==", + "cpu": [ + "loong64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-gnu": { + "version": "4.67.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.67.5.tgz", + "integrity": "sha512-Hsc0vlt+vPvqzUkHKffWKf3YE/yexrY+yeFf7IsUvDC6PV7YGCsA/gJvPa+WJdgxGJnwuoO1HmLkbahaLKabYQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-musl": { + "version": "4.67.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.67.5.tgz", + "integrity": "sha512-Jx5TMMSPJwHY7F/JwPdS6nuBwny2ECRK+EsAJV5HZrfiddeSS6ZrohkLkFZm3rjqBUuQ4FPX5gGMtakUuQO6fQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.67.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.67.5.tgz", + "integrity": "sha512-fGWcq2lo/XCqAkBLOokg66D/z+MUouryB8i+QdU9RR6O5knG7rucc0WFPqWYL1Wk/wuiJouDfmyBxmZKRM9bag==", + "cpu": [ + "riscv64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-musl": { + "version": "4.67.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.67.5.tgz", + "integrity": "sha512-JwO/Ys3jybc0UW3V5XO2CMnp0RhvoczDDQTgAEE1IctT+HRY3W5parIIWLUpmAK4gHSeeYJofm2iQPFA62K6ag==", + "cpu": [ + "riscv64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.67.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.67.5.tgz", + "integrity": "sha512-vVD4iqel6J6A1xAJlb4mxEO9i1wOJ4/SkcKoDKAuK/wqEBPOA7/P5dDyZvNx46ocHwOUwzo3WjhTdKqET9kEAg==", + "cpu": [ + "s390x" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.67.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.67.5.tgz", + "integrity": "sha512-HmEfNh5Cdd/NHxgqwMzKnjlvicQQA+D+w+vQXDJSV0x/aHiQSjVwh1Th5RoA7QsMieIaxibt/5iJq68BraTSUg==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.67.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.67.5.tgz", + "integrity": "sha512-NfmALpbe009nYzZ2QqlSW6nzbGddXpqk3nwualrIr+4QflQCTGMzt3QKK20yARiAnSV9fJdM5WNwIYUf31x3uA==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-openbsd-x64": { + "version": "4.67.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.67.5.tgz", + "integrity": "sha512-ngcE7Udpy/iJ3lexVhYcbpUV2OJIakRGus3snc6K52BnAAJetDBG1Ku5Eh3CECtnW3mpBYWg5VCD4tTaOXKOVQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ] + }, + "node_modules/@rollup/rollup-openharmony-arm64": { + "version": "4.67.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.67.5.tgz", + "integrity": "sha512-DZ01A2EdTYX8xVeGoGiWkJBRWDh+/BOflwGPVsBay43PDxcq8ez0xuovZnPnk1xjE3CdI0pdZXxsJp/Xjmf7uQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ] + }, + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.67.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.67.5.tgz", + "integrity": "sha512-nJKiMKDO140DUCEcQZl+f4HiGPMBxrW2webjuWJ2E3qPeoruHf2zByml4TP52lA1zDi6L4I92D/5stxeA/6pig==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.67.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.67.5.tgz", + "integrity": "sha512-ykLkBCf+Kls24QmqM3IRf1T4sGMh0rXPyymtj+hXlWKPJnXbXraHqUUsKtOIxqLasjT1i7DhfQGAaZYeiHbSOw==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-gnu": { + "version": "4.67.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.67.5.tgz", + "integrity": "sha512-NiFPUFw8cHhkmBlL1k1eaz+5AXXm89rztj+DQdDuQ7VGPM0+ADFhezQ2KcBMF50UEFzGUr0+DVjVND743XwKWQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.67.5", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.67.5.tgz", + "integrity": "sha512-Khj/vrKCpdbiAWYbJAeSy4D5iep+qwW/86lNoKvdleJYGxgbRE7h87+5d5T9D7gt8NcqhNFpreRgIg8T4bLzKQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@tauri-apps/api": { + "version": "2.12.4", + "resolved": "https://registry.npmjs.org/@tauri-apps/api/-/api-2.12.4.tgz", + "integrity": "sha512-pVmfis+4zT8H0Qhp3xPZx9Ju7kpzvA6rr/PSJPyuwfvucTQ8sVt61NYU9KMkK703UFlYadFmjKA4HhybOtN0gg==", + "license": "Apache-2.0 OR MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/tauri" + } + }, + "node_modules/@tauri-apps/cli": { + "version": "2.12.4", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli/-/cli-2.12.4.tgz", + "integrity": "sha512-JI9bHfudSRJikGOrjbXEm6RjzzvmKuLc+JixB1NE8hNzQkNlCCIC3pTES3uypkR9lxHrsbxzcnSwhI2IxBQphw==", + "dev": true, + "license": "Apache-2.0 OR MIT", + "bin": { + "tauri": "tauri.js" + }, + "engines": { + "node": ">= 10" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/tauri" + }, + "optionalDependencies": { + "@tauri-apps/cli-darwin-arm64": "2.12.4", + "@tauri-apps/cli-darwin-x64": "2.12.4", + "@tauri-apps/cli-linux-arm-gnueabihf": "2.12.4", + "@tauri-apps/cli-linux-arm64-gnu": "2.12.4", + "@tauri-apps/cli-linux-arm64-musl": "2.12.4", + "@tauri-apps/cli-linux-riscv64-gnu": "2.12.4", + "@tauri-apps/cli-linux-x64-gnu": "2.12.4", + "@tauri-apps/cli-linux-x64-musl": "2.12.4", + "@tauri-apps/cli-win32-arm64-msvc": "2.12.4", + "@tauri-apps/cli-win32-ia32-msvc": "2.12.4", + "@tauri-apps/cli-win32-x64-msvc": "2.12.4" + } + }, + "node_modules/@tauri-apps/cli-darwin-arm64": { + "version": "2.12.4", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-darwin-arm64/-/cli-darwin-arm64-2.12.4.tgz", + "integrity": "sha512-OxqKSckIkoJ6vX2AjifIJpTasFC0Hbdoo7gEiCmAjauABO3U8m2MRsLWe+QTiBwDx1mIrvgA+rvI7tvDnbnHVg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0 OR MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tauri-apps/cli-darwin-x64": { + "version": "2.12.4", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-darwin-x64/-/cli-darwin-x64-2.12.4.tgz", + "integrity": "sha512-fz76/77wMMJOaaUN6n3CybRG0P/MTEjjqYk81mGPyhi9m6Ue5T+LWBnJP/AkPooNatBPI2vtulGqomyMJ44lCQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0 OR MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tauri-apps/cli-linux-arm-gnueabihf": { + "version": "2.12.4", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm-gnueabihf/-/cli-linux-arm-gnueabihf-2.12.4.tgz", + "integrity": "sha512-K0w8Bof6Lt8QKLAYhRy0yy36ZH5iA/35VuSOvnxyjvCUZ+A3JKsUTlALviH/sVgAlisaPzzmeJSH8XOn4Q2HBA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "Apache-2.0 OR MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tauri-apps/cli-linux-arm64-gnu": { + "version": "2.12.4", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm64-gnu/-/cli-linux-arm64-gnu-2.12.4.tgz", + "integrity": "sha512-j5rOnjmRUwWrm1oosf0zBYl4D+fqydgUROFCk0hvKZxvbTT8SOERes0QB7rBV/XWNy+kM6pCKzb3oSm2sRglzg==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "Apache-2.0 OR MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tauri-apps/cli-linux-arm64-musl": { + "version": "2.12.4", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm64-musl/-/cli-linux-arm64-musl-2.12.4.tgz", + "integrity": "sha512-aOue3Fy6Jb7+oWcfAVUsVHfeTybSCt2CZoU06aO4jv4d2Ks/KnaTPwMAK3CLEduGOvBLY1lbBBrIyomqLLH5Sg==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "Apache-2.0 OR MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tauri-apps/cli-linux-riscv64-gnu": { + "version": "2.12.4", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-riscv64-gnu/-/cli-linux-riscv64-gnu-2.12.4.tgz", + "integrity": "sha512-Fx6GShY/RvST+t6LMlTHAwd66+1tEaAAGrnU7cysVfaiRP1BKng5Vl6rVmO6rSLOA1Sp1dRzNYM4f0OWQGb7qA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "Apache-2.0 OR MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tauri-apps/cli-linux-x64-gnu": { + "version": "2.12.4", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-x64-gnu/-/cli-linux-x64-gnu-2.12.4.tgz", + "integrity": "sha512-tNzZSa79Z1nRpHxEpQ38lsAFpKlFlYvoXzjTV+lRRn/zSf3wrdUC3wnLcq2XEadchPu4ttK0zivhYzr+XGD19Q==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "Apache-2.0 OR MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tauri-apps/cli-linux-x64-musl": { + "version": "2.12.4", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-x64-musl/-/cli-linux-x64-musl-2.12.4.tgz", + "integrity": "sha512-jmZ1pr0xEqUhuEusWtt9Yt+GF6lCnGHUmIL+KIknpbjK/XQ2qkhDBhaxK/JMHM2A8dAacVXCxXJk2EXpwhQUfA==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "Apache-2.0 OR MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tauri-apps/cli-win32-arm64-msvc": { + "version": "2.12.4", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-arm64-msvc/-/cli-win32-arm64-msvc-2.12.4.tgz", + "integrity": "sha512-fGo8pgEHZxdSYgZ/J98m1usJ7NHKmKbq7k6uT0x1rpOq6Bg2YVzzpaAblWk710f5LHYBJIL5QIFS5IrD+4gmTg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0 OR MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tauri-apps/cli-win32-ia32-msvc": { + "version": "2.12.4", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-ia32-msvc/-/cli-win32-ia32-msvc-2.12.4.tgz", + "integrity": "sha512-ezl8sQIcjYsye3TUnTH5VcWmWzccZASlQm7hlZt0dYyj1XD0qpVW47u2xYVrIKui0F8uQv/7QGZixdWiClBsbg==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "Apache-2.0 OR MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@tauri-apps/cli-win32-x64-msvc": { + "version": "2.12.4", + "resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-x64-msvc/-/cli-win32-x64-msvc-2.12.4.tgz", + "integrity": "sha512-DJhDeCqjLDNMWYFy7ZS8cfeAHX2RK0RbQMLiA3bMVVkXRDJ4NBYiHriGqsUhsr9iG41aTb+dJGkFPmPw1gWwVw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0 OR MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" + } + }, + "node_modules/@types/babel__core": { + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", + "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.20.7", + "@babel/types": "^7.20.7", + "@types/babel__generator": "*", + "@types/babel__template": "*", + "@types/babel__traverse": "*" + } + }, + "node_modules/@types/babel__generator": { + "version": "7.27.0", + "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.27.0.tgz", + "integrity": "sha512-ufFd2Xi92OAVPYsy+P4n7/U7e68fex0+Ee8gSG9KX7eo084CWiQ4sdxktvdl0bOPupXtVJPY19zk6EwWqUQ8lg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__template": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz", + "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.1.0", + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__traverse": { + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.28.0.tgz", + "integrity": "sha512-8PvcXf70gTDZBgt9ptxJ8elBeBjcLOAcOtoO/mPJjtji1+CdGbHgm77om1GrsPxsiE+uXIpNSK64UYaIwQXd4Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.28.2" + } + }, + "node_modules/@types/estree": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.10.tgz", + "integrity": "sha512-lTyOMnOcmRBzdCv6/4zUZCrEhV0xrqQiUZBZtVcbmLHBXKLnN8q89v/wKRF/Q0HbwVsqbIG3o5HDoFl9sduM+g==", + "dev": true, + "license": "MIT" + }, + "node_modules/@vitejs/plugin-react": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-4.7.0.tgz", + "integrity": "sha512-gUu9hwfWvvEDBBmgtAowQCojwZmJ5mcLn3aufeCsitijs3+f2NsrPtlAWIR6OPiqljl96GVCUbLe0HyqIpVaoA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/core": "^7.28.0", + "@babel/plugin-transform-react-jsx-self": "^7.27.1", + "@babel/plugin-transform-react-jsx-source": "^7.27.1", + "@rolldown/pluginutils": "1.0.0-beta.27", + "@types/babel__core": "^7.20.5", + "react-refresh": "^0.17.0" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "peerDependencies": { + "vite": "^4.2.0 || ^5.0.0 || ^6.0.0 || ^7.0.0" + } + }, + "node_modules/baseline-browser-mapping": { + "version": "2.11.35", + "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.11.35.tgz", + "integrity": "sha512-GNk8KX52CHqeNKGk8+7tZnQab/2k1t/BgrUHPKNdijzpEhF1saPQZHVKb6m5loSAxB39gyrTYw34Qf9CQ3u1qQ==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "baseline-browser-mapping": "dist/cli.cjs" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/browserslist": { + "version": "4.29.5", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.29.5.tgz", + "integrity": "sha512-khTmKu5NGYTotqcYo8Bew2k4RAE9PuXRSFRXG2lQBrCEQHyeQ/vX6gKMxfokwywBsLiXZMnHsmWMG1pnO8J7uQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "baseline-browser-mapping": "^2.11.33", + "caniuse-lite": "^1.0.30001819", + "electron-to-chromium": "^1.5.464", + "node-releases": "^2.0.60", + "update-browserslist-db": "^1.3.4" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001822", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001822.tgz", + "integrity": "sha512-Y3fvWQWzc69dlCyr07tuNrEhotv+db5FpMSPD3slZnkPKwRNOKwFBz2dP966XUmWMXLTOt+YShkFoQoom3U7hg==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "CC-BY-4.0" + }, + "node_modules/convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true, + "license": "MIT" + }, + "node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/electron-to-chromium": { + "version": "1.5.477", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.477.tgz", + "integrity": "sha512-PN++F4zWZoVDGWinxMnSCpVqKhqFOJfLXxdU8bYJKudAEsHL/XKVITOKWVbfMt1r276Mi9RDLU9VHx9uKJ4RMQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/esbuild": { + "version": "0.25.12", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.12.tgz", + "integrity": "sha512-bbPBYYrtZbkt6Os6FiTLCTFxvq4tt3JKall1vRwshA3fdVztsLAatFaZobhkBC8/BrPetoa0oksYoKXoG4ryJg==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.25.12", + "@esbuild/android-arm": "0.25.12", + "@esbuild/android-arm64": "0.25.12", + "@esbuild/android-x64": "0.25.12", + "@esbuild/darwin-arm64": "0.25.12", + "@esbuild/darwin-x64": "0.25.12", + "@esbuild/freebsd-arm64": "0.25.12", + "@esbuild/freebsd-x64": "0.25.12", + "@esbuild/linux-arm": "0.25.12", + "@esbuild/linux-arm64": "0.25.12", + "@esbuild/linux-ia32": "0.25.12", + "@esbuild/linux-loong64": "0.25.12", + "@esbuild/linux-mips64el": "0.25.12", + "@esbuild/linux-ppc64": "0.25.12", + "@esbuild/linux-riscv64": "0.25.12", + "@esbuild/linux-s390x": "0.25.12", + "@esbuild/linux-x64": "0.25.12", + "@esbuild/netbsd-arm64": "0.25.12", + "@esbuild/netbsd-x64": "0.25.12", + "@esbuild/openbsd-arm64": "0.25.12", + "@esbuild/openbsd-x64": "0.25.12", + "@esbuild/openharmony-arm64": "0.25.12", + "@esbuild/sunos-x64": "0.25.12", + "@esbuild/win32-arm64": "0.25.12", + "@esbuild/win32-ia32": "0.25.12", + "@esbuild/win32-x64": "0.25.12" + } + }, + "node_modules/escalade": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/fdir": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "license": "MIT" + }, + "node_modules/jsesc": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", + "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==", + "dev": true, + "license": "MIT", + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/json5": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "dev": true, + "license": "MIT", + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "license": "MIT", + "dependencies": { + "js-tokens": "^3.0.0 || ^4.0.0" + }, + "bin": { + "loose-envify": "cli.js" + } + }, + "node_modules/lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, + "license": "ISC", + "dependencies": { + "yallist": "^3.0.2" + } + }, + "node_modules/lucide-react": { + "version": "0.474.0", + "resolved": "https://registry.npmjs.org/lucide-react/-/lucide-react-0.474.0.tgz", + "integrity": "sha512-CmghgHkh0OJNmxGKWc0qfPJCYHASPMVSyGY8fj3xgk4v84ItqDg64JNKFZn5hC6E0vHi6gxnbCgwhyVB09wQtA==", + "license": "ISC", + "peerDependencies": { + "react": "^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/nanoid": { + "version": "3.3.20", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.20.tgz", + "integrity": "sha512-uKdg2G3GNCKQn9byYOpxbGqrT2fGO5KRt5J/8b3pok8rT6qxGWF6hxMyJiEYtAf+FVyYuD9hRaDqX5uPFYJ4ZQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/node-releases": { + "version": "2.0.63", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.63.tgz", + "integrity": "sha512-6li2QanLsAXpIH2R6j77MzRyvOyrvdTqlKtO4CgBdHGNvN99ZZfyxszHc5o5+IZBWD5u6Hzwg83JoGXmqZNG9Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true, + "license": "ISC" + }, + "node_modules/picomatch": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.7.tgz", + "integrity": "sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/postcss": { + "version": "8.5.32", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.32.tgz", + "integrity": "sha512-LJlKCCAUFKOuZxipUdYw1NzIITEsPcgyOG9LkvRJvuKj/bRzbuRY0ARXvL0pWGpsZvn8jku+LMep2eU0seHp8g==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "nanoid": "^3.3.20", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.2" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/react": { + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz", + "integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==", + "license": "MIT", + "dependencies": { + "loose-envify": "^1.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/react-dom": { + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz", + "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==", + "license": "MIT", + "dependencies": { + "loose-envify": "^1.1.0", + "scheduler": "^0.23.2" + }, + "peerDependencies": { + "react": "^18.3.1" + } + }, + "node_modules/react-refresh": { + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.17.0.tgz", + "integrity": "sha512-z6F7K9bV85EfseRCp2bzrpyQ0Gkw1uLoCel9XBVWPg/TjRj94SkJzUTGfOa4bs7iJvBWtQG0Wq7wnI0syw3EBQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/rollup": { + "version": "4.67.5", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.67.5.tgz", + "integrity": "sha512-3Ve5VH1hacCVutdpbmu/htg4kz+JCOIWgy4Q3hjHPYGHeHeIElNHJ0LcJ3rCfIsd5G7qOl5k5mwpzGMj9kdHPA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.10" + }, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "@rollup/rollup-android-arm-eabi": "4.67.5", + "@rollup/rollup-android-arm64": "4.67.5", + "@rollup/rollup-android-x64": "4.67.5", + "@rollup/rollup-darwin-arm64": "4.67.5", + "@rollup/rollup-darwin-x64": "4.67.5", + "@rollup/rollup-freebsd-arm64": "4.67.5", + "@rollup/rollup-freebsd-x64": "4.67.5", + "@rollup/rollup-linux-arm-gnueabihf": "4.67.5", + "@rollup/rollup-linux-arm-musleabihf": "4.67.5", + "@rollup/rollup-linux-arm64-gnu": "4.67.5", + "@rollup/rollup-linux-arm64-musl": "4.67.5", + "@rollup/rollup-linux-loong64-gnu": "4.67.5", + "@rollup/rollup-linux-loong64-musl": "4.67.5", + "@rollup/rollup-linux-ppc64-gnu": "4.67.5", + "@rollup/rollup-linux-ppc64-musl": "4.67.5", + "@rollup/rollup-linux-riscv64-gnu": "4.67.5", + "@rollup/rollup-linux-riscv64-musl": "4.67.5", + "@rollup/rollup-linux-s390x-gnu": "4.67.5", + "@rollup/rollup-linux-x64-gnu": "4.67.5", + "@rollup/rollup-linux-x64-musl": "4.67.5", + "@rollup/rollup-openbsd-x64": "4.67.5", + "@rollup/rollup-openharmony-arm64": "4.67.5", + "@rollup/rollup-win32-arm64-msvc": "4.67.5", + "@rollup/rollup-win32-ia32-msvc": "4.67.5", + "@rollup/rollup-win32-x64-gnu": "4.67.5", + "@rollup/rollup-win32-x64-msvc": "4.67.5", + "fsevents": "~2.3.2" + } + }, + "node_modules/scheduler": { + "version": "0.23.2", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz", + "integrity": "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==", + "license": "MIT", + "dependencies": { + "loose-envify": "^1.1.0" + } + }, + "node_modules/semver": { + "version": "6.3.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.2.tgz", + "integrity": "sha512-GYrCADwpu6yV5OAvchkQ27Z5wwMxWAEMg5NNWjyHh/5DboFFqbdbvYNIvZouQpxXyeMPoTOh0vdPYKlf0ZswdQ==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/source-map-js": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.2.tgz", + "integrity": "sha512-KGj/8Y43x35aZVDtt+J4mK1hoLGHULMYfSkODJNQjNDC3oW1PqPoxMwo0pLUsWM/UEGzON/NxeHywEfNXNP3Vw==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/tinyglobby": { + "version": "0.2.17", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.17.tgz", + "integrity": "sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==", + "dev": true, + "license": "MIT", + "dependencies": { + "fdir": "^6.5.0", + "picomatch": "^4.0.4" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + } + }, + "node_modules/update-browserslist-db": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.3.4.tgz", + "integrity": "sha512-t8wonIOdQyOjtPd2VktlBu6QjTVTks6v8bSi7kd0r2Vll8TK1JYDZtRRdbmCHOAMphkZgrzK+L+vXK4pyZ8t4A==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "escalade": "^3.2.0", + "picocolors": "^1.1.1" + }, + "bin": { + "update-browserslist-db": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } + }, + "node_modules/vite": { + "version": "6.4.5", + "resolved": "https://registry.npmjs.org/vite/-/vite-6.4.5.tgz", + "integrity": "sha512-4enwjFfi4IwtEh0w+jPzpLVOFQiPHmmzPxcHXQOyEur47o6u0jE573DmGpjA+7irXoMLYRZD5ZaFUEneS3abPg==", + "dev": true, + "license": "MIT", + "dependencies": { + "esbuild": "^0.25.0", + "fdir": "^6.4.4", + "picomatch": "^4.0.2", + "postcss": "^8.5.3", + "rollup": "^4.34.9", + "tinyglobby": "^0.2.13" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^18.0.0 || ^20.0.0 || >=22.0.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0", + "jiti": ">=1.21.0", + "less": "*", + "lightningcss": "^1.21.0", + "sass": "*", + "sass-embedded": "*", + "stylus": "*", + "sugarss": "*", + "terser": "^5.16.0", + "tsx": "^4.8.1", + "yaml": "^2.4.2" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "jiti": { + "optional": true + }, + "less": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + }, + "tsx": { + "optional": true + }, + "yaml": { + "optional": true + } + } + }, + "node_modules/yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true, + "license": "ISC" + } + } +} diff --git a/linuxFDPI/package.json b/linuxFDPI/package.json new file mode 100644 index 0000000..88f0335 --- /dev/null +++ b/linuxFDPI/package.json @@ -0,0 +1,24 @@ +{ + "name": "ld-fdpi-linux", + "private": true, + "version": "1.0.0", + "description": "LD FDPI Linux port (Phase 1 FDPI MVP)", + "type": "module", + "scripts": { + "dev": "vite", + "build": "vite build", + "preview": "vite preview", + "tauri": "tauri" + }, + "dependencies": { + "@tauri-apps/api": "^2.2.0", + "lucide-react": "^0.474.0", + "react": "^18.3.1", + "react-dom": "^18.3.1" + }, + "devDependencies": { + "@tauri-apps/cli": "^2.2.0", + "@vitejs/plugin-react": "^4.3.4", + "vite": "^6.0.7" + } +} diff --git a/linuxFDPI/packaging/ld-fdpi.desktop b/linuxFDPI/packaging/ld-fdpi.desktop new file mode 100644 index 0000000..1258fcc --- /dev/null +++ b/linuxFDPI/packaging/ld-fdpi.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Application +Name=LD FDPI Linux +Comment=DPI bypass and zero-touch VPN client +Exec=/usr/bin/ld-fdpi-linux +Icon=ld-fdpi +Terminal=false +Categories=Network;Utility; +Keywords=DPI;VPN;Proxy;Discord; +StartupWMClass=ld-fdpi-linux diff --git a/linuxFDPI/postcss.config.js b/linuxFDPI/postcss.config.js new file mode 100644 index 0000000..3e0d24c --- /dev/null +++ b/linuxFDPI/postcss.config.js @@ -0,0 +1,3 @@ +export default { + plugins: {}, +}; diff --git a/linuxFDPI/scripts/build.sh b/linuxFDPI/scripts/build.sh new file mode 100644 index 0000000..431ef3d --- /dev/null +++ b/linuxFDPI/scripts/build.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash +set -euo pipefail + +ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" +cd "$ROOT" + +if ! command -v cargo >/dev/null; then + echo "cargo is required" >&2 + exit 1 +fi + +npm ci +npm run tauri build -- --bundles deb,appimage diff --git a/linuxFDPI/scripts/install.sh b/linuxFDPI/scripts/install.sh new file mode 100644 index 0000000..19672ef --- /dev/null +++ b/linuxFDPI/scripts/install.sh @@ -0,0 +1,42 @@ +#!/usr/bin/env bash +set -euo pipefail + +ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" +PREFIX="${PREFIX:-/usr}" +LIBDIR="$PREFIX/lib/ld-fdpi" +BINDIR="$PREFIX/bin" +SYSTEMD_DIR="/etc/systemd/system" + +if [[ "$(id -u)" -ne 0 ]]; then + echo "install.sh must run as root" >&2 + exit 1 +fi + +if ! getent group ld-fdpi >/dev/null; then + groupadd --system ld-fdpi +fi + +install -d -m 0755 "$LIBDIR" "$BINDIR" +install -d -m 0755 "$SYSTEMD_DIR" +install -d -m 0755 /usr/share/applications +install -d -m 0755 /usr/share/icons/hicolor/256x256/apps + +# Build outputs (Tauri release profile). +install -m 0755 "$ROOT/src-tauri/target/release/ld-fdpi-linux" "$BINDIR/ld-fdpi" +install -m 0755 "$ROOT/helper/ld_fdpi_helper.py" "$LIBDIR/ld_fdpi_helper.py" +install -m 0644 "$ROOT/helper/ld-fdpi-helper.service" "$SYSTEMD_DIR/ld-fdpi-helper.service" +install -m 0644 "$ROOT/packaging/ld-fdpi.desktop" /usr/share/applications/ld-fdpi.desktop +install -m 0644 "$ROOT/src-tauri/icons/icon.png" /usr/share/icons/hicolor/256x256/apps/ld-fdpi.png + +# SpoofDPI is a separate Go binary and is intentionally not downloaded here. +if [[ -f "$ROOT/src-tauri/binaries/spoofdpi" ]]; then + install -m 0755 "$ROOT/src-tauri/binaries/spoofdpi" "$LIBDIR/spoofdpi" +else + echo "warning: SpoofDPI binary not found; install it at $LIBDIR/spoofdpi" >&2 +fi + +systemctl daemon-reload +systemctl enable --now ld-fdpi-helper.service +usermod -aG ld-fdpi "${SUDO_USER:-$USER}" || true + +echo "Installed. Log out/in once so the ld-fdpi group applies to your session." diff --git a/linuxFDPI/scripts/uninstall.sh b/linuxFDPI/scripts/uninstall.sh new file mode 100644 index 0000000..9ddbd15 --- /dev/null +++ b/linuxFDPI/scripts/uninstall.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash +set -euo pipefail + +if [[ "$(id -u)" -ne 0 ]]; then + echo "uninstall.sh must run as root" >&2 + exit 1 +fi + +systemctl disable --now ld-fdpi-helper.service 2>/dev/null || true +rm -f /etc/systemd/system/ld-fdpi-helper.service +rm -f /usr/share/applications/ld-fdpi.desktop +rm -f /usr/share/icons/hicolor/256x256/apps/ld-fdpi.png +rm -f /usr/bin/ld-fdpi +rm -rf /usr/lib/ld-fdpi +systemctl daemon-reload +echo "Removed. User config in ~/.config/ld-fdpi was left intact." diff --git a/linuxFDPI/src-tauri/Cargo.lock b/linuxFDPI/src-tauri/Cargo.lock new file mode 100644 index 0000000..05a8fdf --- /dev/null +++ b/linuxFDPI/src-tauri/Cargo.lock @@ -0,0 +1,4414 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "adler2" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" + +[[package]] +name = "aho-corasick" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c982642fa9e8606056828ee9a8505737230110bb1099153c79efe865c59d12ba" +dependencies = [ + "memchr", +] + +[[package]] +name = "alloc-no-stdlib" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2fb6cfd47bf496ff64095c20eaba0c201404ee38714d4142fcfa1dc334fcc7a" + +[[package]] +name = "alloc-stdlib" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b5c1865780388bfa186411ab5f247819487fc4864c6e9c3106611fa347586e1" +dependencies = [ + "alloc-no-stdlib", +] + +[[package]] +name = "android_system_properties" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae221649c9976a6f6c56ae1facf410f3ddb33cc661c4b7b61020a912d4237fbc" +dependencies = [ + "libc", +] + +[[package]] +name = "anyhow" +version = "1.0.104" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "330a5ed07fa54e4702c9d6c4174f74427fc0ef6e214bbd677ae50a5099946470" + +[[package]] +name = "atk" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "241b621213072e993be4f6f3a9e4b45f65b7e6faad43001be957184b7bb1824b" +dependencies = [ + "atk-sys", + "glib", + "libc", +] + +[[package]] +name = "atk-sys" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5e48b684b0ca77d2bbadeef17424c2ea3c897d44d566a1617e7e8f30614d086" +dependencies = [ + "glib-sys", + "gobject-sys", + "libc", + "system-deps", +] + +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + +[[package]] +name = "autocfg" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53" + +[[package]] +name = "base64" +version = "0.21.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" + +[[package]] +name = "base64" +version = "0.23.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac07cdecf99051d9a5238b80f35af32cdeba5b336e55d957b318b50137e18da5" + +[[package]] +name = "bit-set" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08807e080ed7f9d5433fa9b275196cfc35414f66a0c79d864dc51a0d825231a3" +dependencies = [ + "bit-vec", +] + +[[package]] +name = "bit-vec" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e764a1d40d510daf35e07be9eb06e75770908c27d411ee6c92109c9840eaaf7" + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bitflags" +version = "2.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ded4057c258ba199e2d26386d3af3780957ecaee6c4ef4041c6b4b8b97c0b06" +dependencies = [ + "serde_core", +] + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[package]] +name = "block2" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdeb9d870516001442e364c5220d3574d2da8dc765554b4a617230d33fa58ef5" +dependencies = [ + "objc2", +] + +[[package]] +name = "brotli" +version = "9.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "627b7cfb0578f0eafce087a90fcd40add1231900b69e4d4de2d456260a4f5d81" +dependencies = [ + "alloc-no-stdlib", + "alloc-stdlib", + "brotli-decompressor", +] + +[[package]] +name = "brotli-decompressor" +version = "6.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34c6783f42c21c952ad7112b354f0ba2f10760e9decea5b1b60523d6e270faaf" +dependencies = [ + "alloc-no-stdlib", + "alloc-stdlib", +] + +[[package]] +name = "bs58" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf88ba1141d185c399bee5288d850d63b8369520c1eafc32a0430b5b6c287bf4" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "bumpalo" +version = "3.20.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72f5acc6cb2ba439de613abc23857ec3d78374d8ed5ac84e9d11336e87da8649" + +[[package]] +name = "bytemuck" +version = "1.25.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95832e849adfb21180ccb6826a99da14e5d266ae5c2e668e1602cf234f153797" + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "bytes" +version = "1.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc652a48c352aef3ea3aed32080501cf3ef6ed5da78602a020c991775b0aff04" +dependencies = [ + "serde", +] + +[[package]] +name = "cairo-rs" +version = "0.18.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ca26ef0159422fb77631dc9d17b102f253b876fe1586b03b803e63a309b4ee2" +dependencies = [ + "bitflags 2.13.2", + "cairo-sys-rs", + "glib", + "libc", + "once_cell", + "thiserror 1.0.69", +] + +[[package]] +name = "cairo-sys-rs" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "685c9fa8e590b8b3d678873528d83411db17242a73fccaed827770ea0fedda51" +dependencies = [ + "glib-sys", + "libc", + "system-deps", +] + +[[package]] +name = "camino" +version = "1.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbbad30e4b4c14a39e3cc8aed085a12a327257c316619c93581e017bc52be591" +dependencies = [ + "serde_core", +] + +[[package]] +name = "cargo-platform" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e35af189006b9c0f00a064685c727031e3ed2d8020f7ba284d78cc2671bd36ea" +dependencies = [ + "serde", +] + +[[package]] +name = "cargo_metadata" +version = "0.19.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd5eb614ed4c27c5d706420e4320fbe3216ab31fa1c33cd8246ac36dae4479ba" +dependencies = [ + "camino", + "cargo-platform", + "semver", + "serde", + "serde_json", + "thiserror 2.0.21", +] + +[[package]] +name = "cargo_toml" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82f4b26e751e711a5302649417f2da046dce6391b2ea30a4820f37462314f0b9" +dependencies = [ + "semver", + "serde", + "toml 1.2.0+spec-1.1.0", +] + +[[package]] +name = "cc" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "375989decec1a0fa424442bed520fa12ede43a48475ce8c7417d2c69b32b5f6b" +dependencies = [ + "find-msvc-tools", + "shlex", +] + +[[package]] +name = "cesu8" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" + +[[package]] +name = "cfb" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a347dcabdae9c31b0825fd6a8bed285ec9c2acb89c47827126d52fa4f59cece3" +dependencies = [ + "fnv", + "uuid", + "web-time", +] + +[[package]] +name = "cfg-expr" +version = "0.15.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d067ad48b8650848b989a59a86c6c36a995d02d2bf778d45c3c5d57bc2718f02" +dependencies = [ + "smallvec", + "target-lexicon", +] + +[[package]] +name = "cfg-if" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e7648175b45a9a48536d676f68d918270699102aa8dab5496df06904c914600" + +[[package]] +name = "chrono" +version = "0.4.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1aa79e62e7697b8e29b513a68abacf485adcd1fe8284a4316c5ae868e6633327" +dependencies = [ + "iana-time-zone", + "num-traits", + "serde", + "windows-link", +] + +[[package]] +name = "combine" +version = "4.6.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4356eba6976435498d05a311ee9fc486da3bc81c200d3f0d7dd9703b41913f92" +dependencies = [ + "bytes", + "memchr", +] + +[[package]] +name = "cookie" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a373e3602691c3cdea496d2f0ee5935151e6168fe87739483c463db1b2f2f87" +dependencies = [ + "time", + "version_check", +] + +[[package]] +name = "core-foundation" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2a6cd9ae233e7f62ba4e9353e81a88df7fc8a5987b8d445b4d90c879bd156f6" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" + +[[package]] +name = "core-graphics" +version = "0.25.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "064badf302c3194842cf2c5d61f56cc88e54a759313879cdf03abdd27d0c3b97" +dependencies = [ + "bitflags 2.13.2", + "core-foundation", + "core-graphics-types", + "foreign-types", + "libc", +] + +[[package]] +name = "core-graphics-types" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d44a101f213f6c4cdc1853d4b78aef6db6bdfa3468798cc1d9912f4735013eb" +dependencies = [ + "bitflags 2.13.2", + "core-foundation", + "libc", +] + +[[package]] +name = "cpufeatures" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" +dependencies = [ + "libc", +] + +[[package]] +name = "crc32fast" +version = "1.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f97d3416d5337d15c4b0d78c8c91df922ca143f57ec20e2d1c188333047ef04" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "crossbeam-channel" +version = "0.5.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98b0cc327b5bc766e7fda9c9260cc0fa81b43a8e240440422dff70788e3f9ef1" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a31eee39dddec8330830986fcd7625edb5a24ec90ea038215273bbc3adb08ac6" + +[[package]] +name = "crypto-common" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a" +dependencies = [ + "generic-array", + "typenum", +] + +[[package]] +name = "cssparser" +version = "0.37.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c9cdaae01d5ed7882b04d795e7f752f46ff52d2fa3b50a20d28c464510bba98" +dependencies = [ + "cssparser-macros", + "dtoa-short", + "itoa", + "phf", + "smallvec", +] + +[[package]] +name = "cssparser-macros" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d045de693cb712d0b22c6a64be5b953f67b3ce00ab5ad3dd5d8b441886ab8e1a" +dependencies = [ + "quote", + "syn 3.0.9", +] + +[[package]] +name = "ctor" +version = "1.0.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "914a755b7c2d4af2bdcff7ce1739e2db9a1b81a9b07123d8015786ae03c0980d" + +[[package]] +name = "darling" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed17f5901b6630b993ca003def43f2f8ef4014fc13b047b57aad617ff32bc2ec" +dependencies = [ + "darling_core", + "darling_macro", +] + +[[package]] +name = "darling_core" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6837e2cf7485aaae18f86181d2f0e9a7ed297a025e220aeabf63fdebd3a2ddff" +dependencies = [ + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn 3.0.9", +] + +[[package]] +name = "darling_macro" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ac7135c3ef02b2f7833bbeb1be5ba7f966dcde8a87c6b87f65a778d71a02785" +dependencies = [ + "darling_core", + "quote", + "syn 3.0.9", +] + +[[package]] +name = "dbus" +version = "0.9.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ab69f03cc8c4340c9c8e315114e1658e6775a9b16a04357973aa21cec22b32e" +dependencies = [ + "libc", + "libdbus-sys", + "windows-sys 0.61.2", +] + +[[package]] +name = "defmt" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4a0795ac740cb54d7b3775c9c17345f6aaecf884c01733b39d6017738e0e3e1" +dependencies = [ + "bitflags 1.3.2", + "defmt-macros", +] + +[[package]] +name = "defmt-macros" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "840bb056bd99c495c9188198a258ab787c79f306d864db3e6e8451442d6d8366" +dependencies = [ + "defmt-parser", + "proc-macro2", + "quote", + "syn 3.0.9", +] + +[[package]] +name = "defmt-parser" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71958f69fb2de856c5dd51ac9377e986ca1aa5919f931bf5395a807277f889a0" +dependencies = [ + "thiserror 2.0.21", +] + +[[package]] +name = "deranged" +version = "0.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e9de72ce2ad1f90dc62fa25f0f430ef85eb4b0d8fa0be4f30373bc40a21d28e" +dependencies = [ + "serde_core", +] + +[[package]] +name = "derive_more" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d751e9e49156b02b44f9c1815bcb94b984cdcc4396ecc32521c739452808b134" +dependencies = [ + "derive_more-impl", +] + +[[package]] +name = "derive_more-impl" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "799a97264921d8623a957f6c3b9011f3b5492f557bbb7a5a19b7fa6d06ba8dcb" +dependencies = [ + "proc-macro2", + "quote", + "rustc_version", + "syn 2.0.119", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer", + "crypto-common", +] + +[[package]] +name = "dirs" +version = "5.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" +dependencies = [ + "dirs-sys 0.4.1", +] + +[[package]] +name = "dirs" +version = "7.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d57d423b3c82e89b9a24ca3091fee61f456a26edbd28d26c65906f4bc1dcd8f" +dependencies = [ + "dirs-sys 0.5.0", +] + +[[package]] +name = "dirs-sys" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" +dependencies = [ + "libc", + "option-ext", + "redox_users 0.4.6", + "windows-sys 0.48.0", +] + +[[package]] +name = "dirs-sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e01a3366d27ee9890022452ee61b2b63a67e6f13f58900b651ff5665f0bb1fab" +dependencies = [ + "libc", + "option-ext", + "redox_users 0.5.3", + "windows-sys 0.61.2", +] + +[[package]] +name = "dispatch2" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e0e367e4e7da84520dedcac1901e4da967309406d1e51017ae1abfb97adbd38" +dependencies = [ + "bitflags 2.13.2", + "block2", + "libc", + "objc2", +] + +[[package]] +name = "displaydoc" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6232dd377dcc64799954cbd3a9bb882e9cdc1308ccd87b1c098f1fb2eaf82a8" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.9", +] + +[[package]] +name = "dlopen2" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e2c5bd4158e66d1e215c49b837e11d62f3267b30c92f1d171c4d3105e3dc4d4" +dependencies = [ + "dlopen2_derive", + "libc", + "once_cell", + "winapi", +] + +[[package]] +name = "dlopen2_derive" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fbbb781877580993a8707ec48672673ec7b81eeba04cfd2310bd28c08e47c8f" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "dom_query" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fac5fca71e65e94cc718a6e2af65d6e0f9c6027751c2aa562fbb5087fda639bc" +dependencies = [ + "bit-set", + "cssparser", + "foldhash", + "html5ever", + "precomputed-hash", + "selectors", + "tendril", +] + +[[package]] +name = "dpi" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8b14ccef22fc6f5a8f4d7d768562a182c04ce9a3b3157b91390b52ddfdf1a76" +dependencies = [ + "serde", +] + +[[package]] +name = "dtoa" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c3cf4824e2d5f025c7b531afcb2325364084a16806f6d47fbc1f5fbd9960590" + +[[package]] +name = "dtoa-short" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd1511a7b6a56299bd043a9c167a6d2bfb37bf84a6dfceaba651168adfb43c87" +dependencies = [ + "dtoa", +] + +[[package]] +name = "dunce" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" + +[[package]] +name = "dyn-clone" +version = "1.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0881ea181b1df73ff77ffaaf9c7544ecc11e82fba9b5f27b262a3c73a332555" + +[[package]] +name = "embed-resource" +version = "3.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6168487b5e7eb2673e6efe1200b1848016e436a6ca0b8031bf04bd9d493a249f" +dependencies = [ + "cc", + "memchr", + "rustc_version", + "toml 1.2.0+spec-1.1.0", + "vswhom", + "winreg", +] + +[[package]] +name = "embed_plist" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ef6b89e5b37196644d8796de5268852ff179b44e96276cf4290264843743bb7" + +[[package]] +name = "equivalent" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00d174d5400e5e8fd687ad1049e2f578285fa914201b1af7e8b112a4546bd826" + +[[package]] +name = "erased-serde" +version = "0.4.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e59b668157f32d3459d4bd634861a06ffa2503a461ca5f0916b9f0252605e66" +dependencies = [ + "serde", + "serde_core", + "typeid", +] + +[[package]] +name = "fastrand" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da7c62ceae207dd37ea5b845da6a0696c799f85e97da1ab5b7910be3c1c80223" + +[[package]] +name = "fdeflate" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e6853b52649d4ac5c0bd02320cddc5ba956bdb407c4b75a2c6b75bf51500f8c" +dependencies = [ + "simd-adler32", +] + +[[package]] +name = "field-offset" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38e2275cc4e4fc009b0669731a1e5ab7ebf11f469eaede2bab9309a5b4d6057f" +dependencies = [ + "memoffset", + "rustc_version", +] + +[[package]] +name = "find-msvc-tools" +version = "0.1.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c66915cc5391097de7a2b0b972e8505aa33c0df401fd3a6811dbdb32881ba48" + +[[package]] +name = "flate2" +version = "1.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e634e2e0ebac1ee034020da1ca582e17ffe4e0f5e985823721e168928136dcb" +dependencies = [ + "crc32fast", + "miniz_oxide 0.9.1", + "zlib-rs", +] + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "foldhash" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb" + +[[package]] +name = "foreign-types" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d737d9aa519fb7b749cbc3b962edcf310a8dd1f4b67c91c4f83975dbdd17d965" +dependencies = [ + "foreign-types-macros", + "foreign-types-shared", +] + +[[package]] +name = "foreign-types-macros" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea5190182e6915eb873ddbc16e23b711b6eb1f9c00a0d0a3a91b5f6228475225" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.9", +] + +[[package]] +name = "foreign-types-shared" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b" + +[[package]] +name = "form_urlencoded" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "futures-channel" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1f9e3d69d39e4862ffed03ed071a76f9a13ba1d9109d355b0f0aa6b15e393c4" +dependencies = [ + "futures-core", +] + +[[package]] +name = "futures-core" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92d699e522242e69e3003b94ecc1f960f3a5e015aa7c5d7486e65ad01dd94f5e" + +[[package]] +name = "futures-executor" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "031b47cf1a3c6cc8bc2fc76cd437f521619387907d469316e7c0bc278f1f5432" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-io" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53c0fa8157de1303bfffdaa1cc2a673bfffb60102f76b0ef4441659124373fed" + +[[package]] +name = "futures-macro" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fb9654ba8355388abeb8dcb4fc62f511300867002afc858860463bdd9fe0c44" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.9", +] + +[[package]] +name = "futures-sink" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1944426bf7d03f1d14f708785e4b33efd750b36d48a157b836b3efc15ede8e1d" + +[[package]] +name = "futures-task" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd417de3d1d015fc3bfd2b1ea46dfc7bab72ef86f1cc7cc9c78e728b34a6d1fd" + +[[package]] +name = "futures-util" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d50a92467f8ba5dd6e3ee5d4bd04d73ab2e4e1c44474a0674821dfce14b79bc" +dependencies = [ + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "slab", +] + +[[package]] +name = "gdk" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9f245958c627ac99d8e529166f9823fb3b838d1d41fd2b297af3075093c2691" +dependencies = [ + "cairo-rs", + "gdk-pixbuf", + "gdk-sys", + "gio", + "glib", + "libc", + "pango", +] + +[[package]] +name = "gdk-pixbuf" +version = "0.18.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50e1f5f1b0bfb830d6ccc8066d18db35c487b1b2b1e8589b5dfe9f07e8defaec" +dependencies = [ + "gdk-pixbuf-sys", + "gio", + "glib", + "libc", + "once_cell", +] + +[[package]] +name = "gdk-pixbuf-sys" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9839ea644ed9c97a34d129ad56d38a25e6756f99f3a88e15cd39c20629caf7" +dependencies = [ + "gio-sys", + "glib-sys", + "gobject-sys", + "libc", + "system-deps", +] + +[[package]] +name = "gdk-sys" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c2d13f38594ac1e66619e188c6d5a1adb98d11b2fcf7894fc416ad76aa2f3f7" +dependencies = [ + "cairo-sys-rs", + "gdk-pixbuf-sys", + "gio-sys", + "glib-sys", + "gobject-sys", + "libc", + "pango-sys", + "pkg-config", + "system-deps", +] + +[[package]] +name = "gdkwayland-sys" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "140071d506d223f7572b9f09b5e155afbd77428cd5cc7af8f2694c41d98dfe69" +dependencies = [ + "gdk-sys", + "glib-sys", + "gobject-sys", + "libc", + "pkg-config", + "system-deps", +] + +[[package]] +name = "gdkx11" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3caa00e14351bebbc8183b3c36690327eb77c49abc2268dd4bd36b856db3fbfe" +dependencies = [ + "gdk", + "gdkx11-sys", + "gio", + "glib", + "libc", + "x11", +] + +[[package]] +name = "gdkx11-sys" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e2e7445fe01ac26f11601db260dd8608fe172514eb63b3b5e261ea6b0f4428d" +dependencies = [ + "gdk-sys", + "glib-sys", + "libc", + "system-deps", + "x11", +] + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "typenum", + "version_check", +] + +[[package]] +name = "getrandom" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0" +dependencies = [ + "cfg-if", + "libc", + "wasi", +] + +[[package]] +name = "getrandom" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" +dependencies = [ + "cfg-if", + "libc", + "r-efi 5.3.0", + "wasip2", +] + +[[package]] +name = "getrandom" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "300e883d756b2e4ec94e02791f39b04b522276138852cfc41d9fb7e904106099" +dependencies = [ + "cfg-if", + "libc", + "r-efi 6.0.0", +] + +[[package]] +name = "gio" +version = "0.18.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4fc8f532f87b79cbc51a79748f16a6828fb784be93145a322fa14d06d354c73" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-util", + "gio-sys", + "glib", + "libc", + "once_cell", + "pin-project-lite", + "smallvec", + "thiserror 1.0.69", +] + +[[package]] +name = "gio-sys" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37566df850baf5e4cb0dfb78af2e4b9898d817ed9263d1090a2df958c64737d2" +dependencies = [ + "glib-sys", + "gobject-sys", + "libc", + "system-deps", + "winapi", +] + +[[package]] +name = "glib" +version = "0.18.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "233daaf6e83ae6a12a52055f568f9d7cf4671dabb78ff9560ab6da230ce00ee5" +dependencies = [ + "bitflags 2.13.2", + "futures-channel", + "futures-core", + "futures-executor", + "futures-task", + "futures-util", + "gio-sys", + "glib-macros", + "glib-sys", + "gobject-sys", + "libc", + "memchr", + "once_cell", + "smallvec", + "thiserror 1.0.69", +] + +[[package]] +name = "glib-macros" +version = "0.18.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bb0228f477c0900c880fd78c8759b95c7636dbd7842707f49e132378aa2acdc" +dependencies = [ + "heck 0.4.1", + "proc-macro-crate 2.0.2", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "glib-sys" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "063ce2eb6a8d0ea93d2bf8ba1957e78dbab6be1c2220dd3daca57d5a9d869898" +dependencies = [ + "libc", + "system-deps", +] + +[[package]] +name = "glob" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4eba85ea1d0a966a983acd07deee566e67395d2d96b6fb39e62b5a833f1eb0b" + +[[package]] +name = "gobject-sys" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0850127b514d1c4a4654ead6dedadb18198999985908e6ffe4436f53c785ce44" +dependencies = [ + "glib-sys", + "libc", + "system-deps", +] + +[[package]] +name = "gtk" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd56fb197bfc42bd5d2751f4f017d44ff59fbb58140c6b49f9b3b2bdab08506a" +dependencies = [ + "atk", + "cairo-rs", + "field-offset", + "futures-channel", + "gdk", + "gdk-pixbuf", + "gio", + "glib", + "gtk-sys", + "gtk3-macros", + "libc", + "pango", + "pkg-config", +] + +[[package]] +name = "gtk-sys" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f29a1c21c59553eb7dd40e918be54dccd60c52b049b75119d5d96ce6b624414" +dependencies = [ + "atk-sys", + "cairo-sys-rs", + "gdk-pixbuf-sys", + "gdk-sys", + "gio-sys", + "glib-sys", + "gobject-sys", + "libc", + "pango-sys", + "system-deps", +] + +[[package]] +name = "gtk3-macros" +version = "0.18.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52ff3c5b21f14f0736fed6dcfc0bfb4225ebf5725f3c0209edeec181e4d73e9d" +dependencies = [ + "proc-macro-crate 1.3.1", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" + +[[package]] +name = "hashbrown" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a" + +[[package]] +name = "heck" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "html5ever" +version = "0.39.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46a1761807faccc9a19e86944bbf40610014066306f96edcdedc2fb714bcb7b8" +dependencies = [ + "log", + "markup5ever", +] + +[[package]] +name = "http" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "918d3568bebf352712bc2ef3d46a8bcf1a75b373be6539de198e9105cbbf9ce0" +dependencies = [ + "bytes", + "itoa", +] + +[[package]] +name = "http-body" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca2a8f2913ee65f60facd6a5905613afaa448497a0230cc41ce022d93290bc2c" +dependencies = [ + "bytes", + "http", +] + +[[package]] +name = "http-body-util" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23169fe34a5fbcdd3f3862e78fb9b6fccd5f02a6dc6f732547005d45631ce71c" +dependencies = [ + "bytes", + "futures-core", + "http", + "http-body", + "pin-project-lite", +] + +[[package]] +name = "httparse" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" + +[[package]] +name = "hyper" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c3e324da4c95177d6291d4c8730197c0d1822f8a9766814a4a44fa5ab797c9c" +dependencies = [ + "atomic-waker", + "bytes", + "futures-core", + "http", + "http-body", + "httparse", + "itoa", + "pin-project-lite", + "smallvec", + "tokio", + "want", +] + +[[package]] +name = "hyper-util" +version = "0.1.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddc03d96684f9226b8a787cdb71488417b53ab5ea8fdb1dac946cb9431cc8bff" +dependencies = [ + "base64 0.23.1", + "bytes", + "futures-channel", + "futures-util", + "http", + "http-body", + "httparse", + "hyper", + "ipnet", + "libc", + "percent-encoding", + "pin-project-lite", + "socket2", + "tokio", + "tower-service", + "tracing", +] + +[[package]] +name = "iana-time-zone" +version = "0.1.65" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e31bc9ad994ba00e440a8aa5c9ef0ec67d5cb5e5cb0cc7f8b744a35b389cc470" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "log", + "wasm-bindgen", + "windows-core", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +dependencies = [ + "cc", +] + +[[package]] +name = "ico" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d75e94d66081e4d8dcd098bd8dc5254800fea14a26389b298410158d834de167" +dependencies = [ + "byteorder", + "png", +] + +[[package]] +name = "icu_collections" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe090a42a0d3140fed8c63263ed1fecc02422cb2f4bfe55cd8de2de1b8e105dd" +dependencies = [ + "displaydoc", + "potential_utf", + "utf8_iter", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locale_core" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25d29b57c17c6528d0dc4c2141cfa2d08200465acb537a3909c8b9b8a4a984c0" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_normalizer" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "404a3b8c486f205c87fe7f23ab6894d84a4ad76d6e4671ae1981ba7def87c599" +dependencies = [ + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20f0088bfb7441f7a37fa0c9e20cb1e9cba1cac6b9ce8cd2a6dc44294f8e8cbc" + +[[package]] +name = "icu_properties" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ea83d991c56158f7cf898bf86436c1dfe7c07ee82fe88951f2695c9f37a379f" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_locale_core", + "icu_properties_data", + "icu_provider", + "zerotrie", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b98f29af82d02b163fe50161388350e743bb3107cc8e8c2f7314cb505faddfcf" + +[[package]] +name = "icu_provider" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413099315636c588ee8f011190b329b971a09a8fae9d157e01dcae8379468514" +dependencies = [ + "displaydoc", + "icu_locale_core", + "writeable", + "yoke", + "zerofrom", + "zerotrie", + "zerovec", +] + +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + +[[package]] +name = "idna" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de" +dependencies = [ + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb68373c0d6620ef8105e855e7745e18b0d00d3bdb07fb532e434244cdb9a714" +dependencies = [ + "icu_normalizer", + "icu_properties", +] + +[[package]] +name = "indexmap" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +dependencies = [ + "autocfg", + "hashbrown 0.12.3", + "serde", +] + +[[package]] +name = "indexmap" +version = "2.14.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc4e190f5d26ca7051642629da2c52fc03bde85a03197c99408dcd291734c855" +dependencies = [ + "equivalent", + "hashbrown 0.17.1", + "serde", + "serde_core", +] + +[[package]] +name = "infer" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4200d433cbd5178df7797c9c2e75b348b728e39631cf14520d1e2fc424201f4" +dependencies = [ + "cfb", +] + +[[package]] +name = "ipnet" +version = "2.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "791930b43c0d5973160d90a8f3894509f2b273430f5c5c73b668636d0287c5c0" + +[[package]] +name = "itoa" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" + +[[package]] +name = "javascriptcore-rs" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca5671e9ffce8ffba57afc24070e906da7fc4b1ba66f2cabebf61bf2ea257fcc" +dependencies = [ + "bitflags 1.3.2", + "glib", + "javascriptcore-rs-sys", +] + +[[package]] +name = "javascriptcore-rs-sys" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af1be78d14ffa4b75b66df31840478fef72b51f8c2465d4ca7c194da9f7a5124" +dependencies = [ + "glib-sys", + "gobject-sys", + "libc", + "system-deps", +] + +[[package]] +name = "jiff" +version = "0.2.39" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ac703058abac89e5c39b0b879dce2b6b14a4ba36600c7e7e3d0c60a6883ef3c" +dependencies = [ + "defmt", + "jiff-core", + "jiff-static", + "jiff-tzdb-platform", + "log", + "portable-atomic", + "portable-atomic-util", + "serde_core", + "windows-link", +] + +[[package]] +name = "jiff-core" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aee43309eb53bafb8c36d35d6e444769c8f8e6206a9fbf7546f5db9d7d4a0e93" +dependencies = [ + "defmt", + "log", +] + +[[package]] +name = "jiff-static" +version = "0.2.39" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6dc32470c67eb7d0e9ccb74303fa925313dc04cecb1aa048beaa6f391e36a93d" +dependencies = [ + "jiff-core", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "jiff-tzdb" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa8377070c6bae868759445e5a77f66d84f0b72f3a054bfb00e6d038b8282da7" + +[[package]] +name = "jiff-tzdb-platform" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "875a5a69ac2bab1a891711cf5eccbec1ce0341ea805560dcd90b7a2e925132e8" +dependencies = [ + "jiff-tzdb", +] + +[[package]] +name = "jni" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a87aa2bb7d2af34197c04845522473242e1aa17c12f4935d5856491a7fb8c97" +dependencies = [ + "cesu8", + "cfg-if", + "combine", + "jni-sys 0.3.1", + "log", + "thiserror 1.0.69", + "walkdir", + "windows-sys 0.45.0", +] + +[[package]] +name = "jni-sys" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41a652e1f9b6e0275df1f15b32661cf0d4b78d4d87ddec5e0c3c20f097433258" +dependencies = [ + "jni-sys 0.4.1", +] + +[[package]] +name = "jni-sys" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6377a88cb3910bee9b0fa88d4f42e1d2da8e79915598f65fb0c7ee14c878af2" +dependencies = [ + "jni-sys-macros", +] + +[[package]] +name = "jni-sys-macros" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38c0b942f458fe50cdac086d2f946512305e5631e720728f2a61aabcd47a6264" +dependencies = [ + "quote", + "syn 2.0.119", +] + +[[package]] +name = "js-sys" +version = "0.3.107" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8dc09d2154098bbf4ef54eab6b117a3c24cbbffe94046b16ee6d6d4510584d3a" +dependencies = [ + "cfg-if", + "futures-util", + "wasm-bindgen", +] + +[[package]] +name = "json-patch" +version = "4.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7421438de105a0827e44fadd05377727847d717c80ce29a229f85fd04c427b72" +dependencies = [ + "jsonptr", + "serde", + "serde_json", + "thiserror 2.0.21", +] + +[[package]] +name = "jsonptr" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5a3cc660ba5d72bce0b3bb295bf20847ccbb40fd423f3f05b61273672e561fe" +dependencies = [ + "serde", + "serde_json", +] + +[[package]] +name = "keyboard-types" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fbe853b403ae61a04233030ae8a79d94975281ed9770a1f9e246732b534b28d" +dependencies = [ + "bitflags 2.13.2", + "serde", +] + +[[package]] +name = "ld-fdpi-linux" +version = "0.1.0" +dependencies = [ + "dirs 5.0.1", + "libc", + "serde", + "serde_json", + "tauri", + "tauri-build", +] + +[[package]] +name = "libappindicator" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03589b9607c868cc7ae54c0b2a22c8dc03dd41692d48f2d7df73615c6a95dc0a" +dependencies = [ + "glib", + "gtk", + "gtk-sys", + "libappindicator-sys", + "log", +] + +[[package]] +name = "libappindicator-sys" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e9ec52138abedcc58dc17a7c6c0c00a2bdb4f3427c7f63fa97fd0d859155caf" +dependencies = [ + "gtk-sys", + "libloading", + "once_cell", +] + +[[package]] +name = "libc" +version = "0.2.191" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65cd87c9a6d60536580b316ad985726104730a5151c99845f2490428ef91240a" + +[[package]] +name = "libdbus-sys" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "328c4789d42200f1eeec05bd86c9c13c7f091d2ba9a6ea35acdf51f31bc0f043" +dependencies = [ + "pkg-config", +] + +[[package]] +name = "libloading" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" +dependencies = [ + "cfg-if", + "winapi", +] + +[[package]] +name = "libredox" +version = "0.1.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61ff90caf6077a803a240f62fdbe88645a890bbca49ef8174c3cb0404362171d" +dependencies = [ + "libc", +] + +[[package]] +name = "litemap" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47d9d19d1d6efa0109d2f65ff4c85cddd50bd572e5a00127ab10987290bcefae" + +[[package]] +name = "lock_api" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965" +dependencies = [ + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d15f86d12da44cd8d4ec3c73984537eb7f4cadcb9776a575a0a8a05ca11005c" + +[[package]] +name = "markup5ever" +version = "0.39.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7122d987ec5f704ee56f6e5b41a7d93722e9aae27ae07cafa4036c4d3f9757de" +dependencies = [ + "log", + "tendril", + "web_atoms", +] + +[[package]] +name = "memchr" +version = "2.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98" + +[[package]] +name = "memoffset" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" +dependencies = [ + "autocfg", +] + +[[package]] +name = "mime" +version = "0.3.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5848f5a9e8117cf94f2f90faac24a87ff81600ff8628c1e3deaab572e76bfa1" + +[[package]] +name = "miniz_oxide" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" +dependencies = [ + "adler2", + "simd-adler32", +] + +[[package]] +name = "miniz_oxide" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b63fbc4a50860e98e7b2aa7804ded1db5cbc3aff9193adaff57a6931bf7c4b4c" +dependencies = [ + "adler2", + "simd-adler32", +] + +[[package]] +name = "mio" +version = "1.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1788edb87fdc09c7e26304471e2f5be8cdefb1b6930d6e3985fc02ff53bf86ee" +dependencies = [ + "libc", + "wasi", + "windows-sys 0.61.2", +] + +[[package]] +name = "muda" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cca139e57da4383727f189e43e66e84fa372347027fc996f9f1a007ec0a37996" +dependencies = [ + "crossbeam-channel", + "dpi", + "gtk", + "keyboard-types", + "objc2", + "objc2-app-kit", + "objc2-core-foundation", + "objc2-foundation", + "once_cell", + "png", + "serde", + "thiserror 2.0.21", + "windows-sys 0.61.2", +] + +[[package]] +name = "ndk" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3f42e7bbe13d351b6bead8286a43aac9534b82bd3cc43e47037f012ebfd62d4" +dependencies = [ + "bitflags 2.13.2", + "jni-sys 0.3.1", + "log", + "ndk-sys", + "num_enum", + "raw-window-handle", + "thiserror 1.0.69", +] + +[[package]] +name = "ndk-context" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" + +[[package]] +name = "ndk-sys" +version = "0.6.0+11769913" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee6cda3051665f1fb8d9e08fc35c96d5a244fb1be711a03b71118828afc9a873" +dependencies = [ + "jni-sys 0.3.1", +] + +[[package]] +name = "new_debug_unreachable" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086" + +[[package]] +name = "num-conv" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "521739c6d2bac4aa25192232afe6841231376b2b26d4d9fae5ecf8ca5772e441" + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", +] + +[[package]] +name = "num_enum" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d0bca838442ec211fa11de3a8b0e0e8f3a4522575b5c4c06ed722e005036f26" +dependencies = [ + "num_enum_derive", + "rustversion", +] + +[[package]] +name = "num_enum_derive" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "680998035259dcfcafe653688bf2aa6d3e2dc05e98be6ab46afb089dc84f1df8" +dependencies = [ + "proc-macro-crate 3.5.0", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "objc2" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08849bbd4767dfae9457696856ae1c84fe4e0281bbe4a7abff2d0e06fb7981f8" +dependencies = [ + "objc2-encode", + "objc2-exception-helper", +] + +[[package]] +name = "objc2-app-kit" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d49e936b501e5c5bf01fda3a9452ff86dc3ea98ad5f283e1455153142d97518c" +dependencies = [ + "bitflags 2.13.2", + "block2", + "objc2", + "objc2-core-foundation", + "objc2-foundation", + "objc2-quartz-core", +] + +[[package]] +name = "objc2-cloud-kit" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73ad74d880bb43877038da939b7427bba67e9dd42004a18b809ba7d87cee241c" +dependencies = [ + "bitflags 2.13.2", + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-core-data" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b402a653efbb5e82ce4df10683b6b28027616a2715e90009947d50b8dd298fa" +dependencies = [ + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-core-foundation" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a180dd8642fa45cdb7dd721cd4c11b1cadd4929ce112ebd8b9f5803cc79d536" +dependencies = [ + "bitflags 2.13.2", + "dispatch2", + "objc2", +] + +[[package]] +name = "objc2-core-graphics" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e022c9d066895efa1345f8e33e584b9f958da2fd4cd116792e15e07e4720a807" +dependencies = [ + "bitflags 2.13.2", + "dispatch2", + "objc2", + "objc2-core-foundation", + "objc2-io-surface", +] + +[[package]] +name = "objc2-core-image" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5d563b38d2b97209f8e861173de434bd0214cf020e3423a52624cd1d989f006" +dependencies = [ + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-core-location" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca347214e24bc973fc025fd0d36ebb179ff30536ed1f80252706db19ee452009" +dependencies = [ + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-core-text" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0cde0dfb48d25d2b4862161a4d5fcc0e3c24367869ad306b0c9ec0073bfed92d" +dependencies = [ + "bitflags 2.13.2", + "objc2", + "objc2-core-foundation", + "objc2-core-graphics", +] + +[[package]] +name = "objc2-encode" +version = "4.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef25abbcd74fb2609453eb695bd2f860d389e457f67dc17cafc8b8cbc89d0c33" + +[[package]] +name = "objc2-exception-helper" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7a1c5fbb72d7735b076bb47b578523aedc40f3c439bea6dfd595c089d79d98a" +dependencies = [ + "cc", +] + +[[package]] +name = "objc2-foundation" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3e0adef53c21f888deb4fa59fc59f7eb17404926ee8a6f59f5df0fd7f9f3272" +dependencies = [ + "bitflags 2.13.2", + "block2", + "objc2", + "objc2-core-foundation", +] + +[[package]] +name = "objc2-io-surface" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "180788110936d59bab6bd83b6060ffdfffb3b922ba1396b312ae795e1de9d81d" +dependencies = [ + "bitflags 2.13.2", + "objc2", + "objc2-core-foundation", +] + +[[package]] +name = "objc2-quartz-core" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96c1358452b371bf9f104e21ec536d37a650eb10f7ee379fff67d2e08d537f1f" +dependencies = [ + "bitflags 2.13.2", + "objc2", + "objc2-core-foundation", + "objc2-foundation", +] + +[[package]] +name = "objc2-ui-kit" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d87d638e33c06f577498cbcc50491496a3ed4246998a7fbba7ccb98b1e7eab22" +dependencies = [ + "bitflags 2.13.2", + "block2", + "objc2", + "objc2-cloud-kit", + "objc2-core-data", + "objc2-core-foundation", + "objc2-core-graphics", + "objc2-core-image", + "objc2-core-location", + "objc2-core-text", + "objc2-foundation", + "objc2-quartz-core", + "objc2-user-notifications", +] + +[[package]] +name = "objc2-user-notifications" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9df9128cbbfef73cda168416ccf7f837b62737d748333bfe9ab71c245d76613e" +dependencies = [ + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-web-kit" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2e5aaab980c433cf470df9d7af96a7b46a9d892d521a2cbbb2f8a4c16751e7f" +dependencies = [ + "bitflags 2.13.2", + "block2", + "objc2", + "objc2-app-kit", + "objc2-core-foundation", + "objc2-foundation", +] + +[[package]] +name = "once_cell" +version = "1.21.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" + +[[package]] +name = "option-ext" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" + +[[package]] +name = "pango" +version = "0.18.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ca27ec1eb0457ab26f3036ea52229edbdb74dee1edd29063f5b9b010e7ebee4" +dependencies = [ + "gio", + "glib", + "libc", + "once_cell", + "pango-sys", +] + +[[package]] +name = "pango-sys" +version = "0.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "436737e391a843e5933d6d9aa102cb126d501e815b83601365a948a518555dc5" +dependencies = [ + "glib-sys", + "gobject-sys", + "libc", + "system-deps", +] + +[[package]] +name = "parking_lot" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-link", +] + +[[package]] +name = "percent-encoding" +version = "2.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" + +[[package]] +name = "phf" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1562dc717473dbaa4c1f85a36410e03c047b2e7df7f45ee938fbef64ae7fadf" +dependencies = [ + "phf_macros", + "phf_shared", + "serde", +] + +[[package]] +name = "phf_codegen" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49aa7f9d80421bca176ca8dbfebe668cc7a2684708594ec9f3c0db0805d5d6e1" +dependencies = [ + "phf_generator", + "phf_shared", +] + +[[package]] +name = "phf_generator" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "135ace3a761e564ec88c03a77317a7c6b80bb7f7135ef2544dbe054243b89737" +dependencies = [ + "fastrand", + "phf_shared", +] + +[[package]] +name = "phf_macros" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "812f032b54b1e759ccd5f8b6677695d5268c588701effba24601f6932f8269ef" +dependencies = [ + "phf_generator", + "phf_shared", + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "phf_shared" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e57fef6bc5981e38c2ce2d63bfa546861309f875b8a75f092d1d54ae2d64f266" +dependencies = [ + "siphasher", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" + +[[package]] +name = "pkg-config" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6b464fbc74e149a392436b17d523f769e057cb6877f6a5c4618bc6f11800548" + +[[package]] +name = "plist" +version = "1.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "327a4cb2ad49dc48adfdc9da89e22c64d488b508c67a044d71ba729e4521a285" +dependencies = [ + "base64 0.23.1", + "indexmap 2.14.2", + "quick-xml", + "serde", + "time", +] + +[[package]] +name = "png" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60769b8b31b2a9f263dae2776c37b1b28ae246943cf719eb6946a1db05128a61" +dependencies = [ + "bitflags 2.13.2", + "crc32fast", + "fdeflate", + "flate2", + "miniz_oxide 0.8.9", +] + +[[package]] +name = "portable-atomic" +version = "1.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05c8b63e8d9609db387f0324918f81d68fe27748f084ef092fb35954d0539a85" + +[[package]] +name = "portable-atomic-util" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10ab3eb7f3becc3a1cbc4f2c6f20267996cfc1a6467a873763411b136a122715" +dependencies = [ + "portable-atomic", +] + +[[package]] +name = "potential_utf" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d83eb9bc6d8e5cf568e7a1101d60ee05e81ed50ea106026f3d18deeb046d7661" +dependencies = [ + "zerovec", +] + +[[package]] +name = "powerfmt" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a6394b9e965e73d0a289ee54f589087e2c676aedf60885baf52c76b771e4958" + +[[package]] +name = "precomputed-hash" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" + +[[package]] +name = "proc-macro-crate" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" +dependencies = [ + "once_cell", + "toml_edit 0.19.15", +] + +[[package]] +name = "proc-macro-crate" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b00f26d3400549137f92511a46ac1cd8ce37cb5598a96d382381458b992a5d24" +dependencies = [ + "toml_datetime 0.6.3", + "toml_edit 0.20.2", +] + +[[package]] +name = "proc-macro-crate" +version = "3.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e67ba7e9b2b56446f1d419b1d807906278ffa1a658a8a5d8a39dcb1f5a78614f" +dependencies = [ + "toml_edit 0.25.18+spec-1.1.0", +] + +[[package]] +name = "proc-macro-error" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" +dependencies = [ + "proc-macro-error-attr", + "proc-macro2", + "quote", + "syn 1.0.109", + "version_check", +] + +[[package]] +name = "proc-macro-error-attr" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" +dependencies = [ + "proc-macro2", + "quote", + "version_check", +] + +[[package]] +name = "proc-macro2" +version = "1.0.107" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quick-xml" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41b1177fdf999d2321d3fb46ff47159d9c1fb9ad66a4879f8c50a0b504615e9b" +dependencies = [ + "memchr", +] + +[[package]] +name = "quote" +version = "1.0.47" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "r-efi" +version = "5.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" + +[[package]] +name = "r-efi" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" + +[[package]] +name = "raw-window-handle" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20675572f6f24e9e76ef639bc5552774ed45f1c30e2951e1e99c59888861c539" + +[[package]] +name = "redox_syscall" +version = "0.5.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" +dependencies = [ + "bitflags 2.13.2", +] + +[[package]] +name = "redox_users" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" +dependencies = [ + "getrandom 0.2.17", + "libredox", + "thiserror 1.0.69", +] + +[[package]] +name = "redox_users" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60dc65c0ff1a7ae1294b0c67b9f14baf70b644404010370171787bfac1038fc0" +dependencies = [ + "libredox", + "thiserror 2.0.21", +] + +[[package]] +name = "ref-cast" +version = "1.0.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e440fb4e4b4147295338efb76001ab9e4efc0e5839df2c47fc5ac2381d365c3" +dependencies = [ + "ref-cast-impl", +] + +[[package]] +name = "ref-cast-impl" +version = "1.0.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92ecd8964f8453721699a1ed72037b0db49ce2f5a5138486ee89bed6f67cdf3a" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.9", +] + +[[package]] +name = "regex" +version = "1.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f020237b6c8eed93db2e2cb53c00c60a8e1bc73da7d073199a1180401450218d" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad8553b9b26413251cbf30e620595c7a41b3887f03da04579c0e6b0d6a06b4b2" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6f6ff9a378485b298a5286656da665ba74413d36db0979633275d2e708145d4" + +[[package]] +name = "reqwest" +version = "0.13.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16a1cfa75cc186dd73d5818e510e042e40927bccc9c236b061cea97e1eb08029" +dependencies = [ + "base64 0.23.1", + "bytes", + "futures-core", + "futures-util", + "http", + "http-body", + "http-body-util", + "hyper", + "hyper-util", + "js-sys", + "log", + "percent-encoding", + "pin-project-lite", + "serde", + "serde_json", + "sync_wrapper", + "tokio", + "tokio-util", + "tower", + "tower-http", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "wasm-streams", + "web-sys", +] + +[[package]] +name = "rustc-hash" +version = "2.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b1e7f9a428571be2dc5bc0505c13fb6bf936822b894ec87abf8a08a4e51742d" + +[[package]] +name = "rustc_version" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" +dependencies = [ + "semver", +] + +[[package]] +name = "rustversion" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf54715a573b99ac80df0bc206da022bcd442c974952c7b9720069370852e21f" + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "schemars" +version = "0.8.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fbf2ae1b8bc8e02df939598064d22402220cd5bbcca1c76f7d6a310974d5615" +dependencies = [ + "dyn-clone", + "indexmap 1.9.3", + "schemars_derive", + "serde", + "serde_json", + "url", + "uuid", +] + +[[package]] +name = "schemars" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cd191f9397d57d581cddd31014772520aa448f65ef991055d7f61582c65165f" +dependencies = [ + "dyn-clone", + "ref-cast", + "serde", + "serde_json", +] + +[[package]] +name = "schemars" +version = "1.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab508826f74a77ca9d5aba6ff19b522583ee3eaf28a19384ff3d0e5835fadf6e" +dependencies = [ + "dyn-clone", + "ref-cast", + "serde", + "serde_json", +] + +[[package]] +name = "schemars_derive" +version = "0.8.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32e265784ad618884abaea0600a9adf15393368d840e0222d101a072f3f7534d" +dependencies = [ + "proc-macro2", + "quote", + "serde_derive_internals", + "syn 2.0.119", +] + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "selectors" +version = "0.38.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8adfa1c298912827b8a28b223b3b874357397ae706e6190acd9bf28cee99114d" +dependencies = [ + "bitflags 2.13.2", + "cssparser", + "derive_more", + "log", + "new_debug_unreachable", + "phf", + "phf_codegen", + "precomputed-hash", + "rustc-hash", + "servo_arc", + "smallvec", +] + +[[package]] +name = "semver" +version = "1.0.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd" +dependencies = [ + "serde", + "serde_core", +] + +[[package]] +name = "serde" +version = "1.0.229" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4148590afebada386688f18773da617792bf2ef03ffc1e4cbd2b1d45b023e0ba" +dependencies = [ + "serde_core", + "serde_derive", +] + +[[package]] +name = "serde-untagged" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9faf48a4a2d2693be24c6289dbe26552776eb7737074e6722891fadbe6c5058" +dependencies = [ + "erased-serde", + "serde", + "serde_core", + "typeid", +] + +[[package]] +name = "serde_core" +version = "1.0.229" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67dca2c9c51e58a4791a4b1ed58308b39c64224d349a935ab5039aa360942a48" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.229" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.9", +] + +[[package]] +name = "serde_derive_internals" +version = "0.29.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "serde_json" +version = "1.0.154" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7e9cc8b1b85264074fbcc02a88680c4096b1e47df8f739dceb03bf482f04bd6" +dependencies = [ + "itoa", + "memchr", + "serde", + "serde_core", + "zmij", +] + +[[package]] +name = "serde_repr" +version = "0.1.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d3b1629de253c70a0508c3899572da79ca359fdab27c7920ff00406df418906" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.9", +] + +[[package]] +name = "serde_spanned" +version = "0.6.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf41e0cfaf7226dca15e8197172c295a782857fcb97fad1808a166870dee75a3" +dependencies = [ + "serde", +] + +[[package]] +name = "serde_spanned" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e7523beb55eece201a2356bee0bbca0d1ab466c14c07703b2e0ee6d42cb0c2c" +dependencies = [ + "serde_core", +] + +[[package]] +name = "serde_with" +version = "3.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df9adc193c780ef8f159aee8b61e2d5801aaa555e6eb0947fe45530ec506296f" +dependencies = [ + "base64 0.23.1", + "bs58", + "chrono", + "hex", + "indexmap 1.9.3", + "indexmap 2.14.2", + "jiff", + "schemars 0.9.0", + "schemars 1.2.3", + "serde_core", + "serde_json", + "serde_with_macros", + "time", +] + +[[package]] +name = "serde_with_macros" +version = "3.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e17bbc68e28663bbbb90df47e058aa7eda4fb445b89fe70457bb94fbccf6e49" +dependencies = [ + "darling", + "proc-macro2", + "quote", + "syn 3.0.9", +] + +[[package]] +name = "serialize-to-javascript" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04f3666a07a197cdb77cdf306c32be9b7f598d7060d50cfd4d5aa04bfd92f6c5" +dependencies = [ + "serde", + "serde_json", + "serialize-to-javascript-impl", +] + +[[package]] +name = "serialize-to-javascript-impl" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "772ee033c0916d670af7860b6e1ef7d658a4629a6d0b4c8c3e67f09b3765b75d" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "servo_arc" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "170fb83ab34de17dc69aa7c67482b22218ddb85da56546f9bd6b929e32a05930" +dependencies = [ + "stable_deref_trait", +] + +[[package]] +name = "sha2" +version = "0.10.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest", +] + +[[package]] +name = "shlex" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8fadd59c855ef2080decdef8ff161eb6661b86933c9d82e5ba29dc602a55aba" + +[[package]] +name = "simd-adler32" +version = "0.3.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a219298ac11a56ea9a6d2120044824d6f01aeb034955e7af7bc16858527deea" + +[[package]] +name = "siphasher" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33f4fe9184a62d842c9ef383018f3306d8ba224fd9d836f56d7288308847c256" + +[[package]] +name = "slab" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5" + +[[package]] +name = "smallvec" +version = "1.16.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0d5d4b1981b8bbbb7aed204cae5726d683d5d6ac7e74ec54122ea28f315e7c8" + +[[package]] +name = "socket2" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3d1e2c7f27f8d4cb10542a02c49005dbd6e93095799d6f3be745fae9f8fedd4" +dependencies = [ + "libc", + "windows-sys 0.61.2", +] + +[[package]] +name = "softbuffer" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aac18da81ebbf05109ab275b157c22a653bb3c12cf884450179942f81bcbf6c3" +dependencies = [ + "bytemuck", + "js-sys", + "ndk", + "objc2", + "objc2-core-foundation", + "objc2-core-graphics", + "objc2-foundation", + "objc2-quartz-core", + "raw-window-handle", + "redox_syscall", + "tracing", + "wasm-bindgen", + "web-sys", + "windows-sys 0.61.2", +] + +[[package]] +name = "soup3" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "471f924a40f31251afc77450e781cb26d55c0b650842efafc9c6cbd2f7cc4f9f" +dependencies = [ + "futures-channel", + "gio", + "glib", + "libc", + "soup3-sys", +] + +[[package]] +name = "soup3-sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ebe8950a680a12f24f15ebe1bf70db7af98ad242d9db43596ad3108aab86c27" +dependencies = [ + "gio-sys", + "glib-sys", + "gobject-sys", + "libc", + "system-deps", +] + +[[package]] +name = "stable_deref_trait" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" + +[[package]] +name = "static_vcruntime" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff7589a1859b09232522bb9edf076ca7fcf14ded96685d3fa629db73023ffbb7" + +[[package]] +name = "string_cache" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a18596f8c785a729f2819c0f6a7eae6ebeebdfffbfe4214ae6b087f690e31901" +dependencies = [ + "new_debug_unreachable", + "parking_lot", + "phf_shared", + "precomputed-hash", +] + +[[package]] +name = "string_cache_codegen" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "585635e46db231059f76c5849798146164652513eb9e8ab2685939dd90f29b69" +dependencies = [ + "phf_generator", + "phf_shared", + "proc-macro2", + "quote", +] + +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + +[[package]] +name = "swift-rs" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cefd87076fd385308ee4aff597256c902f1fbb4d031de1558efc12f8ffefadd9" +dependencies = [ + "base64 0.21.7", + "serde", + "serde_json", +] + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.119" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "872831b642d1a07999a962a351ed35b955ea2cfc8f3862091e2a240a84f17297" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "3.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d78c8dee4c7bf0e14673097256fed6142ce9d3b85a408189d07482442145823b" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "sync_wrapper" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" +dependencies = [ + "futures-core", +] + +[[package]] +name = "synstructure" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "901704edd0dfe137f1987838ee4f259e4e063c31371bdb423f7ae38ec6f77f02" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.9", +] + +[[package]] +name = "system-deps" +version = "6.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3e535eb8dded36d55ec13eddacd30dec501792ff23a0b1682c38601b8cf2349" +dependencies = [ + "cfg-expr", + "heck 0.5.0", + "pkg-config", + "toml 0.8.2", + "version-compare", +] + +[[package]] +name = "tao" +version = "0.37.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5777b06fe6435126ae8d816eba269e050e1e10d302cf5461e9c49eccabc3548" +dependencies = [ + "bitflags 2.13.2", + "block2", + "core-foundation", + "core-graphics", + "crossbeam-channel", + "dbus", + "dispatch2", + "dlopen2", + "dpi", + "gdkwayland-sys", + "gdkx11-sys", + "gtk", + "jni", + "libc", + "log", + "ndk", + "ndk-context", + "ndk-sys", + "objc2", + "objc2-app-kit", + "objc2-foundation", + "objc2-ui-kit", + "parking_lot", + "percent-encoding", + "raw-window-handle", + "tao-macros", + "unicode-segmentation", + "url", + "windows", + "windows-core", + "windows-version", + "x11-dl", +] + +[[package]] +name = "tao-macros" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f7eeb6d99155545da6150a1795945f16ac9c178deb2a5f2e74d776107bd5849" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "target-lexicon" +version = "0.12.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" + +[[package]] +name = "tauri" +version = "2.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5fb0244332cfb9cee7e2a568bf5da29a36ed8fdbd717f6f47a66b6b7b358c072" +dependencies = [ + "anyhow", + "bytes", + "cookie", + "dirs 7.0.0", + "dunce", + "embed_plist", + "getrandom 0.3.4", + "glob", + "gtk", + "heck 0.5.0", + "http", + "jni", + "libc", + "log", + "mime", + "muda", + "objc2", + "objc2-app-kit", + "objc2-foundation", + "objc2-ui-kit", + "objc2-web-kit", + "percent-encoding", + "plist", + "raw-window-handle", + "reqwest", + "serde", + "serde_json", + "serde_repr", + "serialize-to-javascript", + "swift-rs", + "tauri-build", + "tauri-macros", + "tauri-runtime", + "tauri-runtime-wry", + "tauri-utils", + "thiserror 2.0.21", + "tokio", + "tray-icon", + "url", + "webkit2gtk", + "webview2-com", + "window-vibrancy", + "windows", +] + +[[package]] +name = "tauri-build" +version = "2.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adddb0e648752aaac5da9c3c3c6a68e1e87cab55e3b757b18a9441ef8c3ac614" +dependencies = [ + "anyhow", + "cargo_toml", + "dirs 7.0.0", + "glob", + "heck 0.5.0", + "json-patch", + "schemars 0.8.22", + "semver", + "serde", + "serde_json", + "static_vcruntime", + "strsim", + "tauri-utils", + "tauri-winres", + "walkdir", +] + +[[package]] +name = "tauri-codegen" +version = "2.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb37631cf71dab5e8ab55e1bdd701e18a52653d90b78e71d0e5598b1e0a61316" +dependencies = [ + "base64 0.23.1", + "brotli", + "ico", + "json-patch", + "plist", + "png", + "proc-macro2", + "quote", + "semver", + "serde", + "serde_json", + "sha2", + "syn 2.0.119", + "tauri-utils", + "thiserror 2.0.21", + "time", + "url", + "uuid", + "walkdir", +] + +[[package]] +name = "tauri-macros" +version = "2.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0cc38db58854c10fb5f91a887ed8bf82d3239bb92b5d8db86eda09e96d9963d1" +dependencies = [ + "heck 0.5.0", + "proc-macro2", + "quote", + "syn 2.0.119", + "tauri-codegen", + "tauri-utils", +] + +[[package]] +name = "tauri-runtime" +version = "2.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c55766d99cea69055904d1735b93c2049302b2e09effd462120deb5581d78e9" +dependencies = [ + "cookie", + "dpi", + "gtk", + "http", + "jni", + "objc2", + "objc2-ui-kit", + "objc2-web-kit", + "raw-window-handle", + "serde", + "serde_json", + "tauri-utils", + "thiserror 2.0.21", + "url", + "webkit2gtk", + "webview2-com", + "windows", +] + +[[package]] +name = "tauri-runtime-wry" +version = "2.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1aa9d8b7a120f879f44fdc1053f7b7dbf416bf0bbc6a72b714dec46b782b52f" +dependencies = [ + "gtk", + "http", + "jni", + "log", + "objc2", + "objc2-app-kit", + "percent-encoding", + "raw-window-handle", + "softbuffer", + "tao", + "tauri-runtime", + "tauri-utils", + "url", + "webkit2gtk", + "webview2-com", + "windows", + "wry", +] + +[[package]] +name = "tauri-utils" +version = "2.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "362ab21cd4cc713f2a02b1a9b5688198b1541cfb6907c4281e9190e0f0ef4aa3" +dependencies = [ + "anyhow", + "brotli", + "cargo_metadata", + "ctor", + "dom_query", + "dunce", + "glob", + "http", + "infer", + "json-patch", + "log", + "memchr", + "phf", + "plist", + "proc-macro2", + "quote", + "regex", + "schemars 0.8.22", + "semver", + "serde", + "serde-untagged", + "serde_json", + "serde_with", + "swift-rs", + "thiserror 2.0.21", + "toml 1.2.0+spec-1.1.0", + "url", + "urlpattern", + "uuid", + "walkdir", +] + +[[package]] +name = "tauri-winres" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c52bb6904475a6ca662f15ef787f18ade61d5740a1ee12c45d3b748efdb6f796" +dependencies = [ + "dunce", + "embed-resource", + "toml 1.2.0+spec-1.1.0", +] + +[[package]] +name = "tendril" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5fed54709c5b3a53d09bb1c113ea4f5ceafd1e772ddcb0030a82e1d56c087b08" +dependencies = [ + "new_debug_unreachable", +] + +[[package]] +name = "thiserror" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" +dependencies = [ + "thiserror-impl 1.0.69", +] + +[[package]] +name = "thiserror" +version = "2.0.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09e52cb86a36cede5cb101bf8908837b3e4c6e5e59fe7fd85c23fb56200d189e" +dependencies = [ + "thiserror-impl 2.0.21", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "thiserror-impl" +version = "2.0.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe5197923287db20a58125f0bc85c062f7f2c892de97b18c356f9efb14b28524" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.9", +] + +[[package]] +name = "time" +version = "0.3.55" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdb87b95ec50ddfa440816d227a17b2ccbdda963a316a727fda0fc4334f7d134" +dependencies = [ + "deranged", + "num-conv", + "powerfmt", + "serde_core", + "time-core", + "time-macros", +] + +[[package]] +name = "time-core" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e1c906769ad99c88eaa54e728060edef082f8e358ff32030cb7c7d315e81109" + +[[package]] +name = "time-macros" +version = "0.2.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e689342a48d2ea927c87ea50cabf8594854bf940e9310208848d680d668ed85" +dependencies = [ + "num-conv", + "time-core", +] + +[[package]] +name = "tinystr" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "abc840c238154d58f9e86b2792261edfde565a17696e1cda1a449de27979801a" +dependencies = [ + "displaydoc", + "zerovec", +] + +[[package]] +name = "tinyvec" +version = "1.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd3ca314f692efd6c868f8408f53fe444634a845f96c028b97d35f6a1f79f0ee" + +[[package]] +name = "tokio" +version = "1.54.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b52fd3255258d26fac7264ab5a76b53c13367136dc011d3d6ad4f8ed070396a3" +dependencies = [ + "bytes", + "libc", + "mio", + "pin-project-lite", + "socket2", + "windows-sys 0.61.2", +] + +[[package]] +name = "tokio-util" +version = "0.7.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e464cf451ba96ebfc6f9b6542f17ee8b8956e33f1e40d9690624e59d7a7f8a4b" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "toml" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "185d8ab0dfbb35cf1399a6344d8484209c088f75f8f68230da55d48d95d43e3d" +dependencies = [ + "serde", + "serde_spanned 0.6.9", + "toml_datetime 0.6.3", + "toml_edit 0.20.2", +] + +[[package]] +name = "toml" +version = "1.2.0+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5ffcdf8f50436dbbfd675c1fe1b8e0854f42b7defea8584bdebe1aee900e561" +dependencies = [ + "indexmap 2.14.2", + "serde_core", + "serde_spanned 1.1.2", + "toml_datetime 1.1.2+spec-1.1.0", + "toml_parser", + "toml_writer", + "winnow 1.0.5", +] + +[[package]] +name = "toml_datetime" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" +dependencies = [ + "serde", +] + +[[package]] +name = "toml_datetime" +version = "1.1.2+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b86d767906c6c42421dcba507eb9d203e779497710a47782a224bb871653053" +dependencies = [ + "serde_core", +] + +[[package]] +name = "toml_edit" +version = "0.19.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" +dependencies = [ + "indexmap 2.14.2", + "toml_datetime 0.6.3", + "winnow 0.5.40", +] + +[[package]] +name = "toml_edit" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" +dependencies = [ + "indexmap 2.14.2", + "serde", + "serde_spanned 0.6.9", + "toml_datetime 0.6.3", + "winnow 0.5.40", +] + +[[package]] +name = "toml_edit" +version = "0.25.18+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ec6e78bd70db9420d8d212fa9dc97f116448a1ceff5d00eabb991d407e21396" +dependencies = [ + "indexmap 2.14.2", + "toml_datetime 1.1.2+spec-1.1.0", + "toml_parser", + "winnow 1.0.5", +] + +[[package]] +name = "toml_parser" +version = "1.1.5+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baa693a8032d7e1cada7d0041e96126df243179ff061456783ac7f12bda4744c" +dependencies = [ + "winnow 1.0.5", +] + +[[package]] +name = "toml_writer" +version = "1.2.0+spec-1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "009dbb7700f11c55ef83aebbe4c0e9cf1f1ac0844bd8d6f00dc38f302026e13a" + +[[package]] +name = "tower" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebe5ef63511595f1344e2d5cfa636d973292adc0eec1f0ad45fae9f0851ab1d4" +dependencies = [ + "futures-core", + "futures-util", + "pin-project-lite", + "sync_wrapper", + "tokio", + "tower-layer", + "tower-service", +] + +[[package]] +name = "tower-http" +version = "0.6.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cfcf7e2740e6fc6d4d688b4ef00650406bb94adf4731e43c096c3a19fe40840" +dependencies = [ + "bitflags 2.13.2", + "bytes", + "futures-util", + "http", + "http-body", + "pin-project-lite", + "tower", + "tower-layer", + "tower-service", + "url", +] + +[[package]] +name = "tower-layer" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" + +[[package]] +name = "tower-service" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" + +[[package]] +name = "tracing" +version = "0.1.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100" +dependencies = [ + "pin-project-lite", + "tracing-core", +] + +[[package]] +name = "tracing-core" +version = "0.1.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a" +dependencies = [ + "once_cell", +] + +[[package]] +name = "tray-icon" +version = "0.25.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2b9c52859a94554803ccd4a24b98f74148ebc73b90676d783f3490b1bff9d72" +dependencies = [ + "crossbeam-channel", + "dirs 7.0.0", + "libappindicator", + "muda", + "objc2", + "objc2-app-kit", + "objc2-core-foundation", + "objc2-core-graphics", + "objc2-foundation", + "once_cell", + "png", + "serde", + "thiserror 2.0.21", + "windows-sys 0.61.2", +] + +[[package]] +name = "try-lock" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" + +[[package]] +name = "typeid" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc7d623258602320d5c55d1bc22793b57daff0ec7efc270ea7d55ce1d5f5471c" + +[[package]] +name = "typenum" +version = "1.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6f5e870be6c3b371b77fe0ee0bafb859fa4964b4404c27de1d380043c4dda20" + +[[package]] +name = "unicode-ident" +version = "1.0.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2c754d6c33795a1c324727428e5a7dedb5b06195f9890bdbcba760d3e246563" + +[[package]] +name = "unicode-segmentation" +version = "1.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6f5d3c3b1bf09027a88a6bc961fc00497d651009560b5463668dc81b0fa87a8" + +[[package]] +name = "url" +version = "2.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff67a8a4397373c3ef660812acab3268222035010ab8680ec4215f38ba3d0eed" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", + "serde", + "serde_derive", +] + +[[package]] +name = "urlpattern" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df16f50ef4cc145211879a3867ba757076b25dfee812040dcb0658bd9ae7904b" +dependencies = [ + "icu_properties", + "regex", + "serde", + "url", +] + +[[package]] +name = "utf8_iter" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af3bd9d3e571c26fcce9d033b87ea5ab061b8d2ffe9b7a5675d810d68f03edf0" +dependencies = [ + "utf_types", +] + +[[package]] +name = "utf_types" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a3b425286980a367278453f3b6d28cdcb134b574e5a35824a6ff5eebad50bb6" + +[[package]] +name = "uuid" +version = "1.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a0e2d11620c50695fe12bbbfde96b3477fe606e7284c22d505c12ce51214514" +dependencies = [ + "getrandom 0.4.3", + "js-sys", + "serde_core", + "wasm-bindgen", +] + +[[package]] +name = "version-compare" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03c2856837ef78f57382f06b2b8563a2f512f7185d732608fd9176cb3b8edf0e" + +[[package]] +name = "version_check" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" + +[[package]] +name = "vswhom" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be979b7f07507105799e854203b470ff7c78a1639e330a58f183b5fea574608b" +dependencies = [ + "libc", + "vswhom-sys", +] + +[[package]] +name = "vswhom-sys" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb067e4cbd1ff067d1df46c9194b5de0e98efd2810bbc95c5d5e5f25a3231150" +dependencies = [ + "cc", + "libc", +] + +[[package]] +name = "walkdir" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" +dependencies = [ + "same-file", + "winapi-util", +] + +[[package]] +name = "want" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec4cdd0dd910afe868b7ef477227d8d538b46b3075031afee8a9f2acb0a2ed0b" +dependencies = [ + "try-lock", +] + +[[package]] +name = "wasi" +version = "0.11.1+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" + +[[package]] +name = "wasip2" +version = "1.0.4+wasi-0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b67efb37e106e55ce722a510d6b5f9c17f083e5fc79afc2badeb12cc313d9487" +dependencies = [ + "wit-bindgen", +] + +[[package]] +name = "wasm-bindgen" +version = "0.2.130" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0181c14ddd6c7b8b0b0132a5f1ea2f32be0d893cd3ea97b6e3b28886b8a3d1c" +dependencies = [ + "cfg-if", + "rustversion", + "wasm-bindgen-macro", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.80" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e14e0327cb5368ad60ccb22d04a9827a693c95a926d8d125e9fa39e0baec501" +dependencies = [ + "js-sys", + "tokio", + "wasm-bindgen", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.130" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e931a02a39abdbf66966fc35902b5ed58344750a70885bed4ebb3d8eaf28ed9" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.130" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ca4b54280e455bd831e33a6b8e734baf432fe63fbc35c42ac14ce67a043a53a" +dependencies = [ + "bumpalo", + "proc-macro2", + "quote", + "syn 3.0.9", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.130" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b1f9c3798725016c6ee5f2f57869ec0831e8bbc0ab0310a86e787e97f41389e" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "wasm-streams" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d1ec4f6517c9e11ae630e200b2b65d193279042e28edd4a2cda233e46670bbb" +dependencies = [ + "futures-util", + "js-sys", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "web-sys" +version = "0.3.107" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7d179596ff5ec0f6de4db64d54011bde6289cc49603d3a6e4ce3f329207ab88" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "web-time" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "web_atoms" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba8b815c1b593dc0baf78dd0f4fc8fdb2de53198fb1163738093e9a311c33fb3" +dependencies = [ + "phf", + "phf_codegen", + "string_cache", + "string_cache_codegen", +] + +[[package]] +name = "webkit2gtk" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1027150013530fb2eaf806408df88461ae4815a45c541c8975e61d6f2fc4793" +dependencies = [ + "bitflags 1.3.2", + "cairo-rs", + "gdk", + "gdk-sys", + "gio", + "gio-sys", + "glib", + "glib-sys", + "gobject-sys", + "gtk", + "gtk-sys", + "javascriptcore-rs", + "libc", + "once_cell", + "soup3", + "webkit2gtk-sys", +] + +[[package]] +name = "webkit2gtk-sys" +version = "2.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "916a5f65c2ef0dfe12fff695960a2ec3d4565359fdbb2e9943c974e06c734ea5" +dependencies = [ + "bitflags 1.3.2", + "cairo-sys-rs", + "gdk-sys", + "gio-sys", + "glib-sys", + "gobject-sys", + "gtk-sys", + "javascriptcore-rs-sys", + "libc", + "pkg-config", + "soup3-sys", + "system-deps", +] + +[[package]] +name = "webview2-com" +version = "0.39.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f89fca7a704cee10dcb3654c1dbb8941d1783132f1917358af75bec37a7d7e6" +dependencies = [ + "webview2-com-macros", + "webview2-com-sys", + "windows", + "windows-core", +] + +[[package]] +name = "webview2-com-macros" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67a921c1b6914c367b2b823cd4cde6f96beec77d30a939c8199bb377cf9b9b54" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "webview2-com-sys" +version = "0.39.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3a07132775117d6065853d9d1178157b8c90e228de47129d6bce2c7edebedfb" +dependencies = [ + "thiserror 2.0.21", + "windows", + "windows-core", +] + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-util" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "window-vibrancy" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "111e51caca442cafd9bab396628ac4d814880eaea4e63dfd76a12e9f342b5580" +dependencies = [ + "objc2", + "objc2-app-kit", + "objc2-core-foundation", + "objc2-foundation", + "objc2-quartz-core", + "raw-window-handle", + "windows-sys 0.61.2", + "windows-version", +] + +[[package]] +name = "windows" +version = "0.62.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "527fadee13e0c05939a6a05d5bd6eec6cd2e3dbd648b9f8e447c6518133d8580" +dependencies = [ + "windows-collections", + "windows-core", + "windows-future", + "windows-numerics", +] + +[[package]] +name = "windows-collections" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23b2d95af1a8a14a3c7367e1ed4fc9c20e0a26e79551b1454d72583c97cc6610" +dependencies = [ + "windows-core", +] + +[[package]] +name = "windows-core" +version = "0.62.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb" +dependencies = [ + "windows-implement", + "windows-interface", + "windows-link", + "windows-result", + "windows-strings", +] + +[[package]] +name = "windows-future" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1d6f90251fe18a279739e78025bd6ddc52a7e22f921070ccdc67dde84c605cb" +dependencies = [ + "windows-core", + "windows-link", + "windows-threading", +] + +[[package]] +name = "windows-implement" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "windows-interface" +version = "0.59.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "windows-link" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" + +[[package]] +name = "windows-numerics" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e2e40844ac143cdb44aead537bbf727de9b044e107a0f1220392177d15b0f26" +dependencies = [ + "windows-core", + "windows-link", +] + +[[package]] +name = "windows-result" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-strings" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-sys" +version = "0.45.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" +dependencies = [ + "windows-targets 0.42.2", +] + +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets 0.48.5", +] + +[[package]] +name = "windows-sys" +version = "0.61.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-targets" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" +dependencies = [ + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", +] + +[[package]] +name = "windows-targets" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +dependencies = [ + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", +] + +[[package]] +name = "windows-threading" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3949bd5b99cafdf1c7ca86b43ca564028dfe27d66958f2470940f73d86d75b37" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-version" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4060a1da109b9d0326b7262c8e12c84df67cc0dbc9e33cf49e01ccc2eb63631" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" + +[[package]] +name = "windows_i686_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" + +[[package]] +name = "windows_i686_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" + +[[package]] +name = "windows_i686_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" + +[[package]] +name = "windows_i686_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + +[[package]] +name = "winnow" +version = "0.5.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" +dependencies = [ + "memchr", +] + +[[package]] +name = "winnow" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c3b93199df0ab874cdf0c6a94f0a0dc3423fe41f1cafb62b8bd7b1deb277aef" +dependencies = [ + "memchr", +] + +[[package]] +name = "winreg" +version = "0.56.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d6f32a0ff4a9f6f01231eb2059cc85479330739333e0e58cadf03b6af2cca10" +dependencies = [ + "cfg-if", + "windows-sys 0.61.2", +] + +[[package]] +name = "wit-bindgen" +version = "0.57.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e" + +[[package]] +name = "writeable" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ad82d2a33cdc9674dc7465672f271e096168fcdbe0f799d9e6db8c5892679dc" + +[[package]] +name = "wry" +version = "0.57.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "759c50ddad0ef9913bb5496cb9d509a50433a3b78cb0238d61105526589cf0e9" +dependencies = [ + "base64 0.23.1", + "block2", + "cookie", + "crossbeam-channel", + "dirs 7.0.0", + "dom_query", + "dpi", + "dunce", + "gdkx11", + "gtk", + "http", + "javascriptcore-rs", + "jni", + "libc", + "ndk", + "objc2", + "objc2-app-kit", + "objc2-core-foundation", + "objc2-foundation", + "objc2-ui-kit", + "objc2-web-kit", + "percent-encoding", + "raw-window-handle", + "sha2", + "soup3", + "tao-macros", + "thiserror 2.0.21", + "url", + "webkit2gtk", + "webkit2gtk-sys", + "webview2-com", + "windows", + "windows-core", + "windows-version", + "x11-dl", +] + +[[package]] +name = "x11" +version = "2.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "502da5464ccd04011667b11c435cb992822c2c0dbde1770c988480d312a0db2e" +dependencies = [ + "libc", + "pkg-config", +] + +[[package]] +name = "x11-dl" +version = "2.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38735924fedd5314a6e548792904ed8c6de6636285cb9fec04d5b1db85c1516f" +dependencies = [ + "libc", + "once_cell", + "pkg-config", +] + +[[package]] +name = "yoke" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "417ef3fcf6c300b7dbd25c85531a746931c02ad536f3cf4786ed1e88223340b3" +dependencies = [ + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec8ebde2db3681e8c9980cc27822030e68752690ddfa9473e739aeb4dbde6d71" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.9", + "synstructure", +] + +[[package]] +name = "zerofrom" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ec05a11813ea801ff6d75110ad09cd0824ddba17dfe17128ea0d5f68e6c5272" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f75b4683f6c7f45248d4d64056a24298c6281e0993356d7d1b4a1a962ef10d4a" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.9", + "synstructure", +] + +[[package]] +name = "zerotrie" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ea269c3bd32f0a32c321907a2ae912ba6f4649bb0fc764a15627e99a7095a3f" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", +] + +[[package]] +name = "zerovec" +version = "0.11.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f58a2799cfe9a1670c7ea8edbd52ef8edb93cb37a7f83bf31ba9e35d9dae6a40" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.11.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3743ddbf47738d929cd1ae2e199d40d0162979dfe31aef8ae646d2bf00bf97a" +dependencies = [ + "proc-macro2", + "quote", + "syn 3.0.9", +] + +[[package]] +name = "zlib-rs" +version = "0.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b268e58e7c693d7c271f93ffc4ba3b380412554231c85bf61ca7af91042a4112" + +[[package]] +name = "zmij" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b" diff --git a/linuxFDPI/src-tauri/Cargo.toml b/linuxFDPI/src-tauri/Cargo.toml new file mode 100644 index 0000000..141e6b3 --- /dev/null +++ b/linuxFDPI/src-tauri/Cargo.toml @@ -0,0 +1,24 @@ +[package] +name = "ld-fdpi-linux" +version = "1.0.0" +description = "LD FDPI Linux Phase 1" +authors = ["LD FDPI Contributors"] +edition = "2021" +license = "MIT" + +[lib] +name = "ld_fdpi_linux_lib" +crate-type = ["staticlib", "cdylib", "rlib"] + +[build-dependencies] +tauri-build = { version = "2", features = [] } + +[dependencies] +tauri = { version = "2", features = [] } +serde = { version = "1", features = ["derive"] } +serde_json = "1" +dirs = "5" +native-tls = "0.2" + +[target.'cfg(unix)'.dependencies] +libc = "0.2" diff --git a/linuxFDPI/src-tauri/build.rs b/linuxFDPI/src-tauri/build.rs new file mode 100644 index 0000000..d860e1e --- /dev/null +++ b/linuxFDPI/src-tauri/build.rs @@ -0,0 +1,3 @@ +fn main() { + tauri_build::build() +} diff --git a/linuxFDPI/src-tauri/capabilities/default.json b/linuxFDPI/src-tauri/capabilities/default.json new file mode 100644 index 0000000..4b1d9d6 --- /dev/null +++ b/linuxFDPI/src-tauri/capabilities/default.json @@ -0,0 +1,7 @@ +{ + "$schema": "../gen/schemas/desktop-schema.json", + "identifier": "default", + "description": "LD FDPI Linux minimum capability. No shell/fs plugins are exposed.", + "windows": ["main"], + "permissions": ["core:default"] +} diff --git a/linuxFDPI/src-tauri/icons/128x128.png b/linuxFDPI/src-tauri/icons/128x128.png new file mode 100644 index 0000000..7521eeb Binary files /dev/null and b/linuxFDPI/src-tauri/icons/128x128.png differ diff --git a/linuxFDPI/src-tauri/icons/32x32.png b/linuxFDPI/src-tauri/icons/32x32.png new file mode 100644 index 0000000..24bdae2 Binary files /dev/null and b/linuxFDPI/src-tauri/icons/32x32.png differ diff --git a/linuxFDPI/src-tauri/icons/icon.ico b/linuxFDPI/src-tauri/icons/icon.ico new file mode 100644 index 0000000..dfcfeec Binary files /dev/null and b/linuxFDPI/src-tauri/icons/icon.ico differ diff --git a/linuxFDPI/src-tauri/icons/icon.png b/linuxFDPI/src-tauri/icons/icon.png new file mode 100644 index 0000000..38a3020 Binary files /dev/null and b/linuxFDPI/src-tauri/icons/icon.png differ diff --git a/linuxFDPI/src-tauri/src/config.rs b/linuxFDPI/src-tauri/src/config.rs new file mode 100644 index 0000000..d9be533 --- /dev/null +++ b/linuxFDPI/src-tauri/src/config.rs @@ -0,0 +1,101 @@ +use serde::{Deserialize, Serialize}; +use std::fs; +use std::io::Write; +use std::path::{Path, PathBuf}; + +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(rename_all = "camelCase", default)] +pub struct Config { + pub proxy_port: u16, + pub quic_block: bool, + pub spoofdpi_path: String, + pub auto_start: bool, +} + +impl Default for Config { + fn default() -> Self { + Self { + proxy_port: 18080, + quic_block: false, + spoofdpi_path: String::new(), + auto_start: false, + } + } +} + +impl Config { + pub fn validate(&mut self) { + if self.proxy_port < 1024 { + self.proxy_port = 18080; + } + } +} + +pub fn data_dir() -> PathBuf { + dirs::config_dir() + .unwrap_or_else(|| PathBuf::from(".")) + .join("ld-fdpi") +} + +pub fn log_dir() -> PathBuf { + dirs::data_local_dir() + .unwrap_or_else(|| data_dir()) + .join("ld-fdpi") +} + +pub fn config_path() -> PathBuf { + data_dir().join("config.json") +} + +pub fn load() -> Config { + let path = config_path(); + let mut cfg = fs::read_to_string(&path) + .ok() + .and_then(|raw| serde_json::from_str::(&raw).ok()) + .unwrap_or_default(); + cfg.validate(); + cfg +} + +pub fn save(cfg: &Config) -> Result<(), String> { + let dir = data_dir(); + fs::create_dir_all(&dir).map_err(|e| format!("Ayar klasörü oluşturulamadı: {e}"))?; + let path = config_path(); + let tmp = path.with_extension("json.tmp"); + let body = serde_json::to_string_pretty(cfg).map_err(|e| e.to_string())?; + fs::write(&tmp, body).map_err(|e| format!("Ayar yazılamadı: {e}"))?; + #[cfg(unix)] + { + use std::os::unix::fs::PermissionsExt; + let _ = fs::set_permissions(&tmp, fs::Permissions::from_mode(0o600)); + } + fs::rename(&tmp, &path).map_err(|e| format!("Ayar taşınamadı: {e}"))?; + Ok(()) +} + +pub fn ensure_log_dir() -> Result { + let dir = log_dir(); + fs::create_dir_all(&dir).map_err(|e| format!("Log klasörü oluşturulamadı: {e}"))?; + Ok(dir) +} + +pub fn rotate_log(path: &Path, max_bytes: u64) { + if let Ok(meta) = fs::metadata(path) { + if meta.len() > max_bytes { + let old = path.with_extension("log.old"); + let _ = fs::remove_file(&old); + let _ = fs::rename(path, old); + } + } +} + +pub fn append_log(name: &str, line: &str) { + if let Ok(dir) = ensure_log_dir() { + let path = dir.join(name); + let _ = fs::OpenOptions::new() + .create(true) + .append(true) + .open(path) + .and_then(|mut f| writeln!(f, "{line}")); + } +} diff --git a/linuxFDPI/src-tauri/src/helper.rs b/linuxFDPI/src-tauri/src/helper.rs new file mode 100644 index 0000000..5f858bb --- /dev/null +++ b/linuxFDPI/src-tauri/src/helper.rs @@ -0,0 +1,79 @@ +use serde_json::Value; + +#[cfg(unix)] +pub fn call(action: &str) -> Result { + use std::io::{BufRead, BufReader, Write}; + use std::os::unix::net::UnixStream; + use std::time::Duration; + + let mut stream = UnixStream::connect("/run/ld-fdpi/helper.sock") + .map_err(|e| format!("Yardımcı servise bağlanılamadı: {e}"))?; + let _ = stream.set_read_timeout(Some(Duration::from_secs(8))); + let _ = stream.set_write_timeout(Some(Duration::from_secs(8))); + let request = serde_json::to_string(&serde_json::json!({ "action": action })) + .map_err(|e| e.to_string())?; + stream + .write_all(format!("{request}\n").as_bytes()) + .map_err(|e| format!("Yardımcıya yazılamadı: {e}"))?; + let mut response = String::new(); + BufReader::new(stream) + .read_line(&mut response) + .map_err(|e| format!("Yardımcı yanıtı okunamadı: {e}"))?; + let value: Value = serde_json::from_str(response.trim()) + .map_err(|e| format!("Yardımcı yanıtı geçersiz: {e}"))?; + if value.get("ok").and_then(Value::as_bool) != Some(true) { + return Err(value + .get("error") + .and_then(Value::as_str) + .unwrap_or("Yardımcı komutu reddetti.") + .to_string()); + } + Ok(value) +} + +#[cfg(not(unix))] +pub fn call(_action: &str) -> Result { + Err("Bu yardımcı yalnızca Linux'ta çalışır.".to_string()) +} + +#[cfg(unix)] +pub fn call_with(action: &str, payload: serde_json::Value) -> Result { + use std::io::{BufRead, BufReader, Write}; + use std::os::unix::net::UnixStream; + use std::time::Duration; + + let mut stream = UnixStream::connect("/run/ld-fdpi/helper.sock") + .map_err(|e| format!("Yardımcı servise bağlanılamadı: {e}"))?; + let _ = stream.set_read_timeout(Some(Duration::from_secs(20))); + let _ = stream.set_write_timeout(Some(Duration::from_secs(20))); + let request = serde_json::to_string(&payload).map_err(|e| e.to_string())?; + stream + .write_all(format!("{request}\n").as_bytes()) + .map_err(|e| format!("Yardımcıya yazılamadı: {e}"))?; + let mut response = String::new(); + BufReader::new(stream) + .read_line(&mut response) + .map_err(|e| format!("Yardımcı yanıtı okunamadı: {e}"))?; + let value: Value = serde_json::from_str(response.trim()) + .map_err(|e| format!("Yardımcı yanıtı geçersiz: {e}"))?; + if value.get("ok").and_then(Value::as_bool) != Some(true) { + return Err(value + .get("error") + .and_then(Value::as_str) + .unwrap_or("Yardımcı komutu reddetti.") + .to_string()); + } + let _ = action; + Ok(value) +} + +#[cfg(not(unix))] +pub fn call_with(_action: &str, _payload: serde_json::Value) -> Result { + Err("Bu yardımcı yalnızca Linux'ta çalışır.".to_string()) +} + +pub fn status() -> String { + call("status") + .map(|_| "ready".to_string()) + .unwrap_or_else(|_| "unavailable".to_string()) +} diff --git a/linuxFDPI/src-tauri/src/lib.rs b/linuxFDPI/src-tauri/src/lib.rs new file mode 100644 index 0000000..f21b0a3 --- /dev/null +++ b/linuxFDPI/src-tauri/src/lib.rs @@ -0,0 +1,204 @@ +mod config; +mod helper; +mod proxy; +mod spoofdpi; +mod update; + +use serde::Serialize; +use std::process::Child; +use std::sync::Mutex; +use tauri::{Manager, RunEvent, State}; + +struct AppState { + config: Mutex, + child: Mutex>, + proxy_active: Mutex, +} + +#[derive(Serialize)] +#[serde(rename_all = "camelCase")] +struct StateResponse { + connected: bool, + helper: String, + desktop: String, + spoofdpi_available: bool, + config: config::Config, + app_version: String, + last_error: Option, +} + +fn child_alive(child: &mut Option) -> bool { + match child.as_mut() { + Some(proc) => match proc.try_wait() { + Ok(Some(_)) => { + *child = None; + false + } + Ok(None) => true, + Err(_) => false, + }, + None => false, + } +} + +#[tauri::command] +fn get_state(state: State<'_, AppState>) -> StateResponse { + let connected = { + let mut child = state.child.lock().unwrap(); + child_alive(&mut child) + }; + let cfg = state.config.lock().unwrap().clone(); + StateResponse { + connected, + helper: helper::status(), + desktop: proxy::desktop_label(), + spoofdpi_available: spoofdpi::resolve(&cfg.spoofdpi_path).is_some(), + config: cfg, + app_version: env!("CARGO_PKG_VERSION").to_string(), + last_error: None, + } +} + +#[tauri::command] +fn save_config( + state: State<'_, AppState>, + config: config::Config, +) -> Result { + let mut cfg = config; + cfg.validate(); + let connected = state.child.lock().unwrap().is_some(); + if connected && cfg.proxy_port != state.config.lock().unwrap().proxy_port { + return Err("Proxy portunu değiştirmek için önce bağlantıyı kesin.".to_string()); + } + config::save(&cfg)?; + *state.config.lock().unwrap() = cfg.clone(); + Ok(cfg) +} + +#[tauri::command] +fn start_fdpi(state: State<'_, AppState>) -> Result<(), String> { + let cfg = state.config.lock().unwrap().clone(); + let mut child = state.child.lock().unwrap(); + if child_alive(&mut child) { + return Err("FDPI zaten bağlı.".to_string()); + } + let path = spoofdpi::resolve(&cfg.spoofdpi_path) + .ok_or("SpoofDPI bulunamadı. /usr/lib/ld-fdpi/spoofdpi veya spoofdpiPath gerekli.")?; + let proc = spoofdpi::start(&path, cfg.proxy_port)?; + config::append_log("app.log", &format!("spoofdpi started pid={}", proc.id())); + + if let Err(error) = proxy::apply(cfg.proxy_port) { + let mut proc = proc; + spoofdpi::stop(&mut proc); + return Err(error); + } + *state.proxy_active.lock().unwrap() = true; + + if cfg.quic_block { + // Phase 2 helper command is intentionally not implemented yet. Do not + // silently claim a QUIC guard; return the engine in a usable state. + let _ = helper::call("quic_on"); + } + *child = Some(proc); + Ok(()) +} + +#[tauri::command] +fn stop_fdpi(state: State<'_, AppState>) -> Result<(), String> { + let mut child = state.child.lock().unwrap(); + if let Some(mut proc) = child.take() { + spoofdpi::stop(&mut proc); + } + let _ = helper::call("quic_off"); + let active = *state.proxy_active.lock().unwrap(); + if active { + proxy::restore()?; + *state.proxy_active.lock().unwrap() = false; + } + Ok(()) +} + +#[tauri::command] +fn helper_status() -> String { + helper::status() +} + +#[tauri::command] +async fn check_linux_update() -> Result { + tauri::async_runtime::spawn_blocking(|| { + let info = update::check()?; + Ok(serde_json::json!({ + "version": info.version, + "url": info.url, + "notes": info.notes, + "available": update::is_newer(&info.version), + })) + }) + .await + .map_err(|e| format!("Güncelleme görevi çöktü: {e}"))? +} + +#[tauri::command] +fn open_data_folder() -> Result<(), String> { + let dir = config::data_dir(); + std::fs::create_dir_all(&dir).map_err(|e| e.to_string())?; + std::process::Command::new("xdg-open") + .arg(dir) + .spawn() + .map_err(|e| format!("Klasör açılamadı: {e}"))?; + Ok(()) +} + +fn cleanup(state: &AppState) { + if let Some(mut child) = state.child.lock().unwrap().take() { + spoofdpi::stop(&mut child); + } + let _ = helper::call("quic_off"); + if *state.proxy_active.lock().unwrap() { + let _ = proxy::restore(); + } +} + +pub fn run_test_proxy() -> Result<(), String> { + println!("PROXY_BACKEND={}", proxy::desktop_label()); + let backup = proxy::apply(18080)?; + println!("PROXY_APPLIED backend={} schema={}", backup.backend, backup.schema); + proxy::restore()?; + println!("PROXY_RESTORED"); + Ok(()) +} + +pub fn run() { + let cfg = config::load(); + // A previous crash may have left GNOME pointed at a dead loopback. + if proxy::has_backup() { + let _ = proxy::restore(); + } + let state = AppState { + config: Mutex::new(cfg), + child: Mutex::new(None), + proxy_active: Mutex::new(false), + }; + + let app = tauri::Builder::default() + .manage(state) + .invoke_handler(tauri::generate_handler![ + get_state, + save_config, + start_fdpi, + stop_fdpi, + helper_status, + check_linux_update, + open_data_folder + ]) + .build(tauri::generate_context!()) + .expect("LD FDPI Linux başlatılamadı"); + + app.run(|app_handle, event| { + if let RunEvent::Exit = event { + if let Some(state) = app_handle.try_state::() { + cleanup(&state); + } + } + }); +} diff --git a/linuxFDPI/src-tauri/src/main.rs b/linuxFDPI/src-tauri/src/main.rs new file mode 100644 index 0000000..0958231 --- /dev/null +++ b/linuxFDPI/src-tauri/src/main.rs @@ -0,0 +1,14 @@ +fn main() { + if std::env::var("LD_FDPI_TEST_CLI").as_deref() == Ok("1") + && std::env::args().any(|arg| arg == "--test-proxy") + { + match ld_fdpi_linux_lib::run_test_proxy() { + Ok(()) => std::process::exit(0), + Err(error) => { + eprintln!("TEST_PROXY_ERROR={error}"); + std::process::exit(1); + } + } + } + ld_fdpi_linux_lib::run(); +} diff --git a/linuxFDPI/src-tauri/src/proxy.rs b/linuxFDPI/src-tauri/src/proxy.rs new file mode 100644 index 0000000..e572a50 --- /dev/null +++ b/linuxFDPI/src-tauri/src/proxy.rs @@ -0,0 +1,387 @@ +use serde::{Deserialize, Serialize}; +use std::fs; +use std::path::PathBuf; +use std::process::Command; + +const MATE_PROXY: &str = "org.mate.system.proxy"; + +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(default)] +pub struct Backup { + pub backend: String, + pub schema: String, + pub mode: String, + pub http_host: String, + pub http_port: String, + pub https_host: String, + pub https_port: String, + pub kde_file: String, + pub kde_existed: bool, + pub env_existed: bool, + pub env_text: String, +} + +impl Default for Backup { + fn default() -> Self { + Self { + backend: String::new(), + schema: String::new(), + mode: String::new(), + http_host: String::new(), + http_port: String::new(), + https_host: String::new(), + https_port: String::new(), + kde_file: String::new(), + kde_existed: false, + env_existed: false, + env_text: String::new(), + } + } +} + +fn desktop() -> String { + std::env::var("XDG_CURRENT_DESKTOP") + .or_else(|_| std::env::var("DESKTOP_SESSION")) + .unwrap_or_default() + .to_lowercase() +} + +fn has_cmd(name: &str) -> bool { + Command::new("sh") + .args(["-c", &format!("command -v {}", name)]) + .output() + .map(|out| out.status.success()) + .unwrap_or(false) +} + +fn gsettings_schema(name: &str) -> bool { + if !has_cmd("gsettings") { + return false; + } + Command::new("gsettings") + .args(["list-schemas"]) + .output() + .map(|out| { + String::from_utf8_lossy(&out.stdout) + .lines() + .any(|line| line.trim() == name) + }) + .unwrap_or(false) +} + +fn is_kde_desktop() -> bool { + let d = desktop(); + d.contains("kde") || d.contains("plasma") + || std::env::var("KDE_FULL_SESSION").is_ok() + || std::env::var("KDE_SESSION_VERSION").is_ok() +} + +fn is_mate_desktop() -> bool { + desktop().contains("mate") +} + +fn is_gnome_family() -> bool { + let d = desktop(); + d.contains("gnome") + || d.contains("unity") + || d.contains("cinnamon") + || d.contains("budgie") + || d.contains("pantheon") + || d.contains("zorin") +} + +fn kde_tool() -> Option<&'static str> { + if has_cmd("kwriteconfig6") { + Some("kwriteconfig6") + } else if has_cmd("kwriteconfig5") { + Some("kwriteconfig5") + } else { + None + } +} + +fn kde_reload() { + for (tool, service) in [ + ("qdbus6", "org.kde.kded6"), + ("qdbus", "org.kde.kded5"), + ] { + if !has_cmd(tool) { + continue; + } + let _ = Command::new("timeout") + .args([ + "3", + tool, + service, + "/modules/proxy", + &format!("{service}.proxy.reparseConfiguration"), + ]) + .output(); + } +} + +fn kde_file() -> PathBuf { + dirs::config_dir() + .unwrap_or_else(|| PathBuf::from(".")) + .join("kioslaverc") +} + +fn env_file() -> PathBuf { + dirs::config_dir() + .unwrap_or_else(|| PathBuf::from(".")) + .join("environment.d") + .join("90-ld-fdpi.conf") +} + +pub fn backup_path() -> PathBuf { + super::config::data_dir().join("proxy-backup.json") +} + +fn get(schema: &str, key: &str) -> Result { + let out = Command::new("gsettings") + .args(["get", schema, key]) + .output() + .map_err(|e| format!("gsettings çalıştırılamadı: {e}"))?; + if !out.status.success() { + return Err(String::from_utf8_lossy(&out.stderr).trim().to_string()); + } + Ok(String::from_utf8_lossy(&out.stdout).trim().to_string()) +} + +fn set(schema: &str, key: &str, value: &str) -> Result<(), String> { + let status = Command::new("gsettings") + .args(["set", schema, key, value]) + .status() + .map_err(|e| format!("gsettings çalıştırılamadı: {e}"))?; + if status.success() { + Ok(()) + } else { + Err(format!("gsettings {schema} {key} ayarlanamadı")) + } +} + +fn unquote(value: &str) -> String { + value.trim().trim_matches('\'').trim_matches('"').to_string() +} + +fn write_backup(backup: &Backup) -> Result<(), String> { + let path = backup_path(); + if let Some(parent) = path.parent() { + fs::create_dir_all(parent).map_err(|e| e.to_string())?; + } + fs::write( + &path, + serde_json::to_string_pretty(backup).map_err(|e| e.to_string())?, + ) + .map_err(|e| format!("Proxy yedeği yazılamadı: {e}"))?; + #[cfg(unix)] + { + use std::os::unix::fs::PermissionsExt; + let _ = fs::set_permissions(&path, fs::Permissions::from_mode(0o600)); + } + Ok(()) +} + +fn apply_gsettings(schema: &str, port: u16, backend: &str) -> Result { + let backup = Backup { + backend: backend.to_string(), + schema: schema.to_string(), + mode: unquote(&get(&format!("{schema}"), "mode")?), + http_host: unquote(&get(&format!("{schema}.http"), "host")?), + http_port: get(&format!("{schema}.http"), "port")?, + https_host: unquote(&get(&format!("{schema}.https"), "host")?), + https_port: get(&format!("{schema}.https"), "port")?, + ..Backup::default() + }; + write_backup(&backup)?; + let result = (|| -> Result<(), String> { + set(schema, "mode", "manual")?; + set(&format!("{schema}.http"), "host", "127.0.0.1")?; + set(&format!("{schema}.http"), "port", &port.to_string())?; + set(&format!("{schema}.https"), "host", "127.0.0.1")?; + set(&format!("{schema}.https"), "port", &port.to_string())?; + Ok(()) + })(); + if let Err(error) = result { + let _ = restore_gsettings(&backup); + return Err(error); + } + Ok(backup) +} + +fn restore_gsettings(backup: &Backup) -> Result<(), String> { + let schema = if backup.schema.is_empty() { + if backup.backend == "mate" { + MATE_PROXY + } else { + "org.gnome.system.proxy" + } + } else { + backup.schema.as_str() + }; + set(schema, "mode", &format!("'{}'", backup.mode))?; + set(&format!("{schema}.http"), "host", &format!("'{}'", backup.http_host))?; + set(&format!("{schema}.http"), "port", &backup.http_port)?; + set( + &format!("{schema}.https"), + "host", + &format!("'{}'", backup.https_host), + )?; + set(&format!("{schema}.https"), "port", &backup.https_port)?; + Ok(()) +} + +fn apply_kde(port: u16) -> Result { + let tool = kde_tool().ok_or("KDE proxy aracı bulunamadı (kwriteconfig5/6).")?; + let path = kde_file(); + let raw = fs::read_to_string(&path).ok(); + let mut backup = Backup { + backend: "kde".to_string(), + kde_file: path.to_string_lossy().to_string(), + kde_existed: raw.is_some(), + ..Backup::default() + }; + if let Some(text) = raw { + backup.env_text = text; + } + write_backup(&backup)?; + + let proxy = format!("http://127.0.0.1:{port}"); + let set_key = |key: &str, value: &str| -> Result<(), String> { + let out = Command::new("timeout") + .args([ + "5", + tool, + "--file", + "kioslaverc", + "--group", + "Proxy Settings", + "--key", + key, + value, + ]) + .output() + .map_err(|e| format!("{tool} çalıştırılamadı: {e}"))?; + if out.status.success() { + Ok(()) + } else { + Err(format!( + "KDE proxy ayarı yazılamadı: {}", + String::from_utf8_lossy(&out.stderr).trim() + )) + } + }; + set_key("ProxyType", "1")?; + set_key("httpProxy", &proxy)?; + set_key("httpsProxy", &proxy)?; + set_key("ftpProxy", &proxy)?; + set_key("NoProxyFor", "localhost,127.0.0.1,::1")?; + kde_reload(); + Ok(backup) +} + +fn restore_kde(backup: &Backup) -> Result<(), String> { + let path = if backup.kde_file.is_empty() { + kde_file() + } else { + PathBuf::from(&backup.kde_file) + }; + if backup.kde_existed { + if let Some(parent) = path.parent() { + fs::create_dir_all(parent).map_err(|e| e.to_string())?; + } + fs::write(&path, &backup.env_text).map_err(|e| e.to_string())?; + } else { + let _ = fs::remove_file(&path); + } + kde_reload(); + Ok(()) +} + +fn apply_env(port: u16) -> Result { + let path = env_file(); + let raw = fs::read_to_string(&path).ok(); + let backup = Backup { + backend: "environment".to_string(), + env_existed: raw.is_some(), + env_text: raw.unwrap_or_default(), + ..Backup::default() + }; + write_backup(&backup)?; + if let Some(parent) = path.parent() { + fs::create_dir_all(parent).map_err(|e| e.to_string())?; + } + let proxy = format!("http://127.0.0.1:{port}"); + let body = format!( + "http_proxy={proxy}\nhttps_proxy={proxy}\nHTTP_PROXY={proxy}\nHTTPS_PROXY={proxy}\nno_proxy=localhost,127.0.0.1,::1\nNO_PROXY=localhost,127.0.0.1,::1\n" + ); + fs::write(&path, body).map_err(|e| format!("Proxy ortam dosyası yazılamadı: {e}"))?; + if has_cmd("systemctl") { + let _ = Command::new("systemctl") + .args(["--user", "set-environment", "http_proxy", &proxy]) + .output(); + } + Ok(backup) +} + +fn restore_env(backup: &Backup) -> Result<(), String> { + let path = env_file(); + if backup.env_existed { + fs::write(&path, &backup.env_text).map_err(|e| e.to_string())?; + } else { + let _ = fs::remove_file(&path); + } + Ok(()) +} + +pub fn apply(port: u16) -> Result { + if is_kde_desktop() && kde_tool().is_some() { + return apply_kde(port); + } + if is_gnome_family() && gsettings_schema("org.gnome.system.proxy") { + return apply_gsettings("org.gnome.system.proxy", port, "gnome"); + } + if is_mate_desktop() && gsettings_schema(MATE_PROXY) { + return apply_gsettings(MATE_PROXY, port, "mate"); + } + apply_env(port) +} + +pub fn restore() -> Result<(), String> { + let path = backup_path(); + let raw = match fs::read_to_string(&path) { + Ok(raw) => raw, + Err(_) => return Ok(()), + }; + let backup: Backup = + serde_json::from_str(&raw).map_err(|e| format!("Proxy yedeği geçersiz: {e}"))?; + match backup.backend.as_str() { + "kde" => restore_kde(&backup)?, + "environment" => restore_env(&backup)?, + _ => restore_gsettings(&backup)?, + } + let _ = fs::remove_file(path); + Ok(()) +} + +pub fn has_backup() -> bool { + backup_path().exists() +} + +pub fn desktop_label() -> String { + if is_kde_desktop() && kde_tool().is_some() { + return "kde".to_string(); + } + if is_gnome_family() && gsettings_schema("org.gnome.system.proxy") { + return "gnome".to_string(); + } + if is_mate_desktop() && gsettings_schema(MATE_PROXY) { + return "mate".to_string(); + } + let raw = desktop(); + if raw.is_empty() { + "environment".to_string() + } else { + format!("{raw} (env)") + } +} diff --git a/linuxFDPI/src-tauri/src/spoofdpi.rs b/linuxFDPI/src-tauri/src/spoofdpi.rs new file mode 100644 index 0000000..8724d3b --- /dev/null +++ b/linuxFDPI/src-tauri/src/spoofdpi.rs @@ -0,0 +1,90 @@ +use std::fs::OpenOptions; +use std::net::{SocketAddr, TcpStream}; +use std::path::{Path, PathBuf}; +use std::process::{Child, Command, Stdio}; +use std::time::{Duration, Instant}; + +pub fn resolve(config_path: &str) -> Option { + if !config_path.trim().is_empty() { + let path = PathBuf::from(config_path); + if path.is_file() { + return Some(path); + } + } + let installed = PathBuf::from("/usr/lib/ld-fdpi/spoofdpi"); + if installed.is_file() { + return Some(installed); + } + let path = std::env::var_os("PATH")?; + for dir in std::env::split_paths(&path) { + let candidate = dir.join("spoofdpi"); + if candidate.is_file() { + return Some(candidate); + } + } + None +} + +pub fn port_free(port: u16) -> bool { + TcpStream::connect_timeout( + &SocketAddr::from(([127, 0, 0, 1], port)), + Duration::from_millis(250), + ) + .is_err() +} + +fn log_file(name: &str) -> std::io::Result { + let dir = super::config::ensure_log_dir().map_err(std::io::Error::other)?; + let path = dir.join(name); + super::config::rotate_log(&path, 5 * 1024 * 1024); + OpenOptions::new().create(true).append(true).open(path) +} + +pub fn start(path: &Path, port: u16) -> Result { + if !port_free(port) { + return Err(format!("{port} portu zaten kullanımda.")); + } + let stdout = log_file("spoofdpi.log").map_err(|e| format!("Log açılamadı: {e}"))?; + let stderr = stdout + .try_clone() + .map_err(|e| format!("Log çoğaltılamadı: {e}"))?; + let port_arg = port.to_string(); + let listen_arg = format!("127.0.0.1:{port_arg}"); + let child = Command::new(path) + .args([ + "--app-mode", + "http", + "--listen-addr", + &listen_arg, + "--dns-mode", + "https", + "--dns-https-url", + "https://cloudflare-dns.com/dns-query", + "--no-tui", + ]) + .stdin(Stdio::null()) + .stdout(Stdio::from(stdout)) + .stderr(Stdio::from(stderr)) + .spawn() + .map_err(|e| format!("SpoofDPI başlatılamadı: {e}"))?; + let deadline = Instant::now() + Duration::from_secs(5); + while Instant::now() < deadline { + if TcpStream::connect_timeout( + &SocketAddr::from(([127, 0, 0, 1], port)), + Duration::from_millis(200), + ) + .is_ok() + { + return Ok(child); + } + std::thread::sleep(Duration::from_millis(150)); + } + let mut child = child; + let _ = child.kill(); + Err(format!("SpoofDPI {port} portunu 5 saniyede dinlemedi.")) +} + +pub fn stop(child: &mut Child) { + let _ = child.kill(); + let _ = child.wait(); +} diff --git a/linuxFDPI/src-tauri/src/update.rs b/linuxFDPI/src-tauri/src/update.rs new file mode 100644 index 0000000..1e048f3 --- /dev/null +++ b/linuxFDPI/src-tauri/src/update.rs @@ -0,0 +1,54 @@ +use serde::{Deserialize, Serialize}; + +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct UpdateInfo { + pub version: String, + pub url: String, + #[serde(default)] + pub notes: String, +} + +pub fn check() -> Result { + use native_tls::TlsConnector; + use std::io::{Read, Write}; + use std::net::{TcpStream, ToSocketAddrs}; + + let host = "ttmadethat.shop"; + let path = "/linux-ld-fdpi/latest.json"; + let address = (host, 443) + .to_socket_addrs() + .map_err(|e| format!("Update DNS: {e}"))? + .next() + .ok_or("Update DNS boş.")?; + let stream = TcpStream::connect_timeout(&address, std::time::Duration::from_secs(8)) + .map_err(|e| format!("Update bağlantısı: {e}"))?; + let _ = stream.set_read_timeout(Some(std::time::Duration::from_secs(10))); + let mut tls = TlsConnector::new() + .map_err(|e| e.to_string())? + .connect(host, stream) + .map_err(|e| format!("Update TLS: {e}"))?; + let request = format!( + "GET {path} HTTP/1.0\r\nHost: {host}\r\nUser-Agent: LD-FDPI-Linux/{}\r\nConnection: close\r\n\r\n", + env!("CARGO_PKG_VERSION") + ); + tls.write_all(request.as_bytes()).map_err(|e| e.to_string())?; + let mut raw = Vec::new(); + let _ = tls.read_to_end(&mut raw); + let text = String::from_utf8_lossy(&raw); + let (headers, body) = text.split_once("\r\n\r\n").unwrap_or((&text, "")); + if !headers.lines().next().unwrap_or("").contains(" 200 ") { + return Err("Güncelleme sunucusu yanıt vermedi.".to_string()); + } + serde_json::from_str(body.trim()).map_err(|e| format!("Update JSON geçersiz: {e}")) +} + +pub fn is_newer(remote: &str) -> bool { + fn parts(v: &str) -> Vec { + v.split(|c: char| !c.is_ascii_digit()) + .filter(|s| !s.is_empty()) + .take(4) + .filter_map(|s| s.parse().ok()) + .collect() + } + parts(remote) > parts(env!("CARGO_PKG_VERSION")) +} diff --git a/linuxFDPI/src-tauri/tauri.conf.json b/linuxFDPI/src-tauri/tauri.conf.json new file mode 100644 index 0000000..ee78dcf --- /dev/null +++ b/linuxFDPI/src-tauri/tauri.conf.json @@ -0,0 +1,39 @@ +{ + "$schema": "https://schema.tauri.app/config/2", + "productName": "LD FDPI Linux", + "version": "1.0.0", + "identifier": "shop.ttmadethat.ldfdpi.linux", + "build": { + "beforeDevCommand": "npm run dev", + "devUrl": "http://localhost:1420", + "beforeBuildCommand": "npm run build", + "frontendDist": "../dist" + }, + "app": { + "windows": [ + { + "label": "main", + "title": "LD FDPI Linux", + "width": 980, + "height": 720, + "minWidth": 760, + "minHeight": 560 + } + ], + "security": { + "csp": "default-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' asset: data:" + } + }, + "bundle": { + "active": true, + "targets": ["deb", "appimage"], + "icon": [ + "icons/32x32.png", + "icons/128x128.png", + "icons/icon.png" + ], + "category": "Utility", + "shortDescription": "Linux DPI bypass and zero-touch VPN client", + "longDescription": "LD FDPI Linux port. Phase 1 FDPI MVP; VPN and kill-switch land in later phases." + } +} diff --git a/linuxFDPI/src/App.jsx b/linuxFDPI/src/App.jsx new file mode 100644 index 0000000..fa44c7f --- /dev/null +++ b/linuxFDPI/src/App.jsx @@ -0,0 +1,312 @@ +import { useCallback, useEffect, useMemo, useState } from "react"; +import { invoke } from "@tauri-apps/api/core"; +import { + AlertTriangle, + CheckCircle2, + FolderOpen, + Loader2, + Play, + Power, + RefreshCw, + Settings, + Square, +} from "lucide-react"; + +const EMPTY = { + connected: false, + helper: "unknown", + desktop: "unknown", + spoofdpiAvailable: false, + config: { + proxyPort: 18080, + quicBlock: false, + spoofdpiPath: "", + autoStart: false, + }, + appVersion: "1.0.0", + lastError: null, +}; + +async function call(command, args) { + if (!window.__TAURI_INTERNALS__) { + throw new Error("Tauri çalışma zamanı bulunamadı."); + } + return invoke(command, args); +} + +export default function App() { + const [state, setState] = useState(EMPTY); + const [updateInfo, setUpdateInfo] = useState(null); + const [busy, setBusy] = useState(""); + const [error, setError] = useState(null); + const [draft, setDraft] = useState(EMPTY.config); + const [notice, setNotice] = useState(null); + + const refresh = useCallback(async () => { + try { + const next = await call("get_state"); + setState(next); + setDraft(next.config); + setError(null); + } catch (e) { + setError(String(e)); + } + }, []); + + useEffect(() => { + refresh(); + const timer = window.setInterval(refresh, 4000); + return () => window.clearInterval(timer); + }, [refresh]); + + const connected = Boolean(state.connected); + const helperOk = state.helper === "ready"; + const canStart = state.spoofdpiAvailable && !connected && busy !== "start"; + + const handleUpdate = async () => { + setBusy("update"); + setError(null); + try { + const info = await call("check_linux_update"); + setUpdateInfo(info); + setNotice(info.available ? `Yeni sürüm: ${info.version}` : "Güncel sürümdesiniz."); + } catch (e) { + setError(String(e)); + } finally { + setBusy(""); + } + }; + + const handleConnect = async () => { + setBusy(connected ? "stop" : "start"); + setError(null); + setNotice(null); + try { + await call(connected ? "stop_fdpi" : "start_fdpi"); + setNotice(connected ? "FDPI durduruldu." : "FDPI başlatıldı."); + await refresh(); + } catch (e) { + setError(String(e)); + await refresh(); + } finally { + setBusy(""); + } + }; + + const handleSave = async () => { + setBusy("save"); + setError(null); + try { + const next = await call("save_config", { config: draft }); + setState((prev) => ({ ...prev, config: next })); + setDraft(next); + setNotice("Ayarlar kaydedildi."); + } catch (e) { + setError(String(e)); + } finally { + setBusy(""); + } + }; + + const openFolder = async () => { + try { + await call("open_data_folder"); + } catch (e) { + setError(String(e)); + } + }; + + const status = useMemo(() => { + if (connected) return { label: "FDPI bağlı", tone: "ok" }; + if (busy === "start") return { label: "Başlatılıyor", tone: "warn" }; + return { label: "Bağlı değil", tone: "idle" }; + }, [connected, busy]); + + return ( +
+
+
+
LD
+
+ LD FDPI Linux + Phase 1 · FDPI MVP +
+
+
+ v{state.appVersion} + {status.label} +
+
+ +
+ {error && ( +
+ + {error} + +
+ )} + {notice && ( +
+ + {notice} + +
+ )} + +
+
+
WINDOWS PARITY · PHASE 1
+

DPI engelini
Linux'ta aş.

+

+ SpoofDPI tabanlı yerel proxy. Sistem proxy'si GNOME üzerinden + uygulanır ve QUIC uyumluluğu systemd helper tarafından yönetilir. +

+
+
+
+
+ {connected ? "Koruma aktif" : "Hazır"} + {connected ? `127.0.0.1:${state.config.proxyPort}` : "Bağlantı bekleniyor"} +
+
+
+ +
+
+
+
FDPI
+

SpoofDPI yerel proxy

+
+ + helper: {state.helper} + +
+ +
+
Desktop{state.desktop}
+
SpoofDPI{state.spoofdpiAvailable ? "bulundu" : "yok"}
+
Proxy portu{state.config.proxyPort}
+
Helper{state.helper}
+
+ + + + {!state.spoofdpiAvailable && ( +

+ SpoofDPI bulunamadı. /usr/lib/ld-fdpi/spoofdpi yolu + veya Ayarlar'daki spoofdpiPath gerekli. +

+ )} + {state.desktop !== "gnome" && ( +

+ Bu MVP yalnızca GNOME sistem proxy'sini destekler. KDE Faz 2'de. +

+ )} +
+ + +
+
+
+
Ayarlar
+

Bağlantı tercihleri

+
+ +
+ +
+ + + + +
+ +
+ + + +
+ {updateInfo && ( +

+ Sürüm: {updateInfo.version} ·{" "} + {updateInfo.available ? ( + + güncellemeyi indir + + ) : ( + "güncel" + )} + {updateInfo.notes ? ` · ${updateInfo.notes}` : ""} +

+ )} +
+ +
+ LD FDPI Linux · Phase 0/1 + Windows v1.7.3 hattı etkilenmez +
+
+
+ ); +} diff --git a/linuxFDPI/src/main.jsx b/linuxFDPI/src/main.jsx new file mode 100644 index 0000000..cfb7186 --- /dev/null +++ b/linuxFDPI/src/main.jsx @@ -0,0 +1,10 @@ +import React from "react"; +import { createRoot } from "react-dom/client"; +import App from "./App"; +import "./styles.css"; + +createRoot(document.getElementById("root")).render( + + + +); diff --git a/linuxFDPI/src/styles.css b/linuxFDPI/src/styles.css new file mode 100644 index 0000000..a3672cb --- /dev/null +++ b/linuxFDPI/src/styles.css @@ -0,0 +1,88 @@ +:root { + color-scheme: dark; + font-family: "Inter", "Segoe UI", system-ui, sans-serif; + background: #05080b; + color: #e8f3f7; +} + +* { box-sizing: border-box; } +body { margin: 0; min-width: 720px; background: + radial-gradient(900px 520px at 82% -8%, rgba(143,227,245,.14), transparent 62%), + radial-gradient(800px 500px at 4% 18%, rgba(141,255,173,.08), transparent 58%), + #05080b; } +button, input { font: inherit; } +button { cursor: pointer; } +button:disabled { cursor: not-allowed; opacity: .5; } +code { font-family: ui-monospace, "Cascadia Code", monospace; } + +.app { min-height: 100vh; display: flex; flex-direction: column; } +.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 22px; border-bottom: 1px solid rgba(126,190,211,.16); background: rgba(7,13,18,.75); backdrop-filter: blur(18px); } +.brand { display: flex; align-items: center; gap: 11px; } +.logo { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-weight: 900; font-size: 13px; color: #061015; background: linear-gradient(140deg, #8fe3f5, #8dffad); box-shadow: 0 0 26px rgba(143,227,245,.25); } +.brand strong { display: block; font-size: 14px; letter-spacing: -.02em; } +.brand small { display: block; margin-top: 2px; color: #91aab7; font-size: 10px; letter-spacing: .09em; text-transform: uppercase; } +.top-actions { display: flex; align-items: center; gap: 8px; } +.version { font-family: ui-monospace, monospace; font-size: 10px; color: #91aab7; border: 1px solid rgba(126,190,211,.16); border-radius: 7px; padding: 5px 8px; } +.pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 5px 10px; font-size: 10px; font-weight: 700; border: 1px solid; } +.pill.ok { color: #8dffad; border-color: rgba(141,255,173,.3); background: rgba(141,255,173,.08); } +.pill.warn { color: #ffd27a; border-color: rgba(255,210,122,.3); background: rgba(255,210,122,.08); } +.pill.idle { color: #91aab7; border-color: rgba(126,190,211,.2); background: rgba(126,190,211,.05); } + +.content { width: min(1080px, calc(100% - 40px)); margin: 0 auto; padding: 22px 0 40px; display: flex; flex-direction: column; gap: 14px; } +.hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; padding: 12px 2px 4px; } +.eyebrow { color: #8fe3f5; font-family: ui-monospace, monospace; font-size: 9px; letter-spacing: .17em; margin-bottom: 10px; } +h1 { margin: 0; font-size: clamp(38px, 5vw, 60px); line-height: 1.02; letter-spacing: -.055em; } +h1 span { background: linear-gradient(100deg, #f0fbff 10%, #8fe3f5 58%, #8dffad); -webkit-background-clip: text; background-clip: text; color: transparent; } +.hero p { max-width: 570px; color: #91aab7; font-size: 12px; line-height: 1.65; margin: 14px 0 0; } +.pulse-card { min-width: 240px; display: flex; align-items: center; gap: 12px; border: 1px solid rgba(126,190,211,.18); border-radius: 16px; padding: 14px; background: rgba(8,15,20,.78); } +.pulse-card.is-on { border-color: rgba(141,255,173,.35); box-shadow: 0 0 28px rgba(141,255,173,.08); } +.pulse-orb { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; color: #8fe3f5; background: rgba(143,227,245,.08); border: 1px solid rgba(143,227,245,.25); } +.is-on .pulse-orb { color: #8dffad; background: rgba(141,255,173,.08); border-color: rgba(141,255,173,.3); } +.pulse-card strong { display: block; font-size: 12px; } +.pulse-card small { display: block; color: #91aab7; font-size: 10px; margin-top: 3px; } + +.card { border: 1px solid rgba(126,190,211,.16); border-radius: 16px; padding: 18px; background: rgba(8,15,20,.72); } +.connect-card { padding: 20px; } +.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; } +.card-head h2 { margin: 4px 0 0; font-size: 17px; letter-spacing: -.03em; } +.kicker { color: #8fe3f5; font-family: ui-monospace, monospace; font-size: 9px; letter-spacing: .16em; text-transform: uppercase; } +.muted, .hint { color: #91aab7; font-size: 11px; line-height: 1.6; } +.hint { margin: 10px 0 0; } +.warn-text { color: #ffd27a; } +.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 16px 0; } +.facts div { padding: 10px; border-radius: 10px; background: rgba(5,11,15,.6); border: 1px solid rgba(126,190,211,.1); } +.facts span { display: block; color: #91aab7; font-size: 9px; text-transform: uppercase; letter-spacing: .08em; } +.facts b { display: block; margin-top: 4px; color: #d9edf4; font-size: 11px; font-weight: 600; } +.primary, .secondary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 11px; padding: 10px 16px; font-size: 12px; font-weight: 700; } +.primary { width: 100%; border: 1px solid rgba(143,227,245,.45); color: #061015; background: linear-gradient(100deg, #8fe3f5, #8dffad); } +.primary.danger { color: #ffd7dd; background: rgba(255,143,159,.12); border-color: rgba(255,143,159,.45); } +.secondary { border: 1px solid rgba(126,190,211,.18); color: #c9dde5; background: rgba(126,190,211,.06); width: 100%; margin-top: 12px; } +.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; } +.form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 15px; } +.form label { display: flex; flex-direction: column; gap: 5px; color: #c9dde5; font-size: 11px; } +.form label small { color: #91aab7; font-size: 9px; display: block; margin-top: 3px; } +.form input[type="number"], .form input:not([type]) { width: 100%; border: 1px solid rgba(126,190,211,.18); border-radius: 9px; background: #050b0f; color: #e8f3f7; padding: 9px 10px; outline: none; } +.form input:focus { border-color: rgba(143,227,245,.5); } +.switch-row { flex-direction: row !important; align-items: center; justify-content: space-between; gap: 14px !important; border-top: 1px solid rgba(126,190,211,.1); padding-top: 10px; } +.switch-row input { width: 16px; height: 16px; accent-color: #8fe3f5; } +.actions { display: flex; gap: 8px; margin-top: 14px; } +.actions .primary { width: auto; } +.actions .secondary { width: auto; margin: 0; } +.alert { display: flex; align-items: center; gap: 8px; border-radius: 11px; padding: 10px 12px; font-size: 11px; border: 1px solid; } +.alert.error { color: #ffd7dd; border-color: rgba(255,143,159,.3); background: rgba(255,143,159,.08); } +.alert.ok { color: #b9ffd0; border-color: rgba(141,255,173,.3); background: rgba(141,255,173,.08); } +.alert button { margin-left: auto; border: 0; background: transparent; color: inherit; font-size: 16px; line-height: 1; } +.spin { animation: spin 1s linear infinite; } +@keyframes spin { to { transform: rotate(360deg); } } +footer { display: flex; justify-content: space-between; gap: 10px; padding: 12px 2px 0; color: #6f8997; font-size: 10px; } +@media (max-width: 800px) { + .hero { flex-direction: column; align-items: flex-start; } + .grid, .form { grid-template-columns: 1fr; } + .facts { grid-template-columns: 1fr 1fr; } +} + +.secondary.danger { color: #ffd7dd; background: rgba(255,143,159,.10); border-color: rgba(255,143,159,.40); } +.mini-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; } +.mini-facts > div { border: 1px solid rgba(126,190,211,.14); border-radius: 9px; padding: 8px 10px; background: rgba(5,12,17,.4); min-width: 0; } +.mini-facts span { display: block; font-size: 9px; letter-spacing: .12em; text-transform: uppercase; color: #7893a0; } +.mini-facts b { display: block; margin-top: 3px; font-size: 12px; font-weight: 700; overflow-wrap: anywhere; } \ No newline at end of file diff --git a/linuxFDPI/vite.config.js b/linuxFDPI/vite.config.js new file mode 100644 index 0000000..e5ee07c --- /dev/null +++ b/linuxFDPI/vite.config.js @@ -0,0 +1,12 @@ +import { defineConfig } from "vite"; +import react from "@vitejs/plugin-react"; + +export default defineConfig({ + plugins: [react()], + clearScreen: false, + server: { + port: 1420, + strictPort: true, + watch: { ignored: ["**/src-tauri/**"] }, + }, +}); diff --git a/mobile-app/.gitignore b/mobile-app/.gitignore deleted file mode 100644 index a022160..0000000 --- a/mobile-app/.gitignore +++ /dev/null @@ -1,30 +0,0 @@ -# Flutter/Dart -.dart_tool/ -.packages -.pub-cache/ -.pub/ -build/ -.flutter-plugins -.flutter-plugins-dependencies - -# Android -android/.gradle/ -android/local.properties -android/app/debug/ -android/app/profile/ -android/app/release/ -android/key.properties -*.jks -*.keystore - -# IDE -.idea/ -.vscode/ -*.iml - -# OS -.DS_Store -Thumbs.db - -# Native build cache -android/app/.cxx/ diff --git a/mobile-app/BUILD.md b/mobile-app/BUILD.md deleted file mode 100644 index d43cb18..0000000 --- a/mobile-app/BUILD.md +++ /dev/null @@ -1,87 +0,0 @@ -# Build - -## Prerequisites - -- Flutter 3.29+ (Dart 3.4+) -- Android SDK Platform 35 -- Android Build Tools 35.0.0 -- JDK 17 or 21 -- Windows: `JAVA_HOME` set to the JDK - -## SDK setup (Windows, no Android Studio) - -```powershell -# 1. Flutter -Expand-Archive C:\src\flutter.zip C:\src -$env:Path = "C:\src\flutter\bin;$env:Path" -flutter --version - -# 2. Android command-line tools -Expand-Archive C:\Android\cmdline-tools.zip C:\Android\cmdline-tools -# move so sdkmanager is at C:\Android\cmdline-tools\latest\bin -$env:ANDROID_HOME = "C:\Android\Sdk" -$env:Path = "C:\Android\cmdline-tools\latest\bin;$env:Path" - -sdkmanager --sdk_root=$env:ANDROID_HOME "platform-tools" "platforms;android-35" "build-tools;35.0.0" -sdkmanager --sdk_root=$env:ANDROID_HOME --licenses -flutter config --android-sdk $env:ANDROID_HOME -flutter doctor -``` - -## Project config - -Create `mobile-app/android/local.properties`: - -```properties -sdk.dir=C:\\Android\\Sdk -flutter.sdk=C:\\src\\flutter -``` - -## Build APK - -```powershell -cd mobile-app -flutter pub get -flutter build apk --release -``` - -Output: - -```text -mobile-app/build/app/outputs/flutter-apk/app-release.apk -``` - -## Signing - -The scaffold uses the debug signing config for `release` so it can be installed -for testing. Create a real keystore before distribution: - -```powershell -keytool -genkeypair -v -keystore ld-fdpi-mobile.jks -keyalg RSA -keysize 2048 -validity 10000 -alias ld-fdpi -``` - -Then replace `signingConfig = signingConfigs.debug` in -`android/app/build.gradle` with a `signingConfigs.release` block and store -credentials outside the repository. - -## Install - -```powershell -adb install -r mobile-app\build\app\outputs\flutter-apk\app-release.apk -``` - -## Important limitation - -The generated APK **will not establish a tunnel** until -`android/app/src/main/jniLibs//libawg.so` exists. See -`docs/TUNNEL_BACKEND.md`. The app intentionally refuses to connect instead of -shipping a fake WireGuard fallback that the AmneziaWG server would reject. - -## Tests before distribution - -1. Clean install on Android 10 and Android 14. -2. Activation code → enrollment succeeds. -3. Connect → TUN + handshake. -4. Kill the native process/service → traffic must not leak. -5. Enable Always-on + Block without VPN in Android settings; reboot. -6. Disconnect → internet returns; DNS/egress IP test. diff --git a/mobile-app/README.md b/mobile-app/README.md deleted file mode 100644 index ee12223..0000000 --- a/mobile-app/README.md +++ /dev/null @@ -1,77 +0,0 @@ -# Mobile app - -LD FDPI Android client scaffold. - -## What is implemented - -- Flutter dark UI: connection state, assigned IP, endpoint, ping, activation code. -- X25519 key generation in Dart (`cryptography`). -- Private key and enrollment config in **Android EncryptedSharedPreferences** - via `flutter_secure_storage`. -- One-time device enrollment against `https://ttmadethat.shop/api/v1/enroll`. -- Android `VpnService` shell with: - - TUN establishment, all-IPv4/IPv6 routes, DNS 1.1.1.1/1.0.0.1. - - Foreground notification. - - `BIND_VPN_SERVICE` manifest permission. - - Native `libawg.so` JNI boundary (`NativeTunnel`). -- Settings screen with Android VPN settings deep link for Always-on/Block without VPN. - -## What is not bundled - -`android/app/src/main/jniLibs/*/libawg.so` is **not** included. The stock -WireGuard Android backend does not implement AmneziaWG obfuscation -(`Jc/Jmin/Jmax/S1-S4/H1-H4/HeaderProtectionKey`). Without that native core the -APK installs and the UI runs, but **Connect reports “AmneziaWG çekirdeği yok”** -and does not open a TUN. This is deliberate: a fake tunnel that silently leaks -or blocks all traffic is worse. - -See `docs/TUNNEL_BACKEND.md` for the required JNI contract and build steps. - -## Build - -```bash -cd mobile-app -flutter pub get -flutter build apk --release -``` - -APK output: - -```text -build/app/outputs/flutter-apk/app-release.apk -``` - -The project expects: - -- Flutter 3.29+ / Dart 3.4+ -- Android SDK platform 35, build-tools 35.0.0 -- JDK 17+ (tested with JDK 21) -- `android/local.properties`: - -```properties -sdk.dir=C:\\Users\\\\AppData\\Local\\Android\\Sdk -flutter.sdk=C:\\src\\flutter -``` - -If the Gradle wrapper jar is missing: - -```bash -cd android -gradle wrapper --gradle-version 8.10.2 -``` - -## Install / test - -```bash -adb install -r build/app/outputs/flutter-apk/app-release.apk -adb shell am start -n com.ldfdpi.mobile/.MainActivity -``` - -Then: - -1. Enter the one-time activation code. -2. Allow Android VPN consent. -3. For kill-switch, open **Settings → VPN ayarlarını aç** and enable - **Always-on VPN** + **Block connections without VPN** for LD FDPI. -4. With `libawg.so` present, Connect starts the tunnel; without it, Connect is - rejected rather than leaking traffic. diff --git a/mobile-app/analysis_options.yaml b/mobile-app/analysis_options.yaml deleted file mode 100644 index 8d81c20..0000000 --- a/mobile-app/analysis_options.yaml +++ /dev/null @@ -1,5 +0,0 @@ -include: package:flutter_lints/flutter.yaml - -linter: - rules: - avoid_print: false diff --git a/mobile-app/android/app/build.gradle b/mobile-app/android/app/build.gradle deleted file mode 100644 index ecbcfeb..0000000 --- a/mobile-app/android/app/build.gradle +++ /dev/null @@ -1,50 +0,0 @@ -plugins { - id "com.android.application" - id "kotlin-android" - id "dev.flutter.flutter-gradle-plugin" -} - -android { - namespace = "com.ldfdpi.mobile" - compileSdk = 35 - - compileOptions { - sourceCompatibility = JavaVersion.VERSION_17 - targetCompatibility = JavaVersion.VERSION_17 - } - - kotlinOptions { - jvmTarget = "17" - } - - defaultConfig { - applicationId = "com.ldfdpi.mobile" - minSdk = 26 - targetSdk = 35 - versionCode = 1 - versionName = "0.1.0" - } - - buildTypes { - release { - // Replace with a real keystore before Play/APK distribution. - signingConfig = signingConfigs.debug - minifyEnabled = false - shrinkResources = false - } - } - - packaging { - jniLibs { - useLegacyPackaging = true - } - } -} - -flutter { - source = "../.." -} - -dependencies { - implementation "androidx.core:core-ktx:1.13.1" -} diff --git a/mobile-app/android/app/src/main/AndroidManifest.xml b/mobile-app/android/app/src/main/AndroidManifest.xml deleted file mode 100644 index 8d721b5..0000000 --- a/mobile-app/android/app/src/main/AndroidManifest.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/mobile-app/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java b/mobile-app/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java deleted file mode 100644 index 9d756ee..0000000 --- a/mobile-app/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java +++ /dev/null @@ -1,29 +0,0 @@ -package io.flutter.plugins; - -import androidx.annotation.Keep; -import androidx.annotation.NonNull; -import io.flutter.Log; - -import io.flutter.embedding.engine.FlutterEngine; - -/** - * Generated file. Do not edit. - * This file is generated by the Flutter tool based on the - * plugins that support the Android platform. - */ -@Keep -public final class GeneratedPluginRegistrant { - private static final String TAG = "GeneratedPluginRegistrant"; - public static void registerWith(@NonNull FlutterEngine flutterEngine) { - try { - flutterEngine.getPlugins().add(new com.it_nomads.fluttersecurestorage.FlutterSecureStoragePlugin()); - } catch (Exception e) { - Log.e(TAG, "Error registering plugin flutter_secure_storage, com.it_nomads.fluttersecurestorage.FlutterSecureStoragePlugin", e); - } - try { - flutterEngine.getPlugins().add(new io.flutter.plugins.pathprovider.PathProviderPlugin()); - } catch (Exception e) { - Log.e(TAG, "Error registering plugin path_provider_android, io.flutter.plugins.pathprovider.PathProviderPlugin", e); - } - } -} diff --git a/mobile-app/android/app/src/main/kotlin/com/ldfdpi/mobile/LdFdpiVpnService.kt b/mobile-app/android/app/src/main/kotlin/com/ldfdpi/mobile/LdFdpiVpnService.kt deleted file mode 100644 index cc81047..0000000 --- a/mobile-app/android/app/src/main/kotlin/com/ldfdpi/mobile/LdFdpiVpnService.kt +++ /dev/null @@ -1,235 +0,0 @@ -package com.ldfdpi.mobile - -import android.app.Notification -import android.app.NotificationChannel -import android.app.NotificationManager -import android.app.PendingIntent -import android.content.Context -import android.content.Intent -import android.net.VpnService -import android.os.Build -import android.os.ParcelFileDescriptor -import androidx.core.app.NotificationCompat -import org.json.JSONObject - -class LdFdpiVpnService : VpnService() { - private var tun: ParcelFileDescriptor? = null - private var running = false - - companion object { - const val ACTION_START = "com.ldfdpi.mobile.START" - const val ACTION_STOP = "com.ldfdpi.mobile.STOP" - const val EXTRA_CONFIG = "config" - private const val CHANNEL_ID = "ld_fdpi_tunnel" - private const val NOTIFICATION_ID = 4201 - - private val state = TunnelRuntime() - - fun start(context: Context, config: String) { - val intent = Intent(context, LdFdpiVpnService::class.java) - .setAction(ACTION_START) - .putExtra(EXTRA_CONFIG, config) - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { - context.startForegroundService(intent) - } else { - context.startService(intent) - } - } - - fun stop(context: Context) { - context.startService( - Intent(context, LdFdpiVpnService::class.java).setAction(ACTION_STOP) - ) - } - - fun snapshot(): Map = state.snapshot() - } - - override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int { - when (intent?.action) { - ACTION_START -> { - val config = intent.getStringExtra(EXTRA_CONFIG) - if (config.isNullOrBlank()) { - state.setError("Tünel yapılandırması boş.") - } else { - startTunnel(config) - } - } - ACTION_STOP -> stopTunnel() - else -> { - if (!running) stopSelf() - } - } - return START_STICKY - } - - private fun startTunnel(configJson: String) { - if (running) return - state.connecting() - createNotificationChannel() - startForeground(NOTIFICATION_ID, buildNotification("LD FDPI bağlanıyor", "Tünel hazırlanıyor")) - - try { - val config = JSONObject(configJson) - val address = config.optString("address", "10.8.1.2/32").substringBefore('/') - val dns = config.optJSONArray("dns") - val builder = Builder() - .setSession("LD FDPI") - .setMtu(1420) - .addAddress(address, 32) - .addRoute("0.0.0.0", 0) - .addRoute("::", 0) - - if (dns != null && dns.length() > 0) { - for (i in 0 until dns.length()) { - val server = dns.optString(i, "") - if (server.isNotBlank()) builder.addDnsServer(server) - } - } else { - builder.addDnsServer("1.1.1.1") - builder.addDnsServer("1.0.0.1") - } - - if (!NativeTunnel.available()) { - state.setError("AmneziaWG çekirdeği (libawg.so) APK içinde yok.") - stopForeground(STOP_FOREGROUND_REMOVE) - stopSelf() - return - } - - val descriptor = builder.establish() - if (descriptor == null) { - state.setError("Android VpnService TUN arayüzü açılamadı.") - stopSelf() - return - } - tun = descriptor - val nativeStarted = try { - NativeTunnel.start(descriptor.fd, configJson) - } catch (_: Throwable) { - false - } - if (!nativeStarted) { - descriptor.close() - tun = null - state.setError("AmneziaWG tüneli başlatılamadı.") - stopForeground(STOP_FOREGROUND_REMOVE) - stopSelf() - return - } - - running = true - state.connected(address, config.optString("endpoint", "—")) - updateNotification("LD FDPI bağlı", "Trafik tünelden geçiyor") - } catch (e: Throwable) { - closeTunnel() - state.setError(e.message ?: "Tünel başlatma hatası.") - stopForeground(STOP_FOREGROUND_REMOVE) - stopSelf() - } - } - - private fun stopTunnel() { - closeTunnel() - state.disconnected() - stopForeground(STOP_FOREGROUND_REMOVE) - stopSelf() - } - - private fun closeTunnel() { - running = false - try { - NativeTunnel.stop() - } catch (_: Throwable) { - } - try { - tun?.close() - } catch (_: Throwable) { - } - tun = null - } - - override fun onRevoke() { - closeTunnel() - state.disconnected() - stopForeground(STOP_FOREGROUND_REMOVE) - stopSelf() - super.onRevoke() - } - - override fun onDestroy() { - closeTunnel() - super.onDestroy() - } - - private fun createNotificationChannel() { - if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) return - val manager = getSystemService(NotificationManager::class.java) - val channel = NotificationChannel( - CHANNEL_ID, - "LD FDPI tüneli", - NotificationManager.IMPORTANCE_LOW - ).apply { description = "VPN tüneli durumu" } - manager.createNotificationChannel(channel) - } - - private fun buildNotification(title: String, text: String): Notification { - val open = PendingIntent.getActivity( - this, - 0, - Intent(this, MainActivity::class.java), - PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_IMMUTABLE - ) - return NotificationCompat.Builder(this, CHANNEL_ID) - .setSmallIcon(android.R.drawable.ic_lock_lock) - .setContentTitle(title) - .setContentText(text) - .setContentIntent(open) - .setOngoing(true) - .setPriority(NotificationCompat.PRIORITY_LOW) - .build() - } - - private fun updateNotification(title: String, text: String) { - val manager = getSystemService(NotificationManager::class.java) - manager.notify(NOTIFICATION_ID, buildNotification(title, text)) - } -} - -class TunnelRuntime { - @Volatile private var state = "disconnected" - @Volatile private var address: String? = null - @Volatile private var endpoint: String? = null - @Volatile private var error: String? = null - - fun connecting() { - state = "connecting" - error = null - } - - fun connected(address: String, endpoint: String) { - state = "connected" - this.address = address - this.endpoint = endpoint - error = null - } - - fun disconnected() { - state = "disconnected" - address = null - endpoint = null - error = null - } - - fun setError(message: String) { - state = "error" - error = message - } - - fun snapshot(): Map = mapOf( - "state" to state, - "address" to address, - "endpoint" to endpoint, - "error" to error - ) -} diff --git a/mobile-app/android/app/src/main/kotlin/com/ldfdpi/mobile/MainActivity.kt b/mobile-app/android/app/src/main/kotlin/com/ldfdpi/mobile/MainActivity.kt deleted file mode 100644 index 395424f..0000000 --- a/mobile-app/android/app/src/main/kotlin/com/ldfdpi/mobile/MainActivity.kt +++ /dev/null @@ -1,84 +0,0 @@ -package com.ldfdpi.mobile - -import android.content.Intent -import android.net.VpnService -import android.os.Bundle -import io.flutter.embedding.android.FlutterActivity -import io.flutter.embedding.engine.FlutterEngine -import io.flutter.plugin.common.MethodChannel -import java.net.InetSocketAddress -import java.net.Socket - -class MainActivity : FlutterActivity() { - private val channelName = "ld_fdpi/native" - - override fun configureFlutterEngine(flutterEngine: FlutterEngine) { - super.configureFlutterEngine(flutterEngine) - MethodChannel(flutterEngine.dartExecutor.binaryMessenger, channelName) - .setMethodCallHandler { call, result -> - when (call.method) { - "startTunnel" -> { - val config = call.argument("config") - if (config.isNullOrBlank()) { - result.error("config", "Tunnel config is empty", null) - } else { - try { - LdFdpiVpnService.start(applicationContext, config) - result.success(null) - } catch (e: Exception) { - result.error("start", e.message, null) - } - } - } - "stopTunnel" -> { - try { - LdFdpiVpnService.stop(applicationContext) - result.success(null) - } catch (e: Exception) { - result.error("stop", e.message, null) - } - } - "status" -> result.success(LdFdpiVpnService.snapshot()) - "openVpnSettings" -> { - try { - val intent = Intent(android.provider.Settings.ACTION_VPN_SETTINGS) - intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK) - startActivity(intent) - result.success(null) - } catch (e: Exception) { - result.error("settings", e.message, null) - } - } - "ping" -> { - Thread { - val started = System.nanoTime() - var ms: Int? = null - try { - Socket().use { socket -> - socket.connect(InetSocketAddress("1.1.1.1", 443), 1500) - ms = ((System.nanoTime() - started) / 1_000_000).toInt() - } - } catch (_: Exception) { - ms = null - } - runOnUiThread { result.success(ms) } - }.start() - } - "prepare" -> { - val intent = VpnService.prepare(applicationContext) - result.success(intent == null) - } - "requestVpnPermission" -> { - val intent = VpnService.prepare(applicationContext) - if (intent == null) { - result.success(true) - } else { - startActivityForResult(intent, 1001) - result.success(false) - } - } - else -> result.notImplemented() - } - } - } -} diff --git a/mobile-app/android/app/src/main/kotlin/com/ldfdpi/mobile/NativeTunnel.kt b/mobile-app/android/app/src/main/kotlin/com/ldfdpi/mobile/NativeTunnel.kt deleted file mode 100644 index 1a11293..0000000 --- a/mobile-app/android/app/src/main/kotlin/com/ldfdpi/mobile/NativeTunnel.kt +++ /dev/null @@ -1,28 +0,0 @@ -package com.ldfdpi.mobile - -/** - * JNI contract for the AmneziaWG userspace tunnel. - * - * Implementations must: - * - accept a connected VpnService TUN fd, - * - apply Jc/Jmin/Jmax/S1-S4/H1-H4/HeaderProtectionKey parameters, - * - pump packets until nativeStop() is called, - * - never log private keys or preshared keys. - * - * The stock WireGuard Android backend does not understand AWG obfuscation, so - * libawg.so must be built from amneziawg-go with gomobile/NDK and placed under - * android/app/src/main/jniLibs//. - */ -object NativeTunnel { - private val loaded: Boolean = try { - System.loadLibrary("awg") - true - } catch (_: UnsatisfiedLinkError) { - false - } - - fun available(): Boolean = loaded - - external fun start(tunFd: Int, configJson: String): Boolean - external fun stop() -} diff --git a/mobile-app/android/app/src/main/res/drawable/ic_launcher.xml b/mobile-app/android/app/src/main/res/drawable/ic_launcher.xml deleted file mode 100644 index 6b62f69..0000000 --- a/mobile-app/android/app/src/main/res/drawable/ic_launcher.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - diff --git a/mobile-app/android/app/src/main/res/drawable/launch_background.xml b/mobile-app/android/app/src/main/res/drawable/launch_background.xml deleted file mode 100644 index 419f620..0000000 --- a/mobile-app/android/app/src/main/res/drawable/launch_background.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/mobile-app/android/app/src/main/res/values-night/styles.xml b/mobile-app/android/app/src/main/res/values-night/styles.xml deleted file mode 100644 index 6d157c1..0000000 --- a/mobile-app/android/app/src/main/res/values-night/styles.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - diff --git a/mobile-app/android/app/src/main/res/values/colors.xml b/mobile-app/android/app/src/main/res/values/colors.xml deleted file mode 100644 index 00a216f..0000000 --- a/mobile-app/android/app/src/main/res/values/colors.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - #05080B - diff --git a/mobile-app/android/app/src/main/res/values/styles.xml b/mobile-app/android/app/src/main/res/values/styles.xml deleted file mode 100644 index 6d157c1..0000000 --- a/mobile-app/android/app/src/main/res/values/styles.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - diff --git a/mobile-app/android/build.gradle b/mobile-app/android/build.gradle deleted file mode 100644 index 66dc9f5..0000000 --- a/mobile-app/android/build.gradle +++ /dev/null @@ -1,20 +0,0 @@ -allprojects { - repositories { - google() - mavenCentral() - } -} - -rootProject.buildDir = "../build" - -subprojects { - project.buildDir = "${rootProject.buildDir}/${project.name}" -} - -subprojects { - project.evaluationDependsOn(":app") -} - -tasks.register("clean", Delete) { - delete rootProject.buildDir -} diff --git a/mobile-app/android/gradle.properties b/mobile-app/android/gradle.properties deleted file mode 100644 index 9650bbc..0000000 --- a/mobile-app/android/gradle.properties +++ /dev/null @@ -1,4 +0,0 @@ -org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 -android.useAndroidX=true -android.enableJetifier=true -kotlin.code.style=official diff --git a/mobile-app/android/gradle/wrapper/gradle-wrapper.jar b/mobile-app/android/gradle/wrapper/gradle-wrapper.jar deleted file mode 100644 index a4b76b9..0000000 Binary files a/mobile-app/android/gradle/wrapper/gradle-wrapper.jar and /dev/null differ diff --git a/mobile-app/android/gradle/wrapper/gradle-wrapper.properties b/mobile-app/android/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index 6b74f0f..0000000 --- a/mobile-app/android/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,5 +0,0 @@ -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip diff --git a/mobile-app/android/gradlew b/mobile-app/android/gradlew deleted file mode 100644 index 2e91e85..0000000 --- a/mobile-app/android/gradlew +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env sh -DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd) -CLASSPATH="$DIR/gradle/wrapper/gradle-wrapper.jar" -if [ -n "$JAVA_HOME" ]; then - JAVA_EXE="$JAVA_HOME/bin/java" -else - JAVA_EXE=java -fi -exec "$JAVA_EXE" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" diff --git a/mobile-app/android/settings.gradle b/mobile-app/android/settings.gradle deleted file mode 100644 index 8cbd262..0000000 --- a/mobile-app/android/settings.gradle +++ /dev/null @@ -1,25 +0,0 @@ -pluginManagement { - def flutterSdkPath = { - def properties = new Properties() - file("local.properties").withInputStream { properties.load(it) } - def flutterSdkPath = properties.getProperty("flutter.sdk") - assert flutterSdkPath != null, "flutter.sdk not set in local.properties" - return flutterSdkPath - }() - - includeBuild("$flutterSdkPath/packages/flutter_tools/gradle") - - repositories { - google() - mavenCentral() - gradlePluginPortal() - } -} - -plugins { - id "dev.flutter.flutter-plugin-loader" version "1.0.0" - id "com.android.application" version "8.7.0" apply false - id "org.jetbrains.kotlin.android" version "2.1.0" apply false -} - -include ":app" diff --git a/mobile-app/docs/TUNNEL_BACKEND.md b/mobile-app/docs/TUNNEL_BACKEND.md deleted file mode 100644 index 65a639d..0000000 --- a/mobile-app/docs/TUNNEL_BACKEND.md +++ /dev/null @@ -1,109 +0,0 @@ -# AmneziaWG native backend - -The app deliberately does **not** fake a VPN. `LdFdpiVpnService` only calls -`Builder.establish()` when the native core is present. Without the core the UI -stays usable but Connect is rejected with: - -> AmneziaWG çekirdeği (libawg.so) APK içinde yok. - -## Why not the stock WireGuard Android library? - -`com.wireguard.android:tunnel` implements WireGuard but has no notion of -AmneziaWG's `Jc/Jmin/Jmax/S1-S4/H1-H4/HeaderProtectionKey` fields. A standard -WireGuard handshake will not be accepted by the AWG server. Shipping it and -pretending it works would create a silent leak/blackhole. - -## JNI contract - -Kotlin (`NativeTunnel.kt`): - -```kotlin -external fun start(tunFd: Int, configJson: String): Boolean -external fun stop() -``` - -C/C++/Go exports: - -```c -JNIEXPORT jboolean JNICALL -Java_com_ldfdpi_mobile_NativeTunnel_start(JNIEnv *env, jobject thiz, - jint tun_fd, jstring config_json); - -JNIEXPORT void JNICALL -Java_com_ldfdpi_mobile_NativeTunnel_stop(JNIEnv *env, jobject thiz); -``` - -`configJson` has: - -```json -{ - "address": "10.8.1.20/32", - "dns": ["1.1.1.1", "1.0.0.1"], - "endpoint": "116.202.14.171:42771", - "server_public_key": "...", - "preshared_key": "...", - "allowed_ips": ["0.0.0.0/0", "::/0"], - "private_key": "...", - "awg": { - "jc": 5, "jmin": 10, "jmax": 50, - "s1": 12, "s2": 12, "s3": 12, "s4": 12, - "h1": 1, "h2": 2, "h3": 3, "h4": 4, - "header_protection_key": "...", - "rekey_after_time": "100-120", - "rekey_timeout": "3-7", - "reject_after_time": "150-180", - "keepalive_timeout": "5-15" - } -} -``` - -The native side must: - -1. Take ownership of the TUN fd (do not close it twice). -2. Apply AWG obfuscation parameters before the first handshake. -3. Pump packets until `stop()`. -4. Never log `private_key` or `preshared_key`. -5. Return `false` on bad config/handshake failure so Kotlin closes the TUN and - reports an error. - -## Building `libawg.so` from amneziawg-go - -High-level, on Linux/WSL with Go + Android NDK: - -```bash -git clone https://github.com/amnezia-vpn/amneziawg-go -cd amneziawg-go -# Add a small JNI export file that: -# - parses configJson -# - creates awg device with TUN fd -# - applies Jc/Jmin/Jmax/S1-S4/H1-H4/HeaderProtectionKey -# - runs device.Wait() -GOOS=android GOARCH=arm64 CGO_ENABLED=1 \ -CC=$ANDROID_NDK/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android26-clang \ -go build -buildmode=c-shared -o libawg.so ./jni -``` - -Place per ABI: - -```text -android/app/src/main/jniLibs/arm64-v8a/libawg.so -android/app/src/main/jniLibs/x86_64/libawg.so # emulator -``` - -Then rebuild: - -```bash -flutter build apk --release -``` - -## Kill-switch reality on Android - -Android does not allow an app to silently enable **Always-on VPN** or -**Block connections without VPN**. Those are user-controlled system settings. -The app deep-links to `Settings.ACTION_VPN_SETTINGS`; the UI explains that both -must be enabled manually for a true fail-closed behavior. - -`VpnService` itself captures all IPv4/IPv6 traffic while active and uses the -tunnel DNS; that prevents normal DNS leaks. If the native core dies, the TUN -remains and traffic is blackholed until Android tears the service down or the -user disconnects. This is intentionally fail-closed, not a silent fallback. diff --git a/mobile-app/lib/main.dart b/mobile-app/lib/main.dart deleted file mode 100644 index 3a0f689..0000000 --- a/mobile-app/lib/main.dart +++ /dev/null @@ -1,688 +0,0 @@ -import 'package:flutter/material.dart'; - -import 'src/app_state.dart'; -import 'src/models.dart'; - -const _bg = Color(0xFF05080B); -const _panel = Color(0xFF0C151D); -const _line = Color(0xFF1E303A); -const _cyan = Color(0xFF8FE3F5); -const _green = Color(0xFF8DFFAD); -const _muted = Color(0xFF91AAB7); -const _red = Color(0xFFFF8F9F); - -void main() async { - WidgetsFlutterBinding.ensureInitialized(); - final state = AppState(); - await state.initialize(); - runApp(LdFdpiApp(state: state)); -} - -class LdFdpiApp extends StatelessWidget { - final AppState state; - const LdFdpiApp({super.key, required this.state}); - - @override - Widget build(BuildContext context) { - final scheme = ColorScheme.fromSeed( - seedColor: _cyan, - brightness: Brightness.dark, - ).copyWith( - surface: _panel, - primary: _cyan, - secondary: _green, - error: _red, - ); - return MaterialApp( - title: 'LD FDPI', - debugShowCheckedModeBanner: false, - theme: ThemeData( - useMaterial3: true, - brightness: Brightness.dark, - colorScheme: scheme, - scaffoldBackgroundColor: _bg, - fontFamily: 'sans-serif', - textTheme: const TextTheme( - headlineLarge: TextStyle(fontWeight: FontWeight.w900, letterSpacing: -1.4), - headlineMedium: TextStyle(fontWeight: FontWeight.w800, letterSpacing: -0.8), - titleMedium: TextStyle(fontWeight: FontWeight.w700), - bodyMedium: TextStyle(color: _muted, height: 1.45), - bodySmall: TextStyle(color: _muted, height: 1.4), - ), - ), - home: HomeScreen(state: state), - ); - } -} - -class HomeScreen extends StatelessWidget { - final AppState state; - const HomeScreen({super.key, required this.state}); - - @override - Widget build(BuildContext context) { - return Scaffold( - body: Stack( - children: [ - const _Aurora(), - SafeArea( - child: ListenableBuilder( - listenable: state, - builder: (context, _) { - return ListView( - padding: const EdgeInsets.fromLTRB(20, 18, 20, 28), - children: [ - _Header(onSettings: () => _openSettings(context)), - const SizedBox(height: 28), - _StatusOrb(state: state), - const SizedBox(height: 18), - Center(child: _statusLabel(state)), - const SizedBox(height: 6), - Center( - child: Text( - state.connecting - ? 'El sıkışma bekleniyor...' - : state.connected - ? 'Trafik tünelden geçiyor' - : 'Bağlanmaya hazır', - style: const TextStyle(color: _muted, fontSize: 12), - ), - ), - const SizedBox(height: 24), - _ConnectButton(state: state), - if (state.error != null) ...[ - const SizedBox(height: 12), - _ErrorBox(message: state.error!), - ], - const SizedBox(height: 22), - _InfoGrid(state: state), - const SizedBox(height: 12), - _ActivationCard(state: state), - const SizedBox(height: 12), - _SecurityCard(state: state), - const SizedBox(height: 12), - _Footer(), - ], - ); - }, - ), - ), - ], - ), - ); - } - - void _openSettings(BuildContext context) { - Navigator.of(context).push( - MaterialPageRoute(builder: (_) => SettingsScreen(state: state)), - ); - } -} - -class _Header extends StatelessWidget { - final VoidCallback onSettings; - const _Header({required this.onSettings}); - - @override - Widget build(BuildContext context) { - return Row( - children: [ - Container( - width: 38, - height: 38, - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(11), - border: Border.all(color: _cyan.withOpacity(0.35)), - color: _cyan.withOpacity(0.08), - ), - child: const Icon(Icons.shield_outlined, color: _cyan, size: 21), - ), - const SizedBox(width: 11), - const Expanded( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text('LD FDPI', style: TextStyle(fontWeight: FontWeight.w900, fontSize: 16, letterSpacing: -0.3)), - Text('MOBILE TUNNEL', style: TextStyle(color: _muted, fontSize: 9, letterSpacing: 2)), - ], - ), - ), - IconButton( - onPressed: onSettings, - icon: const Icon(Icons.tune_rounded, color: _muted), - tooltip: 'Ayarlar', - ), - ], - ); - } -} - -class _StatusOrb extends StatelessWidget { - final AppState state; - const _StatusOrb({required this.state}); - - @override - Widget build(BuildContext context) { - final connected = state.connected; - final busy = state.connecting; - final color = connected ? _green : busy ? const Color(0xFFFFD27A) : _cyan; - return Center( - child: AnimatedContainer( - duration: const Duration(milliseconds: 450), - curve: Curves.easeOutCubic, - width: 196, - height: 196, - decoration: BoxDecoration( - shape: BoxShape.circle, - gradient: RadialGradient( - colors: [ - color.withOpacity(0.18), - color.withOpacity(0.04), - Colors.transparent, - ], - stops: const [0.0, 0.55, 1.0], - ), - border: Border.all(color: color.withOpacity(0.35), width: 1), - boxShadow: [ - BoxShadow(color: color.withOpacity(0.14), blurRadius: 50, spreadRadius: 8), - ], - ), - child: Center( - child: AnimatedContainer( - duration: const Duration(milliseconds: 350), - width: 116, - height: 116, - decoration: BoxDecoration( - shape: BoxShape.circle, - color: _panel.withOpacity(0.9), - border: Border.all(color: color.withOpacity(0.45)), - ), - child: busy - ? Padding( - padding: const EdgeInsets.all(40), - child: CircularProgressIndicator(strokeWidth: 2, color: color), - ) - : Icon( - connected ? Icons.shield_rounded : Icons.shield_outlined, - color: color, - size: 46, - ), - ), - ), - ), - ); - } -} - -Widget _statusLabel(AppState state) { - final text = state.connected - ? 'BAĞLI' - : state.connecting - ? 'BAĞLANIYOR' - : state.status.state == TunnelState.error - ? 'HATA' - : 'BAĞLI DEĞİL'; - final color = state.connected ? _green : state.connecting ? const Color(0xFFFFD27A) : _muted; - return Text( - text, - style: TextStyle(color: color, fontSize: 11, fontWeight: FontWeight.w800, letterSpacing: 3), - ); -} - -class _ConnectButton extends StatelessWidget { - final AppState state; - const _ConnectButton({required this.state}); - - @override - Widget build(BuildContext context) { - final disabled = state.busy; - if (state.connected) { - return SizedBox( - height: 54, - child: FilledButton.icon( - onPressed: disabled ? null : state.disconnect, - style: FilledButton.styleFrom( - backgroundColor: _panel, - foregroundColor: _red, - side: BorderSide(color: _red.withOpacity(0.35)), - shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(15)), - ), - icon: const Icon(Icons.power_settings_new_rounded), - label: const Text('BAĞLANTIYI KES', style: TextStyle(fontWeight: FontWeight.w800, letterSpacing: 0.6)), - ), - ); - } - return SizedBox( - height: 54, - child: FilledButton.icon( - onPressed: disabled ? null : state.connect, - style: FilledButton.styleFrom( - backgroundColor: _cyan, - foregroundColor: _bg, - shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(15)), - ), - icon: const Icon(Icons.bolt_rounded), - label: const Text('BAĞLAN', style: TextStyle(fontWeight: FontWeight.w900, letterSpacing: 0.8)), - ), - ); - } -} - -class _InfoGrid extends StatelessWidget { - final AppState state; - const _InfoGrid({required this.state}); - - @override - Widget build(BuildContext context) { - return Row( - children: [ - Expanded(child: _InfoTile(label: 'ATANAN IP', value: state.address, icon: Icons.lan_outlined)), - const SizedBox(width: 10), - Expanded(child: _InfoTile(label: 'ÇIKIŞ', value: state.endpoint, icon: Icons.public_rounded)), - ], - ); - } -} - -class _InfoTile extends StatelessWidget { - final String label; - final String value; - final IconData icon; - const _InfoTile({required this.label, required this.value, required this.icon}); - - @override - Widget build(BuildContext context) { - return Container( - padding: const EdgeInsets.all(14), - decoration: BoxDecoration( - color: _panel, - borderRadius: BorderRadius.circular(14), - border: Border.all(color: _line), - ), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Row( - children: [ - Icon(icon, size: 13, color: _cyan), - const SizedBox(width: 6), - Text(label, style: const TextStyle(color: _muted, fontSize: 8, letterSpacing: 1.3)), - ], - ), - const SizedBox(height: 8), - Text( - value, - maxLines: 1, - overflow: TextOverflow.ellipsis, - style: const TextStyle(fontFamily: 'monospace', fontSize: 11, fontWeight: FontWeight.w700), - ), - ], - ), - ); - } -} - -class _ActivationCard extends StatelessWidget { - final AppState state; - const _ActivationCard({required this.state}); - - @override - Widget build(BuildContext context) { - return Container( - padding: const EdgeInsets.all(16), - decoration: BoxDecoration( - color: _panel, - borderRadius: BorderRadius.circular(16), - border: Border.all(color: _line), - ), - child: Row( - children: [ - const Icon(Icons.key_rounded, color: _cyan, size: 20), - const SizedBox(width: 12), - Expanded( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text(state.hasConfig ? 'Cihaz kayıtlı' : 'Etkinleştirme gerekli', - style: const TextStyle(fontWeight: FontWeight.w800, fontSize: 12)), - const SizedBox(height: 3), - Text( - state.hasConfig - ? 'Kimlik bu cihazda şifreli saklanıyor.' - : 'Tek kullanımlık kodunu gir, tüneli aç.', - style: const TextStyle(color: _muted, fontSize: 10.5), - ), - ], - ), - ), - TextButton( - onPressed: () => _showEnrollment(context), - child: Text(state.hasConfig ? 'YENİLE' : 'KOD GİR', style: const TextStyle(fontSize: 10, fontWeight: FontWeight.w800)), - ), - ], - ), - ); - } - - void _showEnrollment(BuildContext context) { - showModalBottomSheet( - context: context, - isScrollControlled: true, - backgroundColor: _panel, - shape: const RoundedRectangleBorder(borderRadius: BorderRadius.vertical(top: Radius.circular(22))), - builder: (sheetContext) => Padding( - padding: EdgeInsets.only(bottom: MediaQuery.of(sheetContext).viewInsets.bottom), - child: _EnrollmentSheet(state: state), - ), - ); - } -} - -class _EnrollmentSheet extends StatefulWidget { - final AppState state; - const _EnrollmentSheet({required this.state}); - - @override - State<_EnrollmentSheet> createState() => _EnrollmentSheetState(); -} - -class _EnrollmentSheetState extends State<_EnrollmentSheet> { - final _controller = TextEditingController(); - - @override - void dispose() { - _controller.dispose(); - super.dispose(); - } - - @override - Widget build(BuildContext context) { - return Padding( - padding: const EdgeInsets.fromLTRB(20, 18, 20, 24), - child: Column( - mainAxisSize: MainAxisSize.min, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - const Text('Etkinleştirme kodu', style: TextStyle(fontSize: 20, fontWeight: FontWeight.w900)), - const SizedBox(height: 6), - const Text('Kod tek kullanımlık ve bu cihaza bağlanır.', style: TextStyle(color: _muted, fontSize: 12)), - const SizedBox(height: 18), - TextField( - controller: _controller, - autofocus: true, - textCapitalization: TextCapitalization.characters, - style: const TextStyle(fontFamily: 'monospace', letterSpacing: 1), - decoration: InputDecoration( - hintText: 'LDFDPI-XXXX-XXXX-XXXX', - filled: true, - fillColor: _bg, - border: OutlineInputBorder(borderRadius: BorderRadius.circular(12), borderSide: const BorderSide(color: _line)), - enabledBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(12), borderSide: const BorderSide(color: _line)), - focusedBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(12), borderSide: const BorderSide(color: _cyan)), - ), - onSubmitted: (_) => _submit(), - ), - if (widget.state.error != null) ...[ - const SizedBox(height: 10), - Text(widget.state.error!, style: const TextStyle(color: _red, fontSize: 11)), - ], - const SizedBox(height: 16), - SizedBox( - width: double.infinity, - height: 48, - child: ListenableBuilder( - listenable: widget.state, - builder: (context, _) { - return FilledButton( - onPressed: widget.state.busy ? null : _submit, - style: FilledButton.styleFrom(backgroundColor: _cyan, foregroundColor: _bg, shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12))), - child: widget.state.busy - ? const SizedBox(width: 18, height: 18, child: CircularProgressIndicator(strokeWidth: 2, color: _bg)) - : const Text('KAYDI TAMAMLA', style: TextStyle(fontWeight: FontWeight.w900, letterSpacing: 0.6)), - ); - }, - ), - ), - ], - ), - ); - } - - Future _submit() async { - await widget.state.enroll(_controller.text); - if (widget.state.hasConfig && mounted) Navigator.of(context).pop(); - } -} - -class _SecurityCard extends StatelessWidget { - final AppState state; - const _SecurityCard({required this.state}); - - @override - Widget build(BuildContext context) { - return Container( - padding: const EdgeInsets.all(16), - decoration: BoxDecoration( - color: _panel, - borderRadius: BorderRadius.circular(16), - border: Border.all(color: _line), - ), - child: Column( - children: [ - _SecurityRow(icon: Icons.dns_outlined, label: 'DNS', value: state.config?.dns.join(', ') ?? '1.1.1.1'), - const SizedBox(height: 10), - _SecurityRow(icon: Icons.speed_rounded, label: 'GECİKME', value: state.pingMs == null ? '—' : '${state.pingMs} ms'), - const SizedBox(height: 10), - _SecurityRow(icon: Icons.block_rounded, label: 'SIZINTI', value: state.connected ? 'KORUMALI' : 'PASİF'), - ], - ), - ); - } -} - -class _SecurityRow extends StatelessWidget { - final IconData icon; - final String label; - final String value; - const _SecurityRow({required this.icon, required this.label, required this.value}); - - @override - Widget build(BuildContext context) { - return Row( - children: [ - Icon(icon, size: 15, color: _cyan), - const SizedBox(width: 9), - Text(label, style: const TextStyle(color: _muted, fontSize: 9, letterSpacing: 1.1)), - const Spacer(), - Flexible( - child: Text( - value, - textAlign: TextAlign.right, - overflow: TextOverflow.ellipsis, - style: const TextStyle(fontFamily: 'monospace', fontSize: 10.5, color: Color(0xFFD8ECF2)), - ), - ), - ], - ); - } -} - -class _ErrorBox extends StatelessWidget { - final String message; - const _ErrorBox({required this.message}); - - @override - Widget build(BuildContext context) { - return Container( - padding: const EdgeInsets.all(12), - decoration: BoxDecoration( - color: _red.withOpacity(0.07), - border: Border.all(color: _red.withOpacity(0.3)), - borderRadius: BorderRadius.circular(11), - ), - child: Text(message, style: const TextStyle(color: _red, fontSize: 11)), - ); - } -} - -class _Footer extends StatelessWidget { - @override - Widget build(BuildContext context) { - return const Padding( - padding: EdgeInsets.only(top: 8), - child: Text( - 'LD FDPI v0.1.0 · Android VpnService · AES-GCM secure storage', - textAlign: TextAlign.center, - style: TextStyle(color: Color(0xFF536B77), fontSize: 9), - ), - ); - } -} - -class _Aurora extends StatelessWidget { - const _Aurora(); - - @override - Widget build(BuildContext context) { - return IgnorePointer( - child: Stack( - children: [ - Positioned( - top: -180, - right: -120, - child: Container( - width: 420, - height: 420, - decoration: BoxDecoration( - shape: BoxShape.circle, - gradient: RadialGradient(colors: [_cyan.withOpacity(0.13), Colors.transparent]), - ), - ), - ), - Positioned( - bottom: -220, - left: -160, - child: Container( - width: 460, - height: 460, - decoration: BoxDecoration( - shape: BoxShape.circle, - gradient: RadialGradient(colors: [_green.withOpacity(0.06), Colors.transparent]), - ), - ), - ), - ], - ), - ); - } -} - -class SettingsScreen extends StatelessWidget { - final AppState state; - const SettingsScreen({super.key, required this.state}); - - @override - Widget build(BuildContext context) { - return Scaffold( - appBar: AppBar( - backgroundColor: _bg, - title: const Text('Ayarlar', style: TextStyle(fontWeight: FontWeight.w800)), - leading: IconButton(onPressed: () => Navigator.pop(context), icon: const Icon(Icons.arrow_back_rounded)), - ), - body: ListenableBuilder( - listenable: state, - builder: (context, _) => ListView( - padding: const EdgeInsets.all(20), - children: [ - _SettingsCard( - title: 'Tünel', - rows: [ - _SettingsRow('Sunucu', state.config?.endpoint ?? '—'), - _SettingsRow('Adres', state.config?.address ?? '—'), - _SettingsRow('DNS', state.config?.dns.join(', ') ?? '1.1.1.1'), - _SettingsRow('AmneziaWG', state.config == null ? '—' : 'Jc ${state.config!.awg.jc} · S1 ${state.config!.awg.s1}'), - ], - ), - const SizedBox(height: 12), - _SettingsCard( - title: 'Sızıntı koruması', - rows: const [ - _SettingsRow('VPN', 'Android VpnService'), - _SettingsRow('DNS', 'Tünel içi 1.1.1.1 / 1.0.0.1'), - _SettingsRow('Kill-switch', 'Always-on VPN + Block without VPN'), - ], - ), - const SizedBox(height: 10), - FilledButton.tonalIcon( - onPressed: state.openVpnSettings, - icon: const Icon(Icons.open_in_new_rounded, size: 17), - label: const Text('Android VPN ayarlarını aç'), - ), - const SizedBox(height: 8), - const Text( - 'Android, “Always-on VPN” ve “Block connections without VPN” ayarlarını uygulama adına açmaya izin vermez. Ayarlar ekranından kullanıcı tarafından açılmalıdır.', - style: TextStyle(color: _muted, fontSize: 10.5, height: 1.45), - ), - const SizedBox(height: 22), - const _SettingsCard( - title: 'Uygulama', - rows: [ - _SettingsRow('Sürüm', '0.1.0'), - _SettingsRow('Depolama', 'EncryptedSharedPreferences'), - _SettingsRow('Kimlik', 'X25519 · cihaz başına'), - ], - ), - ], - ), - ), - ); - } -} - -class _SettingsCard extends StatelessWidget { - final String title; - final List rows; - const _SettingsCard({required this.title, required this.rows}); - - @override - Widget build(BuildContext context) { - return Container( - padding: const EdgeInsets.all(16), - decoration: BoxDecoration(color: _panel, borderRadius: BorderRadius.circular(16), border: Border.all(color: _line)), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text(title.toUpperCase(), style: const TextStyle(color: _muted, fontSize: 9, letterSpacing: 1.4, fontWeight: FontWeight.w700)), - const SizedBox(height: 10), - ...rows, - ], - ), - ); - } -} - -class _SettingsRow extends StatelessWidget { - final String label; - final String value; - const _SettingsRow(this.label, this.value); - - @override - Widget build(BuildContext context) { - return Padding( - padding: const EdgeInsets.symmetric(vertical: 5), - child: Row( - children: [ - Expanded(child: Text(label, style: const TextStyle(fontSize: 11.5, color: _muted))), - Flexible( - child: Text( - value, - textAlign: TextAlign.right, - overflow: TextOverflow.ellipsis, - style: const TextStyle(fontFamily: 'monospace', fontSize: 10.5, color: Color(0xFFD8ECF2)), - ), - ), - ], - ), - ); - } -} diff --git a/mobile-app/lib/src/api.dart b/mobile-app/lib/src/api.dart deleted file mode 100644 index d4cf79e..0000000 --- a/mobile-app/lib/src/api.dart +++ /dev/null @@ -1,94 +0,0 @@ -import 'dart:convert'; -import 'dart:io'; - -import 'package:http/http.dart' as http; - -import 'models.dart'; - -class EnrollmentException implements Exception { - final String message; - const EnrollmentException(this.message); - - @override - String toString() => message; -} - -class EnrollmentApi { - static const endpoint = 'https://ttmadethat.shop/api/v1/enroll'; - final http.Client _client; - - EnrollmentApi([http.Client? client]) : _client = client ?? http.Client(); - - Future enroll({ - required String token, - required String publicKey, - required String deviceId, - required String privateKey, - }) async { - late final http.Response response; - try { - response = await _client - .post( - Uri.parse(endpoint), - headers: { - 'Authorization': 'Bearer $token', - 'Content-Type': 'application/json', - 'Accept': 'application/json', - }, - body: jsonEncode({ - 'public_key': publicKey, - 'device_id': deviceId, - 'client_version': 'android-0.1.0', - }), - ) - .timeout(const Duration(seconds: 20)); - } on SocketException { - throw const EnrollmentException('Sunucuya ulaşılamadı. İnterneti kontrol et.'); - } on HttpException { - throw const EnrollmentException('Sunucu bağlantısı kesildi.'); - } catch (_) { - throw const EnrollmentException('Enrollment zaman aşımına uğradı.'); - } - - if (response.statusCode == 409) { - throw const EnrollmentException('Bu kod başka bir cihazda kullanılmış.'); - } - if (response.statusCode == 401) { - throw const EnrollmentException('Etkinleştirme kodu geçersiz.'); - } - if (response.statusCode == 429) { - throw const EnrollmentException('Çok fazla deneme. Bir dakika sonra tekrar dene.'); - } - if (response.statusCode != 200) { - throw EnrollmentException('Enrollment başarısız (HTTP ${response.statusCode}).'); - } - - final Object? decoded; - try { - decoded = jsonDecode(response.body); - } catch (_) { - throw const EnrollmentException('Sunucu geçersiz yanıt döndürdü.'); - } - if (decoded is! Map) { - throw const EnrollmentException('Sunucu geçersiz yanıt döndürdü.'); - } - if ((decoded['server_public_key'] ?? '').toString().isEmpty) { - throw const EnrollmentException('Sunucu public key döndürmedi.'); - } - return VpnConfig.fromEnrollment(decoded, privateKey: privateKey, deviceId: deviceId); - } - - Future ping() async { - final watch = Stopwatch()..start(); - try { - final socket = await Socket.connect('1.1.1.1', 443, timeout: const Duration(milliseconds: 1500)); - socket.destroy(); - watch.stop(); - return watch.elapsedMilliseconds; - } catch (_) { - return null; - } - } - - void close() => _client.close(); -} diff --git a/mobile-app/lib/src/app_state.dart b/mobile-app/lib/src/app_state.dart deleted file mode 100644 index 83dd4f8..0000000 --- a/mobile-app/lib/src/app_state.dart +++ /dev/null @@ -1,181 +0,0 @@ -import 'dart:async'; -import 'dart:convert'; - -import 'package:cryptography/cryptography.dart'; -import 'package:flutter/foundation.dart'; - -import 'api.dart'; -import 'models.dart'; -import 'secure_store.dart'; -import 'tunnel.dart'; - -class AppState extends ChangeNotifier { - final SecureStore _store = SecureStore(); - final EnrollmentApi _api = EnrollmentApi(); - final TunnelPlatform _tunnel = TunnelPlatform(); - - VpnConfig? config; - TunnelStatus status = TunnelStatus.disconnected; - bool initialized = false; - bool busy = false; - String? error; - String? publicKey; - int? pingMs; - Timer? _statusTimer; - - bool get hasConfig => config != null; - bool get connected => status.connected; - bool get connecting => status.busy || busy; - String get address => status.address ?? config?.address ?? '—'; - String get endpoint => status.endpoint ?? config?.endpoint ?? '—'; - - Future initialize() async { - try { - config = await _store.readConfig(); - publicKey = await _readPublicKey(); - if (config != null) { - status = await _tunnel.status(); - } - } catch (e) { - error = 'Yerel kimlik okunamadı: $e'; - } finally { - initialized = true; - notifyListeners(); - _startPolling(); - } - } - - Future _readPublicKey() async { - final raw = await _store.readPrivateKey(); - if (raw == null) return null; - try { - final algorithm = X25519(); - final keyPair = await algorithm.newKeyPairFromSeed(base64Decode(raw)); - final pub = await keyPair.extractPublicKey(); - return base64Encode(pub.bytes); - } catch (_) { - return null; - } - } - - Future enroll(String token) async { - final clean = token.trim(); - if (clean.isEmpty) { - error = 'Etkinleştirme kodu boş olamaz.'; - notifyListeners(); - return; - } - busy = true; - error = null; - notifyListeners(); - try { - var privateKey = await _store.readPrivateKey(); - if (privateKey == null) { - final algorithm = X25519(); - final keyPair = await algorithm.newKeyPair(); - final privateBytes = await keyPair.extractPrivateKeyBytes(); - privateKey = base64Encode(privateBytes); - await _store.writePrivateKey(privateKey); - } - final algorithm = X25519(); - final keyPair = await algorithm.newKeyPairFromSeed(base64Decode(privateKey)); - final public = await keyPair.extractPublicKey(); - publicKey = base64Encode(public.bytes); - final deviceId = await _store.deviceId(); - final enrolled = await _api.enroll( - token: clean, - publicKey: publicKey!, - deviceId: deviceId, - privateKey: privateKey, - ); - await _store.writeConfig(enrolled); - config = enrolled; - status = await _tunnel.status(); - await refreshPing(); - } on EnrollmentException catch (e) { - error = e.message; - } catch (e) { - error = 'Kayıt tamamlanamadı: $e'; - } finally { - busy = false; - notifyListeners(); - } - } - - Future connect() async { - final cfg = config; - if (cfg == null) { - error = 'Önce etkinleştirme kodunu gir.'; - notifyListeners(); - return; - } - busy = true; - error = null; - notifyListeners(); - try { - if (!await _tunnel.prepare()) { - error = 'Android VPN izni verilmedi. Tekrar dene ve sistem onayını kabul et.'; - return; - } - await _tunnel.start(cfg); - status = await _tunnel.status(); - await refreshPing(); - } catch (e) { - error = 'Tünel başlatılamadı: $e'; - status = TunnelStatus(state: TunnelState.error, error: error); - } finally { - busy = false; - notifyListeners(); - } - } - - Future disconnect() async { - busy = true; - error = null; - notifyListeners(); - try { - await _tunnel.stop(); - status = await _tunnel.status(); - } catch (e) { - error = 'Tünel kapatılamadı: $e'; - } finally { - busy = false; - notifyListeners(); - } - } - - Future refreshStatus() async { - try { - status = await _tunnel.status(); - notifyListeners(); - } catch (_) {} - } - - Future refreshPing() async { - pingMs = await _api.ping(); - notifyListeners(); - } - - Future openVpnSettings() => _tunnel.openVpnSettings(); - - void _startPolling() { - _statusTimer?.cancel(); - _statusTimer = Timer.periodic(const Duration(seconds: 2), (_) async { - if (!initialized) return; - try { - final next = await _tunnel.status(); - if (next.state != status.state || next.address != status.address) { - status = next; - notifyListeners(); - } - } catch (_) {} - }); - } - - @override - void dispose() { - _statusTimer?.cancel(); - _api.close(); - super.dispose(); - } -} diff --git a/mobile-app/lib/src/models.dart b/mobile-app/lib/src/models.dart deleted file mode 100644 index fab8646..0000000 --- a/mobile-app/lib/src/models.dart +++ /dev/null @@ -1,204 +0,0 @@ -import 'dart:convert'; - -class AwgParams { - final int jc; - final int jmin; - final int jmax; - final int s1; - final int s2; - final int s3; - final int s4; - final int h1; - final int h2; - final int h3; - final int h4; - final String headerProtectionKey; - final String rekeyAfter; - final String rekeyTimeout; - final String rejectAfter; - final String keepalive; - final bool randomTrailers; - final bool disableCookies; - - const AwgParams({ - this.jc = 5, - this.jmin = 10, - this.jmax = 50, - this.s1 = 12, - this.s2 = 12, - this.s3 = 12, - this.s4 = 12, - this.h1 = 1, - this.h2 = 2, - this.h3 = 3, - this.h4 = 4, - this.headerProtectionKey = '', - this.rekeyAfter = '100-120', - this.rekeyTimeout = '3-7', - this.rejectAfter = '150-180', - this.keepalive = '5-15', - this.randomTrailers = true, - this.disableCookies = true, - }); - - factory AwgParams.fromJson(Map? json) { - final j = json ?? const {}; - int readInt(String key, int fallback) { - final value = j[key]; - if (value is num) return value.toInt(); - if (value is String) return int.tryParse(value) ?? fallback; - return fallback; - } - - return AwgParams( - jc: readInt('jc', 5), - jmin: readInt('jmin', 10), - jmax: readInt('jmax', 50), - s1: readInt('s1', 12), - s2: readInt('s2', 12), - s3: readInt('s3', 12), - s4: readInt('s4', 12), - h1: readInt('h1', 1), - h2: readInt('h2', 2), - h3: readInt('h3', 3), - h4: readInt('h4', 4), - headerProtectionKey: (j['header_protection_key'] ?? j['headerProtectionKey'] ?? '').toString(), - rekeyAfter: (j['rekey_after_time'] ?? '100-120').toString(), - rekeyTimeout: (j['rekey_timeout'] ?? '3-7').toString(), - rejectAfter: (j['reject_after_time'] ?? '150-180').toString(), - keepalive: (j['keepalive_timeout'] ?? '5-15').toString(), - randomTrailers: j['random_trailers'] != false, - disableCookies: j['disable_cookies'] != false, - ); - } - - Map toJson() => { - 'jc': jc, - 'jmin': jmin, - 'jmax': jmax, - 's1': s1, - 's2': s2, - 's3': s3, - 's4': s4, - 'h1': h1, - 'h2': h2, - 'h3': h3, - 'h4': h4, - 'header_protection_key': headerProtectionKey, - 'rekey_after_time': rekeyAfter, - 'rekey_timeout': rekeyTimeout, - 'reject_after_time': rejectAfter, - 'keepalive_timeout': keepalive, - 'random_trailers': randomTrailers, - 'disable_cookies': disableCookies, - }; -} - -class VpnConfig { - final String address; - final List dns; - final String endpoint; - final String serverPublicKey; - final String presharedKey; - final List allowedIps; - final AwgParams awg; - final String privateKey; - final String deviceId; - - const VpnConfig({ - required this.address, - required this.dns, - required this.endpoint, - required this.serverPublicKey, - required this.presharedKey, - required this.allowedIps, - required this.awg, - required this.privateKey, - required this.deviceId, - }); - - factory VpnConfig.fromEnrollment( - Map json, { - required String privateKey, - required String deviceId, - }) { - final dns = (json['dns'] as List?)?.map((e) => e.toString()).toList() ?? ['1.1.1.1']; - final allowed = (json['allowed_ips'] as List?)?.map((e) => e.toString()).toList() ?? - ['0.0.0.0/0', '::/0']; - return VpnConfig( - address: (json['address'] ?? '10.8.1.2/32').toString(), - dns: dns.isEmpty ? ['1.1.1.1'] : dns, - endpoint: (json['endpoint'] ?? '116.202.14.171:42771').toString(), - serverPublicKey: (json['server_public_key'] ?? '').toString(), - presharedKey: (json['preshared_key'] ?? '').toString(), - allowedIps: allowed, - awg: AwgParams.fromJson(json['awg'] as Map?), - privateKey: privateKey, - deviceId: deviceId, - ); - } - - Map toJson() => { - 'address': address, - 'dns': dns, - 'endpoint': endpoint, - 'server_public_key': serverPublicKey, - 'preshared_key': presharedKey, - 'allowed_ips': allowedIps, - 'awg': awg.toJson(), - 'private_key': privateKey, - 'device_id': deviceId, - }; - - factory VpnConfig.fromJson(Map json) => VpnConfig( - address: json['address'].toString(), - dns: (json['dns'] as List).map((e) => e.toString()).toList(), - endpoint: json['endpoint'].toString(), - serverPublicKey: json['server_public_key'].toString(), - presharedKey: json['preshared_key'].toString(), - allowedIps: (json['allowed_ips'] as List).map((e) => e.toString()).toList(), - awg: AwgParams.fromJson(json['awg'] as Map?), - privateKey: json['private_key'].toString(), - deviceId: json['device_id'].toString(), - ); - - String toTunnelJson() => jsonEncode(toJson()); -} - -enum TunnelState { disconnected, connecting, connected, error } - -class TunnelStatus { - final TunnelState state; - final String? address; - final String? endpoint; - final String? error; - - const TunnelStatus({ - required this.state, - this.address, - this.endpoint, - this.error, - }); - - static const disconnected = TunnelStatus(state: TunnelState.disconnected); - - bool get connected => state == TunnelState.connected; - bool get busy => state == TunnelState.connecting; - - factory TunnelStatus.fromMap(Object? value) { - if (value is! Map) return disconnected; - final raw = (value['state'] ?? 'disconnected').toString(); - final state = switch (raw) { - 'connected' => TunnelState.connected, - 'connecting' => TunnelState.connecting, - 'error' => TunnelState.error, - _ => TunnelState.disconnected, - }; - return TunnelStatus( - state: state, - address: value['address']?.toString(), - endpoint: value['endpoint']?.toString(), - error: value['error']?.toString(), - ); - } -} diff --git a/mobile-app/lib/src/secure_store.dart b/mobile-app/lib/src/secure_store.dart deleted file mode 100644 index 3fa58e5..0000000 --- a/mobile-app/lib/src/secure_store.dart +++ /dev/null @@ -1,57 +0,0 @@ -import 'dart:convert'; -import 'dart:math'; - -import 'package:flutter_secure_storage/flutter_secure_storage.dart'; - -import 'models.dart'; - -/// Android implementation uses EncryptedSharedPreferences through -/// flutter_secure_storage (AES-256-GCM, Keystore-backed master key). -class SecureStore { - static const _configKey = 'ld_fdpi.config.v1'; - static const _privateKey = 'ld_fdpi.private_key.v1'; - static const _deviceIdKey = 'ld_fdpi.device_id.v1'; - - final FlutterSecureStorage _storage; - SecureStore([FlutterSecureStorage? storage]) - : _storage = storage ?? - const FlutterSecureStorage( - aOptions: AndroidOptions(encryptedSharedPreferences: true), - ); - - Future readPrivateKey() => _storage.read(key: _privateKey); - - Future writePrivateKey(String value) => _storage.write(key: _privateKey, value: value); - - Future readDeviceId() => _storage.read(key: _deviceIdKey); - - Future writeDeviceId(String value) => _storage.write(key: _deviceIdKey, value: value); - - Future readConfig() async { - final raw = await _storage.read(key: _configKey); - if (raw == null || raw.isEmpty) return null; - try { - final map = jsonDecode(raw) as Map; - return VpnConfig.fromJson(map); - } catch (_) { - await clearConfig(); - return null; - } - } - - Future writeConfig(VpnConfig config) => - _storage.write(key: _configKey, value: jsonEncode(config.toJson())); - - Future clearConfig() => _storage.delete(key: _configKey); - - Future deviceId() async { - final existing = await readDeviceId(); - if (existing != null && existing.length == 64) return existing; - final random = Random.secure(); - final id = List.generate(32, (_) => random.nextInt(256)) - .map((b) => b.toRadixString(16).padLeft(2, '0')) - .join(); - await writeDeviceId(id); - return id; - } -} diff --git a/mobile-app/lib/src/tunnel.dart b/mobile-app/lib/src/tunnel.dart deleted file mode 100644 index e2102a4..0000000 --- a/mobile-app/lib/src/tunnel.dart +++ /dev/null @@ -1,36 +0,0 @@ -import 'package:flutter/services.dart'; - -import 'models.dart'; - -class TunnelPlatform { - static const _channel = MethodChannel('ld_fdpi/native'); - - Future prepare() async { - final value = await _channel.invokeMethod('requestVpnPermission'); - return value == true; - } - - Future start(VpnConfig config) async { - await _channel.invokeMethod('startTunnel', { - 'config': config.toTunnelJson(), - }); - } - - Future stop() async { - await _channel.invokeMethod('stopTunnel'); - } - - Future status() async { - final value = await _channel.invokeMethod('status'); - return TunnelStatus.fromMap(value); - } - - Future openVpnSettings() async { - await _channel.invokeMethod('openVpnSettings'); - } - - Future ping() async { - final value = await _channel.invokeMethod('ping'); - return value; - } -} diff --git a/mobile-app/pubspec.lock b/mobile-app/pubspec.lock deleted file mode 100644 index 5d5fdb7..0000000 --- a/mobile-app/pubspec.lock +++ /dev/null @@ -1,410 +0,0 @@ -# Generated by pub -# See https://dart.dev/tools/pub/glossary#lockfile -packages: - async: - dependency: transitive - description: - name: async - sha256: d2872f9c19731c2e5f10444b14686eb7cc85c76274bd6c16e1816bff9a3bab63 - url: "https://pub.dev" - source: hosted - version: "2.12.0" - boolean_selector: - dependency: transitive - description: - name: boolean_selector - sha256: "8aab1771e1243a5063b8b0ff68042d67334e3feab9e95b9490f9a6ebf73b42ea" - url: "https://pub.dev" - source: hosted - version: "2.1.2" - characters: - dependency: transitive - description: - name: characters - sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803 - url: "https://pub.dev" - source: hosted - version: "1.4.0" - clock: - dependency: transitive - description: - name: clock - sha256: fddb70d9b5277016c77a80201021d40a2247104d9f4aa7bab7157b7e3f05b84b - url: "https://pub.dev" - source: hosted - version: "1.1.2" - collection: - dependency: transitive - description: - name: collection - sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76" - url: "https://pub.dev" - source: hosted - version: "1.19.1" - crypto: - dependency: transitive - description: - name: crypto - sha256: e3626ae6270383c9e3a549f34c9e4cd26c09ae6a9adaab2bf4737a00340efdc4 - url: "https://pub.dev" - source: hosted - version: "3.0.8" - cryptography: - dependency: "direct main" - description: - name: cryptography - sha256: "3eda3029d34ec9095a27a198ac9785630fe525c0eb6a49f3d575272f8e792ef0" - url: "https://pub.dev" - source: hosted - version: "2.9.0" - cupertino_icons: - dependency: "direct main" - description: - name: cupertino_icons - sha256: ba631d1c7f7bef6b729a622b7b752645a2d076dba9976925b8f25725a30e1ee6 - url: "https://pub.dev" - source: hosted - version: "1.0.8" - fake_async: - dependency: transitive - description: - name: fake_async - sha256: "6a95e56b2449df2273fd8c45a662d6947ce1ebb7aafe80e550a3f68297f3cacc" - url: "https://pub.dev" - source: hosted - version: "1.3.2" - ffi: - dependency: transitive - description: - name: ffi - sha256: "6d7fd89431262d8f3125e81b50d3847a091d846eafcd4fdb88dd06f36d705a45" - url: "https://pub.dev" - source: hosted - version: "2.2.0" - flutter: - dependency: "direct main" - description: flutter - source: sdk - version: "0.0.0" - flutter_lints: - dependency: "direct dev" - description: - name: flutter_lints - sha256: "3f41d009ba7172d5ff9be5f6e6e6abb4300e263aab8866d2a0842ed2a70f8f0c" - url: "https://pub.dev" - source: hosted - version: "4.0.0" - flutter_secure_storage: - dependency: "direct main" - description: - name: flutter_secure_storage - sha256: "9cad52d75ebc511adfae3d447d5d13da15a55a92c9410e50f67335b6d21d16ea" - url: "https://pub.dev" - source: hosted - version: "9.2.4" - flutter_secure_storage_linux: - dependency: transitive - description: - name: flutter_secure_storage_linux - sha256: be76c1d24a97d0b98f8b54bce6b481a380a6590df992d0098f868ad54dc8f688 - url: "https://pub.dev" - source: hosted - version: "1.2.3" - flutter_secure_storage_macos: - dependency: transitive - description: - name: flutter_secure_storage_macos - sha256: "6c0a2795a2d1de26ae202a0d78527d163f4acbb11cde4c75c670f3a0fc064247" - url: "https://pub.dev" - source: hosted - version: "3.1.3" - flutter_secure_storage_platform_interface: - dependency: transitive - description: - name: flutter_secure_storage_platform_interface - sha256: cf91ad32ce5adef6fba4d736a542baca9daf3beac4db2d04be350b87f69ac4a8 - url: "https://pub.dev" - source: hosted - version: "1.1.2" - flutter_secure_storage_web: - dependency: transitive - description: - name: flutter_secure_storage_web - sha256: f4ebff989b4f07b2656fb16b47852c0aab9fed9b4ec1c70103368337bc1886a9 - url: "https://pub.dev" - source: hosted - version: "1.2.1" - flutter_secure_storage_windows: - dependency: transitive - description: - name: flutter_secure_storage_windows - sha256: b20b07cb5ed4ed74fc567b78a72936203f587eba460af1df11281c9326cd3709 - url: "https://pub.dev" - source: hosted - version: "3.1.2" - flutter_test: - dependency: "direct dev" - description: flutter - source: sdk - version: "0.0.0" - flutter_web_plugins: - dependency: transitive - description: flutter - source: sdk - version: "0.0.0" - http: - dependency: "direct main" - description: - name: http - sha256: "87721a4a50b19c7f1d49001e51409bddc46303966ce89a65af4f4e6004896412" - url: "https://pub.dev" - source: hosted - version: "1.6.0" - http_parser: - dependency: transitive - description: - name: http_parser - sha256: "178d74305e7866013777bab2c3d8726205dc5a4dd935297175b19a23a2e66571" - url: "https://pub.dev" - source: hosted - version: "4.1.2" - js: - dependency: transitive - description: - name: js - sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3 - url: "https://pub.dev" - source: hosted - version: "0.6.7" - leak_tracker: - dependency: transitive - description: - name: leak_tracker - sha256: c35baad643ba394b40aac41080300150a4f08fd0fd6a10378f8f7c6bc161acec - url: "https://pub.dev" - source: hosted - version: "10.0.8" - leak_tracker_flutter_testing: - dependency: transitive - description: - name: leak_tracker_flutter_testing - sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573 - url: "https://pub.dev" - source: hosted - version: "3.0.9" - leak_tracker_testing: - dependency: transitive - description: - name: leak_tracker_testing - sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" - url: "https://pub.dev" - source: hosted - version: "3.0.1" - lints: - dependency: transitive - description: - name: lints - sha256: "976c774dd944a42e83e2467f4cc670daef7eed6295b10b36ae8c85bcbf828235" - url: "https://pub.dev" - source: hosted - version: "4.0.0" - matcher: - dependency: transitive - description: - name: matcher - sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2 - url: "https://pub.dev" - source: hosted - version: "0.12.17" - material_color_utilities: - dependency: transitive - description: - name: material_color_utilities - sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec - url: "https://pub.dev" - source: hosted - version: "0.11.1" - meta: - dependency: transitive - description: - name: meta - sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c - url: "https://pub.dev" - source: hosted - version: "1.16.0" - path: - dependency: transitive - description: - name: path - sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5" - url: "https://pub.dev" - source: hosted - version: "1.9.1" - path_provider: - dependency: transitive - description: - name: path_provider - sha256: "50c5dd5b6e1aaf6fb3a78b33f6aa3afca52bf903a8a5298f53101fdaee55bbcd" - url: "https://pub.dev" - source: hosted - version: "2.1.5" - path_provider_android: - dependency: transitive - description: - name: path_provider_android - sha256: "3b4c1fc3aa55ddc9cd4aa6759984330d5c8e66aa7702a6223c61540dc6380c37" - url: "https://pub.dev" - source: hosted - version: "2.2.19" - path_provider_foundation: - dependency: transitive - description: - name: path_provider_foundation - sha256: "16eef174aacb07e09c351502740fa6254c165757638eba1e9116b0a781201bbd" - url: "https://pub.dev" - source: hosted - version: "2.4.2" - path_provider_linux: - dependency: transitive - description: - name: path_provider_linux - sha256: f7a1fe3a634fe7734c8d3f2766ad746ae2a2884abe22e241a8b301bf5cac3279 - url: "https://pub.dev" - source: hosted - version: "2.2.1" - path_provider_platform_interface: - dependency: transitive - description: - name: path_provider_platform_interface - sha256: "88f5779f72ba699763fa3a3b06aa4bf6de76c8e5de842cf6f29e2e06476c2334" - url: "https://pub.dev" - source: hosted - version: "2.1.2" - path_provider_windows: - dependency: transitive - description: - name: path_provider_windows - sha256: bd6f00dbd873bfb70d0761682da2b3a2c2fccc2b9e84c495821639601d81afe7 - url: "https://pub.dev" - source: hosted - version: "2.3.0" - platform: - dependency: transitive - description: - name: platform - sha256: "5d6b1b0036a5f331ebc77c850ebc8506cbc1e9416c27e59b439f917a902a4984" - url: "https://pub.dev" - source: hosted - version: "3.1.6" - plugin_platform_interface: - dependency: transitive - description: - name: plugin_platform_interface - sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" - url: "https://pub.dev" - source: hosted - version: "2.1.8" - sky_engine: - dependency: transitive - description: flutter - source: sdk - version: "0.0.0" - source_span: - dependency: transitive - description: - name: source_span - sha256: "254ee5351d6cb365c859e20ee823c3bb479bf4a293c22d17a9f1bf144ce86f7c" - url: "https://pub.dev" - source: hosted - version: "1.10.1" - stack_trace: - dependency: transitive - description: - name: stack_trace - sha256: "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1" - url: "https://pub.dev" - source: hosted - version: "1.12.1" - stream_channel: - dependency: transitive - description: - name: stream_channel - sha256: "969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d" - url: "https://pub.dev" - source: hosted - version: "2.1.4" - string_scanner: - dependency: transitive - description: - name: string_scanner - sha256: "921cd31725b72fe181906c6a94d987c78e3b98c2e205b397ea399d4054872b43" - url: "https://pub.dev" - source: hosted - version: "1.4.1" - term_glyph: - dependency: transitive - description: - name: term_glyph - sha256: "7f554798625ea768a7518313e58f83891c7f5024f88e46e7182a4558850a4b8e" - url: "https://pub.dev" - source: hosted - version: "1.2.2" - test_api: - dependency: transitive - description: - name: test_api - sha256: fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd - url: "https://pub.dev" - source: hosted - version: "0.7.4" - typed_data: - dependency: transitive - description: - name: typed_data - sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006 - url: "https://pub.dev" - source: hosted - version: "1.4.0" - vector_math: - dependency: transitive - description: - name: vector_math - sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" - url: "https://pub.dev" - source: hosted - version: "2.1.4" - vm_service: - dependency: transitive - description: - name: vm_service - sha256: "0968250880a6c5fe7edc067ed0a13d4bae1577fe2771dcf3010d52c4a9d3ca14" - url: "https://pub.dev" - source: hosted - version: "14.3.1" - web: - dependency: transitive - description: - name: web - sha256: "868d88a33d8a87b18ffc05f9f030ba328ffefba92d6c127917a2ba740f9cfe4a" - url: "https://pub.dev" - source: hosted - version: "1.1.1" - win32: - dependency: transitive - description: - name: win32 - sha256: "329edf97fdd893e0f1e3b9e88d6a0e627128cc17cc316a8d67fda8f1451178ba" - url: "https://pub.dev" - source: hosted - version: "5.13.0" - xdg_directories: - dependency: transitive - description: - name: xdg_directories - sha256: "7a3f37b05d989967cdddcbb571f1ea834867ae2faa29725fd085180e0883aa15" - url: "https://pub.dev" - source: hosted - version: "1.1.0" -sdks: - dart: ">=3.7.0 <4.0.0" - flutter: ">=3.29.0" diff --git a/mobile-app/pubspec.yaml b/mobile-app/pubspec.yaml deleted file mode 100644 index d756935..0000000 --- a/mobile-app/pubspec.yaml +++ /dev/null @@ -1,23 +0,0 @@ -name: ld_fdpi_mobile -description: LD FDPI Android client — AmneziaWG tunnel, enrollment and leak protection. -publish_to: "none" -version: 0.1.0+1 - -environment: - sdk: ">=3.4.0 <4.0.0" - -dependencies: - flutter: - sdk: flutter - cupertino_icons: ^1.0.8 - http: ^1.2.2 - cryptography: ^2.7.0 - flutter_secure_storage: ^9.2.4 - -dev_dependencies: - flutter_test: - sdk: flutter - flutter_lints: ^4.0.0 - -flutter: - uses-material-design: true diff --git a/package.json b/package.json index 42158b9..c4e2563 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { "name": "ld-fdpi", "private": true, - "version": "1.7.3", - "description": "LD FDPI - zero-touch AmneziaWG VPN and SpoofDPI DPI bypass for Windows (Tauri v2, Rust, React)", + "version": "1.8.12", + "description": "LD FDPI - 24/7 SpoofDPI local proxy and DPI bypass for Windows (Tauri v2, Rust, React)", "type": "module", "scripts": { "dev": "vite", diff --git a/scripts/e2e-gui.mjs b/scripts/e2e-gui.mjs index 5ceb54b..b347a50 100644 --- a/scripts/e2e-gui.mjs +++ b/scripts/e2e-gui.mjs @@ -34,7 +34,7 @@ if (!exe) { } const BASE_CONFIG = { - version: 1, + version: 6, autoStart: false, autoConnect: false, minimizeToTray: true, diff --git a/scripts/security-e2e.mjs b/scripts/security-e2e.mjs index 99e7219..7caf615 100644 --- a/scripts/security-e2e.mjs +++ b/scripts/security-e2e.mjs @@ -28,7 +28,7 @@ const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms)); const originalConfig = fs.existsSync(CONFIG_PATH) ? fs.readFileSync(CONFIG_PATH, "utf8") : null; const BASE = { - version: 1, + version: 6, autoStart: false, autoConnect: false, minimizeToTray: true, diff --git a/scripts/verify-all.mjs b/scripts/verify-all.mjs index 0c5023b..832bb3f 100644 --- a/scripts/verify-all.mjs +++ b/scripts/verify-all.mjs @@ -336,10 +336,11 @@ await runTest("10. package.json scriptleri doğru", async () => { ); }); -await runTest("11. Manuel başlangıç: varsayılanlar ve config.json kalıcılığı", async () => { +await runTest("11. Kur ve unut: varsayılanlar ve config.json kalıcılığı", async () => { const configRs = read("src-tauri/src/config.rs"); + assert.ok(configRs.includes("version: 6"), "config v6 olmalı"); assert.ok(configRs.includes("auto_start: true"), "auto_start varsayılanı açık olmalı"); - assert.ok(configRs.includes("auto_connect: false"), "auto_connect varsayılanı kapalı olmalı (manuel mod)"); + assert.ok(configRs.includes("auto_connect: true"), "auto_connect varsayılanı açık olmalı (7/24)"); assert.ok(configRs.includes("minimize_to_tray: true"), "minimize_to_tray varsayılanı açık olmalı"); assert.ok(configRs.includes("config.json"), "config.json yolu tanımlı olmalı"); assert.ok(configRs.includes("pub fn save"), "config kaydetme fonksiyonu yok"); @@ -415,14 +416,18 @@ await runTest("15. PAC istek limiti + peer filtresi + loopback", async () => { assert.ok(lib.includes("0.0.0.0"), "LAN bind mantığı yok"); }); -await runTest("16. CSP, sıfır capability ve panic fail-safe", async () => { +await runTest("16. CSP, updater-only capability ve panic fail-safe", async () => { const conf = JSON.parse(read("src-tauri/tauri.conf.json")); assert.equal( conf.app.security.csp, "default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; connect-src 'self' ipc: http://ipc.localhost" ); const cap = JSON.parse(read("src-tauri/capabilities/default.json")); - assert.deepEqual(cap.permissions, [], "Webview'e gereksiz izin verilmiş"); + assert.deepEqual( + cap.permissions, + ["updater:default"], + "Webview'e yalnızca updater izni verilmeli" + ); const lib = read("src-tauri/src/lib.rs"); assert.ok(lib.includes("set_hook"), "Panic hook yok"); assert.ok(lib.includes("restore_system_proxy(true)"), "Panikte proxy geri yükleme yok"); @@ -493,13 +498,13 @@ await runTest("18. Ultra-low latency: Smart DoH, TCP_NODELAY, öncelik, LTO", as assert.ok(app.includes("setInterval"), "Durum zamanlayıcısı yok"); }); -await runTest("19. Sürüm 1.5.10 tutarlı", async () => { +await runTest("19. Sürüm 1.8.12 tutarlı", async () => { const pkg = JSON.parse(read("package.json")); const cargo = read("src-tauri/Cargo.toml"); const conf = JSON.parse(read("src-tauri/tauri.conf.json")); - assert.equal(pkg.version, "1.5.10"); - assert.equal(conf.version, "1.5.10"); - assert.match(cargo, /^version = "1\.5\.10"/m); + assert.equal(pkg.version, "1.8.12"); + assert.equal(conf.version, "1.8.12"); + assert.match(cargo, /^version = "1\.8\.12"/m); }); await runTest("20. Yeni logo: app-icon, public logo, favicon ve arayüz", async () => { @@ -537,6 +542,76 @@ await runTest("21. Captive portal asistanı bağlı", async () => { assert.match(i18n, /Connect Without Login/); }); +await runTest("22. Saf FDPI + 7/24 dayanıklılık: VPN tamamen kaldırıldı", async () => { + const removedPaths = [ + "src-tauri/src/vpn.rs", + "src-tauri/src/identity.rs", + "src-tauri/src/endpoints.rs", + "src-tauri/resources/amneziawg.msi", + "src/components/VpnRepairCard.jsx", + "mobile-app", + "deploy/ld-fdpi-enroll", + "deploy/fix_enroll_head.py", + "docs/ZERO_TOUCH.md", + "linuxFDPI/src-tauri/src/vpn.rs", + "linuxFDPI/src-tauri/src/identity.rs", + ]; + for (const rel of removedPaths) { + assert.ok(!fs.existsSync(path.join(ROOT, rel)), `VPN artığı silinmemiş: ${rel}`); + } + + const lib = read("src-tauri/src/lib.rs"); + assert.ok(!/get_vpn_status|connect_vpn|enroll_vpn/.test(lib), "lib.rs içinde VPN komutu kalmış"); + assert.ok(lib.includes("SetConsoleCtrlHandler"), "Windows kapanış ctrl handler eksik"); + assert.ok(lib.includes("WindowEvent::Destroyed"), "Pencere yıkım temizliği eksik"); + assert.ok(lib.includes("physical_network_up"), "Fiziksel ağ kontrolü eksik"); + assert.ok(lib.includes("invalidate_doh_cache"), "DoH cache geçersizleştirme eksik"); + + const autostart = read("src-tauri/src/autostart.rs"); + assert.ok(autostart.includes("DisallowStartIfOnBatteries"), "Pilde devam XML ayarı eksik"); + assert.ok(autostart.includes("RestartOnFailure"), "Görev yeniden başlatma kurtarması eksik"); + + const supervisor = read("src-tauri/src/supervisor.rs"); + assert.ok(!supervisor.includes("VpnActive"), "supervisor VpnActive kalmış"); + + const wfp = read("src-tauri/src/wfp_killswitch.rs"); + assert.ok(!wfp.includes("enable_killswitch"), "WFP kill-switch kalmış"); + assert.ok(wfp.includes("enable_fdpi_quic_block"), "FDPI QUIC koruma katmanı korunmalı"); + + const cargo = read("src-tauri/Cargo.toml"); + assert.ok(!cargo.includes("x25519-dalek"), "VPN kripto paketi Cargo.toml'da kalmış"); + + const app = read("src/App.jsx"); + assert.ok(!/VpnRepairCard|get_vpn_status|vpnAutoConnect/.test(app), "App.jsx içinde VPN kodu kalmış"); + const i18n = read("src/i18n.js"); + assert.ok(!i18n.includes("vpnConnected"), "i18n.js içinde vpnConnected kalmış"); + + const linuxLib = read("linuxFDPI/src-tauri/src/lib.rs"); + assert.ok(!linuxLib.includes("get_vpn_status"), "Linux lib.rs VPN komutu kalmış"); + const linuxApp = read("linuxFDPI/src/App.jsx"); + assert.ok(!/AmneziaWG|get_vpn_status/.test(linuxApp), "Linux App.jsx VPN kartı kalmış"); + const linuxHelper = read("linuxFDPI/helper/ld_fdpi_helper.py"); + assert.ok(!/awg_available|NFT_KILL/.test(linuxHelper), "Linux helper VPN/killswitch kalmış"); + + const noVpn = /amnezia|\bvpn\b|kill[- ]?switch/i; + for (const siteFile of [ + "site/ld-fdpi.html", + "site/ld-fdpi-live.html", + "site/linux-ld-fdpi.html", + "site/linux-ld-fdpi-install.sh", + ]) { + assert.ok(!noVpn.test(read(siteFile)), `${siteFile} hâlâ VPN/AmneziaWG ifadesi içeriyor`); + } + const home = read("site/home-live.html"); + const cardStart = home.indexOf('id="ld-fdpi"'); + const cardEnd = home.indexOf(""); + assert.ok(cardStart !== -1 && cardEnd > cardStart, "home-live.html LD FDPI kart aralığı bulunamadı"); + assert.ok(!noVpn.test(home.slice(cardStart, cardEnd)), "home-live.html LD FDPI kartları VPN ifadesi içeriyor"); + + assert.ok(!read(".github/workflows/release.yml").includes("LD_FDPI_APP_SECRET"), "release.yml secret kalmış"); + assert.ok(!read(".env.example").includes("LD_FDPI_APP_SECRET"), ".env.example secret kalmış"); +}); + console.log("\n=============================================================="); console.log(`SONUÇ: ${passed} başarılı, ${failed} başarısız`); console.log("=============================================================="); diff --git a/site/add_fdpi_command.py b/site/add_fdpi_command.py index becd7d0..7775921 100644 --- a/site/add_fdpi_command.py +++ b/site/add_fdpi_command.py @@ -9,7 +9,7 @@ if "handleFdpi" in t: needle = " handleWebsite (name) {" handler = ''' handleFdpi (name) { - const message = `⚡ @${name}, LD FDPI: DPI bypass + AmneziaWG VPN, WFP kill-switch, DNS/IPv6 koruması. https://ttmadethat.shop/ld-fdpi`; + const message = `⚡ @${name}, LD FDPI: Windows ve Linux için hız kayıpsız SpoofDPI DPI bypass, Smart DoH ve 7/24 Proxy Sentinel koruması. https://ttmadethat.shop/ld-fdpi`; if (this.bot && typeof this.bot.queue === 'function') { this.bot.queue(message).catch((err) => log('FDPI mesaji hatasi:', err.message)); } else { diff --git a/site/add_ld_converter_route.py b/site/add_ld_converter_route.py new file mode 100644 index 0000000..9d002cb --- /dev/null +++ b/site/add_ld_converter_route.py @@ -0,0 +1,40 @@ +import os +import shutil +from pathlib import Path + +p = Path('/opt/tylorindar-safelink/main.py') +if not p.exists(): + print('FastAPI main.py not found at expected path.') + raise SystemExit(1) + +t = p.read_text(encoding='utf-8') +if 'async def ld_converter_page' in t: + print('LD Converter route already present') + raise SystemExit(0) + +needle = '@app.get("/{code}")\nasync def redirect_shortlink' +insert = '''@app.get("/ld-converter", include_in_schema=False) +@app.get("/ld-converter/", include_in_schema=False) +async def ld_converter_page(): + page = os.path.join(static_dir, "ld-converter.html") + if os.path.exists(page): + return FileResponse( + page, + media_type="text/html", + headers={"Cache-Control": "no-store, max-age=0"}, + ) + raise HTTPException(status_code=404, detail="LD Converter sayfası bulunamadı.") + +''' + +if needle not in t: + print('Catch-all route needle not found in main.py') + raise SystemExit(1) + +backup_path = Path('/opt/tylorindar-safelink/backups/main.py.bak-ld-converter-page') +backup_path.parent.mkdir(parents=True, exist_ok=True) +shutil.copy2(p, backup_path) + +t = t.replace(needle, insert + needle, 1) +p.write_text(t, encoding='utf-8') +print('LD Converter route successfully added to main.py') diff --git a/site/ld-converter.html b/site/ld-converter.html new file mode 100644 index 0000000..bbc8e76 --- /dev/null +++ b/site/ld-converter.html @@ -0,0 +1,574 @@ + + + + + + LD Converter — Tauri v2 & Rust ile Yeni Nesil Masaüstü Dönüştürücü | v2.5.0 + + + + + + + + + + + + + + + + +
+ + + +
+
+
Tauri v2 & Rust 64-Bit Core
+

Ultra Hızlı. Sıfır Bloat.

+

+ Dosyalarını sürükle veya Shift / Ctrl ile radyal çarkı aç: + JPEG XL (JXL), Word Denklem Formülleri (OMML), PDF & OCR, Canlı FFmpeg Medya ve 7-Zip Güvenliği tek bir şık masaüstü uygulamasında buluştu. +

+ +
+ ● Windows 11 / 10 Uyumlu + Pure Rust Image & Archive Core + 100% Çevrimdışı Çalışır +
+
+ + +
+
+ Sıfır Tıklama Deneyimi + Shift / Ctrl Kısayolu +
+ +
+
+
+ ⚡ + DÖNÜŞTÜR +
+ + +
+ 📄 + PDF +
+
+ 📐 + OMML +
+
+ ✨ + JXL +
+
+ 🌐 + WebP +
+
+ 🎬 + MP4 +
+
+ 📦 + 7-Zip +
+
+ +
+ Seçili Format: PDF Belgesi + Anında Dönüştür +
+
+
+ + +
+
+
+ < 15 ms + Tauri v2 Başlatma Hızı +
+
+ 100% + OMML Denklem Uyumu +
+
+ 12+ + Görsel & Medya Formatı +
+
+ 0 Tık + Radyal Çark Kısayolu +
+
+
+ + +
+
+
+ Öne Çıkan Yetenekler +

Masaüstü Dönüşümünde Standartları Yeniden Belirledik

+
+

Yalnızca dosya uzantısını değiştiren yüzeysel araçlar yerine; derin piksel, vektör, OMML ve matris düzeyinde çalışan saf Rust mimarisi.

+
+ +
+
+
📐
+

Markdown & PDF'ten Gerçek Word Denklemlerine (OMML)

+

+ Akademik makaleler, ders notları veya formül dolu dökümanlar artık Word'e resim olarak yapışmıyor. $E = mc^2$ gibi LaTeX formülleri doğrudan Microsoft Word'ün yerleşik <m:oMath> denklem motoruna çevrilir; tıklayıp düzenleyebilirsiniz. +

+ ✓ LaTeX $...$ & $$...$$  →  Microsoft Word OMML +
+ +
+
✨
+

JPEG XL (JXL) Çift Yönlü Motor

+

+ Yeni nesil JPEG XL formatını tüm resim formatlarına çevirin veya mevcut fotoğraflarınızı kayıpsız JXL'e sıkıştırın. +

+ JXL ↔ PNG / JPG / WebP +
+ +
+
🎬
+

Canlı FFmpeg Medya Laboratuvarı

+

+ Video ve ses dosyalarını dönüştürürken arka planda donup kalmayın. Canlı yüzde (1%..99%), 00:00:00 Trim ve Sesi Kaldır (Mute) seçenekleriyle tam kontrol elinizde. +

+ H.264 / AAC / MP3 / Trim +
+ +
+
🛡️
+

Zip Slip Korumalı Arşivleme

+

+ Arşiv dosyalarını açarken dizin dışına taşma (Zip Slip) saldırılarını kanonik yol doğrulamasıyla engeller; şifreli 7Z ve ZIP dosyalarını güvenle açar. +

+ ZIP · 7Z · RAR · AES-256 +
+ +
+
🔍
+

Çevrimdışı Akıllı OCR & QR Kod

+

+ Taranmış belgeler ve resimlerdeki yazıları internete göndermeden metne dökün. Görseldeki QR kodları tek dokunuşla panoya kopyalayın. +

+ rqrr Core + Yerleşik OCR +
+
+
+ + +
+
+
+ Dönüşüm Rotaları +

En Popüler İş Akışları

+
+

Karmaşık komut satırları veya web sitelerine dosya yükleme derdi yok.

+
+ +
+
+
+ Akademik & Belge + OMML Pipeline +
+
+ Formulas.md + ➔ + LaTeX Parser + ➔ + Düzenlenebilir Word (.docx) +
+

Matematik sembolleri, kesirler, integraller ve matrisler Word'ün yerel denklem editörüyle tam uyumlu çıkar.

+
+ +
+
+ Yeni Nesil Görsel + Next-Gen Graphics +
+
+ Photo.jxl + ➔ + Rust Image / FFmpeg + ➔ + WebP / PNG / JPG +
+

İster yüzlerce fotoğrafı WebP yapın, ister web siteniz için ultra hafif kayıpsız JXL çıktısı alın.

+
+
+
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
KategoriGirdi FormatlarıÇıktı & Özel YeteneklerÇekirdek Motor
GörsellerPNG, JPG, WebP, JXL, AVIF, BMP, TIFF, GIF, ICOKalite ayarı, boyutlandırma, animasyonlu GIF yapmaPure Rust + FFmpeg
Matematik & BelgeMarkdown (.md), PDF, DOCX, TXT, HTMLOMML <m:oMath> düzenlenebilir denklem çıktısıPandoc & LD Math Engine
Medya (Video / Ses)MP4, MKV, AVI, MOV, WEBM, MP3, WAV, FLAC, AACCanlı yüzde akışı, 00:00:00 Trim, Sesi KaldırFFmpeg Stream Engine
Arşiv & GüvenlikZIP, 7Z, TAR, GZ, RARZip Slip koruması, AES şifreli açma, @listfileRust Zip & 7-Zip CLI
+
+ + +
+
+
+
Güncel Kararlı Sürüm
+
LD Converter v2.5.0
+

+ Tauri v2 + Rust mimarisine taşınmış, sıfır hata ve 10/10 test onaylı Windows 10/11 masaüstü paketi. +

+ +
+ SHA-256: e8f4c2b978a1a98031d2ef31b64e0a7c41d362e515434a9a80f550ab218ce3d4 +
+
+
+
+
SİSTEM GEREKSİNİMLERİ
+
    +
  • Windows 10 / Windows 11 (x64)
  • +
  • WebView2 Runtime (Sistemle hazır gelir)
  • +
  • Kurulum boyutu: < 20 MB (Süper Hafif)
  • +
  • RAM kullanımı: ~45 MB
  • +
+
+
+
+
+ + + + + + diff --git a/site/ld-fdpi.html b/site/ld-fdpi.html index c9e6529..bea66f0 100644 --- a/site/ld-fdpi.html +++ b/site/ld-fdpi.html @@ -3,17 +3,17 @@ - LD FDPI — Discord, oyun ve Almanya çıkışı | v1.7.3 - + LD FDPI — Hız kaybı olmadan DPI bypass | v1.8.12 + - - + + - - + + @@ -143,9 +143,9 @@ .scenarios { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; } .scenario { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; padding: 22px; background: rgba(8,15,20,.84); } .scenario::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(420px 200px at 100% 0%, rgba(143,227,245,.1), transparent 65%); } - .scenario.vpn::before { background: radial-gradient(420px 200px at 100% 0%, rgba(141,255,173,.1), transparent 65%); } + .scenario.alt::before { background: radial-gradient(420px 200px at 100% 0%, rgba(141,255,173,.1), transparent 65%); } .scenario .label { position: relative; display: inline-flex; align-items: center; gap: 7px; font-family: var(--mono); font-size: 9px; letter-spacing: .12em; text-transform: uppercase; padding: 5px 8px; border-radius: 6px; border: 1px solid rgba(143,227,245,.26); color: var(--cyan); background: rgba(143,227,245,.06); } - .scenario.vpn .label { border-color: rgba(141,255,173,.26); color: var(--green); background: rgba(141,255,173,.05); } + .scenario.alt .label { border-color: rgba(141,255,173,.26); color: var(--green); background: rgba(141,255,173,.05); } .scenario h3 { position: relative; margin: 17px 0 7px; font-size: clamp(22px,2.5vw,30px); letter-spacing: -.04em; } .scenario > p { position: relative; color: #a8bec9; font-size: 12.5px; margin: 0 0 15px; } .scenario .use { position: relative; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 15px; } @@ -234,7 +234,7 @@ Özellikler Güvenlik Kurulum - İndir · v1.7.3 + İndir · v1.8.12 @@ -242,19 +242,19 @@
-
Windows 10/11 · tek tık · 9.7 MB
-

Discord açık.
Ping düşük.

-

DPI engelini tek tıkla geç; Discord, Kick ve tarayıcı çalışsın. Oyun trafiğin doğrudan kalsın, ping'in şişmesin. İstersen Almanya çıkışına geç, farklı kataloglara bak.

+
Windows 10/11 · 7/24 koruma · 6.5 MB
+

Hız kaybı yok.
Kesintisiz FDPI.

+

DPI engelini tek tıkla geç; Discord, Kick ve tarayıcı doğrudan hattın hızında açılsın. Bilgisayar kapanıp açıldığında, uykudan uyandığında veya ağ değiştiğinde kendini otomatik onaran saf SpoofDPI koruması.

- v1.7.3 + v1.8.12 Kurulum ~1 dk - Reklamsız + Hız kaybı yok SpoofDPI 0.12.2 - AmneziaWG + 7/24 Auto-Heal Win 10/11 x64
@@ -265,15 +265,15 @@
◈
-

DPI bağlı

SpoofDPI 0.12.2 · 127.0.0.1:18080

+

FDPI bağlı · 7/24

SpoofDPI 0.12.2 · 127.0.0.1:18080

-
modeDPI ACTIVE
-
discordTLS OK · hazır
-
wfpVPN modunda devreye girer
-
dns1.1.1.1 · DoH
-
ipv6 / stunVPN'de bloklu
-
latency1.1.1.1 · 10 ms
+
modeFDPI ACTIVE · DIRECT ROUTE
+
discordTLS OK · 0 ek gecikme
+
supervisor15s self-heal · wake + NIC
+
dnsSmart DoH · en hızlı sunucu
+
sentinelWinINet + WinHTTP korumalı
+
autostartGörev Zamanlayıcısı · pil bağımsız
@@ -282,84 +282,83 @@
-
1 dkkurulum süresi
-
2mod: DPI + VPN
-
9.7 MBkurulum boyutu
-
Win 10/11x64 destek
+
%100doğrudan hat hızı
+
15 snotomatik onarım döngüsü
+
6.5 MBkurulum boyutu
+
Win 10/11x64 7/24 destek
-
Hangi mod?

İki mod. Tek uygulama.

Oyun için düşük ping, bölgesel içerik için Almanya. İkisini aynı anda açmaya çalışmazsın; uygulama seni doğru moda yönlendirir.

+
Çalışma modları

İstediğin ağa göre optimize.

Ev ağı, düşük ping isteyen oyun istemcileri veya üniversite Eduroam Wi-Fi; hepsi için doğru HTTP/TLS yönlendirmesi.

- DPI MODU + NORMAL MOD (ÖNERİLEN)

Takıl, oyna, izle.

-

Discord, Kick ve tarayıcı açılır. Oyun istemcisi doğrudan hatta kalır; tüm trafiği VPN'e sokmadığın için ping'in artmaz.

-
DiscordKickTarayıcıRekabetçi oyun
-
Kime göre: “Discord açılsın, oyunuma dokunma” diyenler.
+

Discord, Kick ve tarayıcı sistem proxy'si (WinINet) üzerinden açılır. Oyun trafiğin doğrudan hatta kaldığı için ping artmaz, bant genişliğin düşmez.

+
DiscordKickTarayıcıDüşük Ping
+
Kime göre: “İnternetim yavaşlamasın, sadece engel kalksın” diyen herkes için.
-
- AMNEZIAWG VPN -

Almanya'ya bağlan.

-

Tek tıkla tam tünel. Almanya çıkışıyla bölgesel kataloglara ve yurt dışı servislere göz at; IP'n değişsin, trafiğin şifrelensin.

-
AlmanyaTam tünelBölgesel içerikGizlilik
-
Kime göre: “Farklı katalog görmek istiyorum” diyenler. Netflix/Prime içeriği ülke ve platform kurallarına bağlıdır; garanti değil.
+
+ OYUN & EDUROAM MODU +

Sistem geneli & Kampüs.

+

WinINet'e ek olarak WinHTTP (launchers ve sistem servisleri) yönlendirilir. Eduroam seçildiğinde kampüs Wi-Fi uyumluluğu için güvenli MTU 1400 ayarlanır ve *.edu doğrudan bırakılır.

+
WinHTTPLauncherEduroam MTUPAC İstisnaları
+
Not: Oyunların UDP ses trafiği proxy'den geçmez; tüm kurumsal duvarlar aşılmaz.
- + - - - - - + + + +
KararDPI moduAmneziaWG VPN
ÖzellikNormal ModOyun / Eduroam Modu
RotaYalnız proxy kullanan uygulamalarTüm cihaz trafiği
GecikmeDoğrudan hat · düşük ek yükAlmanya'ya göre + gecikme
KullanımDiscord, Kick, tarayıcı, günlük akışBölgesel katalog, yurt dışı servis, tam gizlilik
KorumaProxy + sentinelKalıcı WFP kill-switch + DNS/IPv6/STUN
En uygunRekabetçi oyun + düşük pingAlmanya çıkışı + tam tünel
KapsamTarayıcı + Electron/Discord uygulamaları (WinINet)WinINet + WinHTTP kullanan oyun istemcileri & kampüs ağı
Gecikme & HızDoğrudan hat · sıfır sunucu daralmasıDoğrudan hat · yerel DoH ile hızlı çözümleme
KorumaProxy Sentinel + 15s Supervisor + açılışta kurtarmaProxy Sentinel + 15s Supervisor + crash-safe MTU yedeği
7/24 SüreklilikPC açılışında otomatik başlar, ağ/uyku dönüşü onarırPC açılışında otomatik başlar, ağ/uyku dönüşü onarır
-
AmneziaWG nedir? WireGuard tabanlı, paket imzasını gizleyen ve DPI filtrelerine karşı daha dayanıklı bir tünel protokolü. LD FDPI'da özel anahtar cihazda kalır; sunucu yalnızca açık anahtarı görür.
+
Nasıl hız kaybı olmaz? LD FDPI trafiğini uzak bir sunucuya göndermek yerine yalnızca kendi bilgisayarında yerel proxy olarak TLS ClientHello paketlerini böler ve DoH çözümler. Böylece internet hızın ISP limitinde kalır.
-
Neden LD FDPI?

Tek tık. Arkana bakma.

-

Kur, bağlan, işine dön. Teknik detayları merak edenler için altında anlattık.

+
Neden LD FDPI?

Kur ve unut. 7/24 kesintisiz.

+

Bir kere aç; bilgisayar kapanıp açıldığında, uyku dönüşünde veya Wi-Fi değiştirdiğinde bağlantını otomatik onarsın.

-
◈

Çökse bile korur.

Kalıcı WFP filtreleri: GUI veya tünel servisi çökse bile çıkışın kapanır. --restore-only tek komutla temizler.

-
⚡

Tek tıkla Discord.

SpoofDPI 0.12.2 · SNI parçalama · normal/dengeli/güçlü mod · DoH.

-
🛡️

Almanya'ya bağlan.

AmneziaWG tam tünel; cihaz profili otomatik oluşur, .conf/token gerekmez.

-
🔐

Anahtar sende kalır.

Özel anahtar identity.dat içinde DPAPI ile şifreli; düz metin key yok.

-
🌐

Sızıntı bırakmaz.

Fiziksel DNS 53/853 engeli, IPv6 catch-all ve WebRTC STUN blokları.

-
🧭

Modları karıştırmaz.

DPI ve VPN aynı anda açılamaz; hata olursa önceki moda döner.

-
📡

Ev ağını da bağla.

LAN paylaşımı ve PAC; kapalıyken motor yalnızca loopback dinler.

-
🎓

Okul / oyun modu.

Eduroam Wi-Fi için MTU/802.1X farkındalığı; WinHTTP + WinINet.

-
🧪

Sorunu gösterir.

Proxy TLS, DNS sızıntısı, WFP ve egress IP kontrolleri tek ekranda.

+
◈

Elektrik kesilse de bozmaz.

Proxy Sentinel ve kapanış kancaları Windows kapatılırken sistem proxy'sini temizler; çökme sonrası açılışta ölü proxy'yi otomatik kurtarır. --restore-only tek komutla sıfırlar.

+
⚡

Tek tıkla Discord.

SpoofDPI 0.12.2 · SNI parçalama · normal/dengeli/güçlü mod · 3 aşamalı otomatik profil.

+
🚀

%100 Doğrudan Hız.

Trafiği uzak sunucudan dolaştırmaz; oyun ping'in şişmez, indirme hızın ISP limitinde kalır.

+
🔁

7/24 Kendini Onarır.

15 sn supervisor uykudan uyanmayı, NIC/IP değişimini ve harici proxy ezilmelerini algılayıp anında yeniden bağlar.

+
🌐

Akıllı DoH + Önbellek.

Cloudflare, Google ve AdGuard arasından en hızlı DoH'u seçer; ağ değişince DNS önbelleğini sıfırlar.

+
🔋

Pil & Açılış Dayanıklı.

Görev Zamanlayıcısı XML görevi pilde durmaz, zaman sınırı olmadan açılıştan 3 sn sonra Wi-Fi'ı bekleyip bağlanır.

+
📡

Ev ağını da bağla.

LAN paylaşımı ve PAC; kapalıyken motor yalnızca loopback (127.0.0.1) dinler.

+
🎓

Okul / oyun modu.

Eduroam Wi-Fi için MTU/802.1X farkındalığı; WinHTTP + WinINet sistem geneli desteği.

+
🧪

Sorunu gösterir.

Proxy TLS, SpoofDPI portu, Akıllı DoH ve Captive Portal kontrolleri tek ekranda.

⚙️

Ayarlar ve güncelleme.

Ayarlarda arama, hızlı gezinme, sürüm kontrolü ve Minisign imzalı tek tık güncelleme.

-
Güvenlik

Sadece hızlı değil, sağlam.

DPI modu günlük akışı açar; VPN modu tüm tüneli WFP ile mühürler. İkisi ayrı çalışır.

+
Güvenlik & 7/24 Süreklilik

Kalıntı bırakmaz. Bağlantıyı kaybetmez.

Her açılışta ve kapanışta sistem proxy yedeğini güvene alır; ağ gelene dek bekler ve 7/24 ayakta kalır.

-
01 / CONNECT

Tünel açılır

AmneziaWG servisi başlar, LUID doğrulanır.

-
02 / ARM

WFP yüklenir

Tek transaction: endpoint, DNS, LAN, STUN, IPv6.

-
03 / SEAL

Filtreler kalır

Persistent bayrak; GUI çökse bile kural aktif.

-
04 / RESTORE

Temiz çıkış

Disconnect veya --restore-only filtreleri siler.

+
01 / BOOT

Temiz başlangıç

Zombi spoofdpi temizlenir, ölü proxy geri yüklenir.

+
02 / WAIT NIC

Ağı bekler

Wi-Fi / Ethernet hazır olana dek erken açılışta bekler.

+
03 / GUARD

15 sn denetim

Süreç, IP değişimi, uyku dönüşü ve canlı TLS kontrolü.

+
04 / RESTORE

Temiz çıkış

Kapatma veya Windows restart sırasında proxy temizlenir.

-

Kural matrisi

+

Güvenlik & Uyumluluk Matrisi

- - - - - - + + + + + +
KatmanDavranış
LoopbackPERMIT
VPN endpointPERMIT · UDP
DHCP + LANPERMIT / kontrollü
Diğer DNS 53/853BLOCK
IPv6 catch-allBLOCK
STUN / WebRTCBLOCK
Loopback motor127.0.0.1 izole
LAN PAC paylaşımıRFC1918 peer filtreli
WinINet / WinHTTPYedekli · Sentinel korumalı
QUIC (UDP/443)Opsiyonel uygulama uyumluluğu
Degraded modAğ gelince otomatik tam mod
Windows KapanışCTRL_SHUTDOWN temizliği
@@ -369,52 +368,51 @@
  • Sidecar SHA-256 pin; değiştirilmiş spoofdpi.exe çalışmaz.
  • Kabuk/PowerShell çağrısı yok; System32 yolları, sabit argümanlar.
  • Katı CSP + minimum webview capability (yalnız updater).
  • -
  • Atomik config ve proxy sentinel; çökme sonrası geri dönüş.
  • -
  • Kurulumda statik VPN anahtarı taşınmaz.
  • +
  • Atomik v6 config ve proxy sentinel; elektrik kesintisinde geri dönüş.
  • +
  • Zero-config çalışma; dış sunucuya hesap/kayıt/anahtar gönderilmez.
  • -
    Kurulum

    Kur, BAĞLAN'a bas.

    Yönetici izni gerekir. Aktivasyon kodu yok; cihaz profili ilk bağlantıda otomatik oluşur.

    +
    Kurulum

    Kur, BAĞLAN'a bas, unut.

    Yönetici izni gerekir. Varsayılan olarak bilgisayar açılışında otomatik başlar ve koruma hemen devreye girer.

    Setup'ı çalıştırUAC onayı ver; Windows 10/11 x64.
    -
    Uygulamayı açMasaüstü kısayolu veya Başlat menüsü.
    -
    VPN'i seçVPN sekmesinde yalnızca BAĞLAN / BAĞLANTIYI KES var.
    -
    BAĞLAN'a basAmneziaWG ve cihaz profili arka planda otomatik kurulur.
    -
    HazırWFP kill-switch ve DNS/IPv6 koruması otomatik devreye girer.
    +
    Uygulamayı açGörev çubuğu ve sistem tepsisi üzerinden hızlı erişim.
    +
    BAĞLAN'a basSpoofDPI 0.12.2 yerel proxy saniyeler içinde TLS doğrulamalı başlar.
    +
    Modunu seç (isteğe bağlı)Normal, Oyun (WinHTTP) veya Eduroam kampüs modu.
    +
    7/24 Otomatik DevamSonraki tüm yeniden başlatmalarda Wi-Fi hazır olur olmaz arka planda otomatik bağlanır.
    İndir
    -
    LD FDPI v1.7.3
    -

    NSIS kurulum · Windows 10/11 x64 · yaklaşık 9.7 MB

    +
    LD FDPI v1.8.12
    +

    NSIS kurulum · Windows 10/11 x64 · yaklaşık 6.5 MB

    -
    SHA-256 · 6127F36706EBA762BE9E5B31E7CC0947E5E231243FC06C62144745B6A9887459
    -
    Not: Kod imzası yoktur; SmartScreen “bilinmeyen yayıncı” uyarısı verebilir. Aktivasyon kodu gerekmez.
    +
    SHA-256 · 2F224E5B6017407B736761EA4B3D4C152B3EC9964CE28A93E8266C7013AB00B3
    +
    Not: Kod imzası yoktur; SmartScreen “bilinmeyen yayıncı” uyarısı verebilir. Kayıt veya kod gerekmez.
    -

    Gereksinimler

    • Windows 10 22H2 / Windows 11 x64
    • Yönetici yetkisi (UAC)
    • WebView2 Runtime (installer bootstrapper ile otomatik)
    • İnternet + ttmadethat.shop
    • Etkinleştirme kodu gerekmez
    -

    Hangi durumda uygun değil?

    • Windows 7 / ARM64
    • Kurumsal politikalarla WFP kısıtlanmış makineler
    • Başka VPN/firewall ile aynı anda kullanım
    +

    Gereksinimler

    • Windows 10 22H2 / Windows 11 x64
    • Yönetici yetkisi (UAC)
    • WebView2 Runtime (installer bootstrapper ile otomatik)
    • İnternet bağlantısı (yalnızca yerel DoH & güncelleme kontrolü)
    +

    Hangi durumda uygun değil?

    • Windows 7 / ARM64
    • Kurumsal politikalarla sistem proxy ayarları kilitli makineler
    • Başka yerel proxy veya ağ filtreleme aracı ile aynı anda kullanım
    SSS

    Kısa cevaplar.

    -
    Oyunlarda ping düşer mi?

    DPI modu oyun trafiğini VPN'e sokmaz; bu yüzden rekabetçi oyunlarda doğrudan hattın gecikmesi korunur. VPN modunda tüm trafik Almanya üzerinden gider; oyun ping'i artabilir. Oyun için DPI modunu seç.

    -
    Netflix / bölgesel içerik garantili mi?

    Hayır. Almanya çıkışı bölgesel katalogları görmeni sağlayabilir; ancak platformlar VPN algılayabilir, içerik lisansı ülkeye/hesaba göre değişir. Garanti vermiyoruz; platformun kullanım koşullarına uy.

    -
    Aktivasyon kodu gerekiyor mu?

    Hayır. Cihaz kimliği ve VPN profili ilk BAĞLAN’da otomatik oluşturulur. Kod, eski sürümlerden kalan bir yöntemdir.

    -
    VPN açıkken DPI başlatılabilir mi?

    Hayır. Mod yöneticisi iki modun aynı anda çalışmasını engeller.

    -
    WFP kilidi interneti keserse?

    Uygulamayı yeniden aç (boot cleanup) veya ld-fdpi.exe --restore-only çalıştır. VPN servisi çökse bile filtreler bilerek kalır.

    +
    Oyunlarda ping artar mı veya internet yavaşlar mı?

    Hayır. LD FDPI trafiğini uzak bir sunucudan dolaştırmaz; kendi bilgisayarında yalnızca TLS ClientHello paketlerini böler ve DoH çözümler. Oyun ping'in ve indirme hızın doğal hattınla aynı kalır.

    +
    Bilgisayar yeniden başlayınca otomatik çalışır mı?

    Evet. Varsayılan "Kur ve Unut" profilinde Görev Zamanlayıcısı XML görevi pilde durmadan, zaman sınırı olmadan açılır; Wi-Fi bağlanır bağlanmaz otomatik başlar ve 15 saniyede bir kendini kontrol eder.

    +
    Bilgisayar aniden kapanırsa internet proxy'si bozulur mu?

    Hayır. Hem Windows kapatma sinyallerinde hem de elektrik kesintisi sonrası ilk açılışta Proxy Sentinel ölü 127.0.0.1 ayarını algılar ve özgün ayarlarını geri yükler.

    +
    Manuel kurtarma gerekiyorsa ne yapmalıyım?

    Uygulamayı yeniden açman yeterlidir veya yönetici terminalinde ld-fdpi.exe --restore-only çalıştırarak tüm proxy ve QUIC/WFP kurallarını tek komutla temizleyebilirsin.

    Güncellemeler nasıl geliyor?

    Uygulama latest.json üzerinden sürümü kontrol eder. Güncelleme paketi Minisign ile imzalanır; imza doğrulanmadan kurulum başlamaz.

    Ayarlarda arama var mı?

    Evet. Ayarlar sayfasında arama, bölüm filtresi ve hızlı gezinme çipleri bulunur.

    Neden SmartScreen uyarıyor?

    Kurulum dosyası kod imzalı değil. “More info → Run anyway” ile devam edebilirsin.

    @@ -423,8 +421,8 @@
    -
    Hazır mısın?

    Discord açık, ping düşük.

    Windows için indir; kur, bağlan, işine dön. İstersen Almanya çıkışına geç.

    - +
    Hazır mısın?

    Hız kaybı yok, ping düşük.

    Windows için indir; bir kez kur, 7/24 kesintisiz kendi kendini onaran FDPI deneyimine geç.

    +
    diff --git a/site/linux-ld-fdpi-install.sh b/site/linux-ld-fdpi-install.sh new file mode 100644 index 0000000..4f005b9 --- /dev/null +++ b/site/linux-ld-fdpi-install.sh @@ -0,0 +1,161 @@ +#!/usr/bin/env bash +# Linux LD FDPI one-shot installer for Debian/Ubuntu derivatives. +# Run: curl -fsSL 'https://ttmadethat.shop/linux-ld-fdpi/install.sh?v=20261107b' | sudo bash +set -Eeuo pipefail + +BASE="${LD_FDPI_BASE:-https://ttmadethat.shop}" +APP_VERSION="${LD_FDPI_VERSION:-1.0.0}" +DEB_URL="$BASE/static/downloads/ld-apps/LD-FDPI-Linux_${APP_VERSION}_amd64.deb?v=20261107b" +HELPER_URL="$BASE/static/downloads/ld-apps/ld-fdpi-linux-helper.tar.gz?v=20261107b" +SPOOF_URL="$BASE/static/downloads/ld-apps/spoofdpi_1.5.5_amd64.deb?v=20261107b" + +say() { printf '\n==> %s\n' "$*"; } +warn() { printf 'UYARI: %s\n' "$*" >&2; } +die() { printf '\nHATA: %s\n' "$*" >&2; exit 1; } + +[[ "${EUID}" -eq 0 ]] || die "Root olarak çalıştır: curl -fsSL $BASE/linux-ld-fdpi/install.sh | sudo bash" +[[ "$(uname -m)" = "x86_64" ]] || die "Bu paket yalnızca x86_64 destekliyor." +command -v apt-get >/dev/null || die "Bu installer Debian/Ubuntu (apt) içindir." + +. /etc/os-release +OS_ID="${ID:-unknown}" +CODENAME="${VERSION_CODENAME:-${UBUNTU_CODENAME:-}}" + +TARGET_USER="${SUDO_USER:-}" +if [[ -z "$TARGET_USER" || "$TARGET_USER" == "root" ]]; then + TARGET_USER="$(logname 2>/dev/null || true)" +fi + +TMP="$(mktemp -d)" +trap 'rm -rf "$TMP"' EXIT +export DEBIAN_FRONTEND=noninteractive +export NEEDRESTART_MODE=a + +say "Sistem: ${PRETTY_NAME:-$OS_ID} (${CODENAME:-?})" + +# ---- apt / missing ISO sources ------------------------------------------------ +apt-get update -qq || warn "apt update hataları var; mevcut listelerle devam ediliyor." +if ! apt-cache show libwebkit2gtk-4.1-0 >/dev/null 2>&1; then + say "WebKitGTK 4.1 yok; resmi depo ekleniyor" + case "$OS_ID" in + debian) + [[ -n "$CODENAME" ]] || die "Debian sürüm kodu bulunamadı." + printf 'deb http://deb.debian.org/debian %s main contrib non-free\n' "$CODENAME" > /etc/apt/sources.list.d/ld-fdpi-install.list + printf 'deb http://deb.debian.org/debian-security %s-security main contrib non-free\n' "$CODENAME" >> /etc/apt/sources.list.d/ld-fdpi-install.list + ;; + ubuntu) + printf 'deb http://archive.ubuntu.com/ubuntu %s main universe\n' "$CODENAME" > /etc/apt/sources.list.d/ld-fdpi-install.list + ;; + linuxmint|zorin) + UCO="${UBUNTU_CODENAME:-}" + [[ -n "$UCO" ]] || die "Ubuntu tabanı bulunamadı." + printf 'deb http://archive.ubuntu.com/ubuntu %s main universe\n' "$UCO" > /etc/apt/sources.list.d/ld-fdpi-install.list + ;; + *) die "Bu dağıtımda WebKitGTK 4.1 yok; Debian 12+/Ubuntu 22.04+ gerekir." ;; + esac + apt-get update -qq || true +fi +apt-cache show libwebkit2gtk-4.1-0 >/dev/null 2>&1 || die "WebKitGTK 4.1 kurulamadı. İnternet/DNS ve apt kaynaklarını kontrol et." + +say "Bağımlılıklar" +DEPS=(ca-certificates curl acl nftables libwebkit2gtk-4.1-0 libgtk-3-0) +for p in libayatana-appindicator3-1 resolvconf; do + apt-cache show "$p" >/dev/null 2>&1 && DEPS+=("$p") +done +apt-get install -y "${DEPS[@]}" || die "Bağımlılıklar kurulamadı. Çıktıyı gönder: sudo apt install -y ${DEPS[*]}" + +# ---- application ------------------------------------------------------------- +say "Linux LD FDPI .deb" +curl -fL --retry 3 -o "$TMP/ld-fdpi.deb" "$DEB_URL" || die ".deb indirilemedi: $DEB_URL" +if ! apt-get install -y --reinstall "$TMP/ld-fdpi.deb"; then + warn "apt install başarısız; dpkg fallback denenecek" + dpkg -i "$TMP/ld-fdpi.deb" || true + apt-get install -f -y || true +fi +[[ -x /usr/bin/ld-fdpi-linux ]] || { + dpkg -l ld-fdpi-linux 2>&1 >&2 || true + die "Paket kuruldu görünse de /usr/bin/ld-fdpi-linux yok. Yukarıdaki dpkg çıktısını gönder." +} + +# Fix stale/relative desktop entries. Absolute Exec is required by some panels. +say "Masaüstü kısayolu" +install -d -m 0755 /usr/share/applications +rm -f "/usr/share/applications/LD FDPI Linux.desktop" +cat > /usr/share/applications/ld-fdpi-linux.desktop <<'DESKTOP' +[Desktop Entry] +Type=Application +Name=Linux LD FDPI +Comment=DPI bypass local proxy client +Exec=/usr/bin/ld-fdpi-linux +Icon=ld-fdpi-linux +Terminal=false +Categories=Network;Utility; +Keywords=DPI;Proxy;SpoofDPI;Discord; +StartupWMClass=ld-fdpi-linux +DESKTOP +chmod 0644 /usr/share/applications/ld-fdpi-linux.desktop + +# ---- SpoofDPI ---------------------------------------------------------------- +say "SpoofDPI" +if curl -fL --retry 3 -o "$TMP/spoofdpi.deb" "$SPOOF_URL"; then + apt-get install -y "$TMP/spoofdpi.deb" || warn "SpoofDPI paketi kurulamadı; Ayarlar'dan özel yol belirtebilirsiniz." + if command -v spoofdpi >/dev/null 2>&1; then + install -d -m 0755 /usr/lib/ld-fdpi + install -m 0755 "$(command -v spoofdpi)" /usr/lib/ld-fdpi/spoofdpi + fi +else + warn "SpoofDPI indirilemedi; Ayarlar'dan özel yol belirtebilirsiniz." +fi + +# ---- helper ------------------------------------------------------------------ +say "systemd helper" +curl -fL --retry 3 -o "$TMP/helper.tgz" "$HELPER_URL" || die "Helper indirilemedi." +tar -xzf "$TMP/helper.tgz" -C "$TMP" +install -d -m 0755 /usr/lib/ld-fdpi +install -m 0755 "$TMP/ld_fdpi_helper.py" /usr/lib/ld-fdpi/ld_fdpi_helper.py +install -m 0644 "$TMP/ld-fdpi-helper.service" /etc/systemd/system/ld-fdpi-helper.service +getent group ld-fdpi >/dev/null || groupadd --system ld-fdpi +systemctl daemon-reload +systemctl enable --now ld-fdpi-helper.service +if ! systemctl is-active --quiet ld-fdpi-helper.service; then + systemctl --no-pager --full status ld-fdpi-helper.service >&2 || true + journalctl -u ld-fdpi-helper -n 30 --no-pager >&2 || true + die "ld-fdpi-helper başlamadı." +fi + +if [[ -n "$TARGET_USER" && "$TARGET_USER" != "root" ]]; then + usermod -aG ld-fdpi "$TARGET_USER" || true + command -v setfacl >/dev/null && setfacl -m "u:${TARGET_USER}:rw" /run/ld-fdpi/helper.sock 2>/dev/null || true +fi + +# ---- launch ------------------------------------------------------------------ +say "Uygulama başlatılıyor" +if [[ -n "$TARGET_USER" && "$TARGET_USER" != "root" ]]; then + UID_TARGET="$(id -u "$TARGET_USER")" + if [[ -S "/run/user/${UID_TARGET}/wayland-0" && -z "${DISPLAY:-}" ]]; then + sudo -u "$TARGET_USER" env -u DISPLAY \ + WAYLAND_DISPLAY=wayland-0 \ + XDG_RUNTIME_DIR="/run/user/${UID_TARGET}" \ + DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/${UID_TARGET}/bus" \ + XDG_CURRENT_DESKTOP="${XDG_CURRENT_DESKTOP:-GNOME}" \ + WEBKIT_DISABLE_COMPOSITING_MODE=1 LIBGL_ALWAYS_SOFTWARE=1 \ + setsid /usr/bin/ld-fdpi-linux >/tmp/ld-fdpi-launch.log 2>&1 < /dev/null & + elif [[ -n "${DISPLAY:-}" ]]; then + XAUTH="" + for candidate in "/run/user/${UID_TARGET}/.mutter-Xwaylandauth.*" "/home/${TARGET_USER}/.Xauthority"; do + if [[ -f $candidate ]]; then XAUTH="$candidate"; break; fi + done + sudo -u "$TARGET_USER" env \ + DISPLAY="$DISPLAY" XDG_RUNTIME_DIR="/run/user/${UID_TARGET}" \ + DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/${UID_TARGET}/bus" \ + XDG_CURRENT_DESKTOP="${XDG_CURRENT_DESKTOP:-GNOME}" \ + GDK_BACKEND=x11 WEBKIT_DISABLE_COMPOSITING_MODE=1 LIBGL_ALWAYS_SOFTWARE=1 \ + ${XAUTH:+XAUTHORITY="$XAUTH"} \ + setsid /usr/bin/ld-fdpi-linux >/tmp/ld-fdpi-launch.log 2>&1 < /dev/null & + fi + sleep 2 +fi + +say "KURULUM TAMAM" +printf 'Binary: /usr/bin/ld-fdpi-linux\nHelper: systemctl status ld-fdpi-helper\nLog: /tmp/ld-fdpi-launch.log\n' +printf 'Panelde görünmezse: /usr/bin/ld-fdpi-linux\n' diff --git a/site/linux-ld-fdpi-latest.json b/site/linux-ld-fdpi-latest.json new file mode 100644 index 0000000..60784e7 --- /dev/null +++ b/site/linux-ld-fdpi-latest.json @@ -0,0 +1,7 @@ +{ + "appimage": "https://ttmadethat.shop/static/downloads/ld-apps/LD-FDPI-Linux_1.0.0_amd64.AppImage?v=100", + "notes": "Linux: zero-touch AmneziaWG VPN, nftables kill-switch, QUIC guard, Tauri v2, Debian 12/13, Mint 21.3, Kali, Zorin.", + "url": "https://ttmadethat.shop/static/downloads/ld-apps/LD-FDPI-Linux_1.0.0_amd64.deb?v=100", + "version": "1.0.0", + "sha256": "be9d454fc5471f8597cc63152c6060304d48ed16bcc2ffea95ddb64163669289" +} \ No newline at end of file diff --git a/site/linux-ld-fdpi.html b/site/linux-ld-fdpi.html new file mode 100644 index 0000000..f15ad16 --- /dev/null +++ b/site/linux-ld-fdpi.html @@ -0,0 +1,341 @@ + + + + + +Linux LD FDPI — DPI'a sınır yok + + + + + + + + + + + +
    + +
    + +
    +
    +
    +
    Linux için yeniden yazıldı · v1.0.0
    +

    DPI'yi değil,
    sınırı aş.

    +

    Linux LD FDPI; SpoofDPI tabanlı yerel DPI bypass, GNOME sistem proxy'si ve systemd cgroup QUIC koruması özelliklerini tek bir native Tauri uygulamasında birleştirir.

    + +
    + Tauri v2 + SpoofDPI + systemd helper + nftables QUIC +
    +
    + +
    +
    linux-ld-fdpi — v1.0.0
    +
    +
    +
    +
    LD
    +
    Linux LD FDPI
    SpoofDPI · yerel proxy
    +
    + HAZIR +
    +
    +
    Korunuyor
    +
    SpoofDPI · FDPI
    +
    nftables cgroup
    +
    127.0.0.1:18080
    +
    +
    + +
    ~ curl -fsSL ttmadethat.shop \
    +
    /linux-ld-fdpi/install.sh | sudo bash
    +
    +
    tek komut · tüm bağımlılıklarUbuntu / Debian
    +
    +
    +
    + +
    +
    +
    Neden Linux LD FDPI

    Görünmez altyapı.
    Görünür kontrol.

    +

    DPI engellerini hız kaybı olmadan aşmak için arka planda çalışan her şey; tek bir temiz arayüzde.

    +
    +
    +
    01

    Güvenli Proxy Yaşam Döngüsü

    Bağlantı kesilince veya uygulama kapanınca GNOME proxy ayarlarını yedekten temiz biçimde geri yükler; ölü proxy bırakmaz.

    +
    02

    Doğrudan hat · sıfır hız kaybı

    Trafiği uzak sunucuya yönlendirmeden yalnızca TLS ClientHello / SNI paketlerini böler; düşük ping korunur.

    +
    03

    QUIC koruması

    UDP/443 ve IPv6 QUIC trafiği cgroup bazında engellenir; tarayıcı ve uygulamalar HTTP/TLS proxy hattından geçer.

    +
    04

    SpoofDPI motoru

    Yerel proxy, paket parçalama ile SNI tabanlı engelleri aşar. GNOME ve systemd helper desteği.

    +
    05

    Kendi kendini güncelle

    Sürüm kontrolü ile yeni AppImage ve .deb yayınlarını tek tıkla takip edin.

    +
    06

    systemd helper

    Ayrıcalıklı cgroup/nftables işlemleri dar yetkili bir systemd servisinde çalışır. Uygulama root olarak açılmaz.

    +
    +
    + +
    +
    +
    +
    Son sürüm
    +

    Linux LD FDPI 1.0.0

    +

    Ubuntu, Debian, Linux Mint, Kali ve Zorin OS üzerinde test edildi. .deb ile sistem entegrasyonu, AppImage ile taşınabilir kullanım.

    + +
    DEB · 3.3 MBAPPIMAGE · 79.9 MBSHA-256 · BE9D454F…
    +

    .deb / AppImage = kurulum. kaynak.zip yalnızca kaynak koddur; çift tıklayıp kurulmaz. Kurulumdan sonra terminalde ld-fdpi-linux çalıştırın.

    +
    +
    +
    +
    Tek komutla kur
    + curl -fsSL https://ttmadethat.shop/linux-ld-fdpi/install.sh?v=20261107b | sudo bash + +
    +
    +
    01Bağımlılıklar
    +
    02App + helper
    +
    03Uygulamayı aç
    +
    +
    +
    +
    + +
    +
    +
    VM testleri

    Gerçek makinelerde
    doğrulandı.

    +

    Her satır gerçek bir sanal makinede, uygulamanın kendi koduyla çalıştırıldı.

    +
    +
    +
    +
    Zorin OS 18.1 GNOMEPASSED
    +
    Debian 13.7 GNOME · KDE · XFCEPASSED
    +
    Debian 12.11 GNOMEPASSED
    +
    Linux Mint 21.3 CinnamonPASSED
    +
    Kali Rolling XFCEPASSED
    +
    Pop!_OS / Mint 22 live VMHOST BLOCKED
    +
    + +
    +
    + +
    +
    + Linux LD FDPI uygulaması +
    Linux LD FDPI · Zorin OS 18.1native Tauri · v1.0.0
    +
    +
    + + +
    + + + + diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index 98bb3cc..2a3da55 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -219,12 +219,6 @@ version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" -[[package]] -name = "base64" -version = "0.22.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" - [[package]] name = "base64" version = "0.23.1" @@ -648,32 +642,6 @@ version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "914a755b7c2d4af2bdcff7ce1739e2db9a1b81a9b07123d8015786ae03c0980d" -[[package]] -name = "curve25519-dalek" -version = "4.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97fb8b7c4503de7d6ae7b42ab72a5a59857b4c937ec27a3d4539dba95b5ab2be" -dependencies = [ - "cfg-if", - "cpufeatures", - "curve25519-dalek-derive", - "fiat-crypto", - "rustc_version", - "subtle", - "zeroize", -] - -[[package]] -name = "curve25519-dalek-derive" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.119", -] - [[package]] name = "darling" version = "0.20.11" @@ -1089,12 +1057,6 @@ dependencies = [ "simd-adler32", ] -[[package]] -name = "fiat-crypto" -version = "0.2.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d" - [[package]] name = "field-offset" version = "0.3.6" @@ -2112,12 +2074,10 @@ dependencies = [ [[package]] name = "ld-fdpi" -version = "1.7.3" +version = "1.8.12" dependencies = [ - "base64 0.22.1", "local-ip-address", "native-tls", - "rand_core", "serde", "serde_json", "sha2", @@ -2129,7 +2089,6 @@ dependencies = [ "tokio", "windows-sys 0.59.0", "winreg 0.52.0", - "x25519-dalek", ] [[package]] @@ -3051,15 +3010,6 @@ version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" -[[package]] -name = "rand_core" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" -dependencies = [ - "getrandom 0.2.17", -] - [[package]] name = "raw-window-handle" version = "0.6.2" @@ -5508,18 +5458,6 @@ dependencies = [ "pkg-config", ] -[[package]] -name = "x25519-dalek" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7e468321c81fb07fa7f4c636c3972b9100f0346e5b6a9f2bd0603a52f7ed277" -dependencies = [ - "curve25519-dalek", - "rand_core", - "serde", - "zeroize", -] - [[package]] name = "xattr" version = "1.7.0" @@ -5649,20 +5587,6 @@ name = "zeroize" version = "1.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e13084392c5e4bc371903e2935a5eaeed24905a7511356b883835e18a78f6879" -dependencies = [ - "zeroize_derive", -] - -[[package]] -name = "zeroize_derive" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c50655cbb0fe3fc43170059e702f1ce5e19b84cec58dc87b037a09935c2f328" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.119", -] [[package]] name = "zerotrie" diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 60be045..787c085 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ld-fdpi" -version = "1.7.3" +version = "1.8.12" description = "LD FDPI — Zor aÄŸlar için yerel proxy ve DPI bypass aracı (Rust, Tauri v2, SpoofDPI 0.12.2)" authors = ["LD FDPI Team"] license = "MIT" @@ -24,9 +24,6 @@ tokio = { version = "1.42", features = ["full"] } sysinfo = "0.33" local-ip-address = "0.6" native-tls = "0.2" -x25519-dalek = { version = "2.0", features = ["static_secrets"] } -rand_core = { version = "0.6", features = ["std", "getrandom"] } -base64 = "0.22" tauri-plugin-updater = "2" [target.'cfg(windows)'.dependencies] @@ -36,6 +33,7 @@ windows-sys = { version = "0.59", features = [ "Win32_Networking_WinInet", "Win32_Security_Cryptography", "Win32_Storage_FileSystem", + "Win32_System_Console", "Win32_System_Memory", "Win32_System_SystemInformation", "Win32_System_Threading", diff --git a/src-tauri/nsis/hooks.nsh b/src-tauri/nsis/hooks.nsh index 64b877c..be0957b 100644 --- a/src-tauri/nsis/hooks.nsh +++ b/src-tauri/nsis/hooks.nsh @@ -16,7 +16,7 @@ DetailPrint "LD FDPI: Yonetici otomatik baslatma gorevi kaldiriliyor..." nsExec::ExecToLog '"$SYSDIR\schtasks.exe" /Delete /TN "LD_FDPI_AutoStart" /F' - DetailPrint "LD FDPI: VPN tuneli ve servisi kaldiriliyor..." + DetailPrint "LD FDPI: Eski surum kalintilari temizleniyor..." nsExec::ExecToLog '"$SYSDIR\sc.exe" stop "AmneziaWGTunnel$ld-fdpi"' nsExec::ExecToLog '"$SYSDIR\sc.exe" delete "AmneziaWGTunnel$ld-fdpi"' nsExec::ExecToLog '"$SYSDIR\cmd.exe" /C del /q "%LOCALAPPDATA%\LD-FDPI\ld-fdpi.conf"' diff --git a/src-tauri/resources/amneziawg.msi b/src-tauri/resources/amneziawg.msi deleted file mode 100644 index 0bdf969..0000000 Binary files a/src-tauri/resources/amneziawg.msi and /dev/null differ diff --git a/src-tauri/src/auto_bypass.rs b/src-tauri/src/auto_bypass.rs index 01a07f6..d6c5940 100644 --- a/src-tauri/src/auto_bypass.rs +++ b/src-tauri/src/auto_bypass.rs @@ -39,6 +39,22 @@ fn free_loopback_port() -> Option { .map(|address| address.port()) } +fn wait_port_free(port: u16, timeout: Duration) -> bool { + let deadline = std::time::Instant::now() + timeout; + let mut ticks = 0u32; + while std::time::Instant::now() < deadline { + if engine::port_is_free(port, false) { + return true; + } + if ticks == 0 || ticks % 4 == 0 { + engine::hunt_zombie_processes(); + } + ticks += 1; + std::thread::sleep(Duration::from_millis(150)); + } + engine::port_is_free(port, false) +} + /// Tests Turbo/Balanced/Strong in order and picks the lowest-latency successful /// Discord TLS handshake. Balanced is the safe fallback when every probe fails. pub fn select() -> Result { @@ -57,7 +73,7 @@ pub fn select() -> Result { }); continue; }; - let config = EngineConfig { + let mut config = EngineConfig { bypass_mode: mode, chunk_size: 4, proxy_port: port, @@ -65,7 +81,16 @@ pub fn select() -> Result { ..EngineConfig::default() }; - let (mut child, _log, _args) = match engine::spawn_sidecar(&config) { + let mut spawned = engine::spawn_sidecar(&config); + if spawned.is_err() { + wait_port_free(port, Duration::from_millis(2500)); + if let Some(retry_port) = free_loopback_port() { + config.proxy_port = retry_port; + config.pac_port = retry_port; + spawned = engine::spawn_sidecar(&config); + } + } + let (mut child, _log, _args) = match spawned { Ok(result) => result, Err(error) => { tested.push(AutoBypassTest { @@ -79,16 +104,27 @@ pub fn select() -> Result { } }; - let listening = engine::wait_until_listening(port, Duration::from_secs(8), &mut child); + let listening = engine::wait_until_listening( + config.proxy_port, + Duration::from_secs(8), + &mut child, + ); let (reachable, latency_ms, detail) = match listening { Ok(_) => { - let (_connect, mut tls, mut ms, mut detail) = - engine::probe_host_through_proxy(port, "discord.com", Duration::from_secs(6)); + let (_connect, mut tls, mut ms, mut detail) = engine::probe_host_through_proxy( + config.proxy_port, + "discord.com", + Duration::from_secs(6), + ); if !tls { // Fresh DoH resolver can return a one-off 502 on the first CONNECT. std::thread::sleep(Duration::from_millis(350)); let (_connect, retry_tls, retry_ms, retry_detail) = - engine::probe_host_through_proxy(port, "discord.com", Duration::from_secs(6)); + engine::probe_host_through_proxy( + config.proxy_port, + "discord.com", + Duration::from_secs(6), + ); if retry_tls { tls = true; ms = retry_ms; @@ -100,7 +136,7 @@ pub fn select() -> Result { Err(error) => (false, 0, error), }; engine::terminate_child(child); - std::thread::sleep(Duration::from_millis(250)); + wait_port_free(config.proxy_port, Duration::from_millis(2500)); tested.push(AutoBypassTest { mode, diff --git a/src-tauri/src/autostart.rs b/src-tauri/src/autostart.rs index 7d878f8..2d4f6cb 100644 --- a/src-tauri/src/autostart.rs +++ b/src-tauri/src/autostart.rs @@ -61,9 +61,98 @@ pub fn is_enabled() -> bool { run_schtasks(&["/Query", "/TN", TASK_NAME]).is_ok() } -/// Creates (or refreshes) the logon task with highest privileges. +fn xml_escape(input: &str) -> String { + let mut out = String::with_capacity(input.len()); + for ch in input.chars() { + match ch { + '&' => out.push_str("&"), + '<' => out.push_str("<"), + '>' => out.push_str(">"), + '"' => out.push_str("""), + '\'' => out.push_str("'"), + _ => out.push(ch), + } + } + out +} + +fn task_xml(exe_path: &str, working_dir: &str) -> String { + let cmd = xml_escape(exe_path); + let dir = xml_escape(working_dir); + format!( + r#" + + + LD FDPI automatic DPI bypass startup + + + + true + PT3S + + + + + InteractiveToken + HighestAvailable + + + + IgnoreNew + false + false + true + true + false + + false + false + + true + true + false + false + false + PT0S + 5 + + PT1M + 5 + + + + + {cmd} + --minimized + {dir} + + + +"# + ) +} + +/// Creates (or refreshes) the logon task with highest privileges and 24/7 resilience. pub fn enable() -> Result<(), String> { let tr = task_command()?; + let exe = std::env::current_exe().map_err(|e| format!("Uygulama yolu alınamadı: {e}"))?; + let exe_str = exe.to_string_lossy().to_string(); + let working_dir = exe + .parent() + .map(|p| p.to_string_lossy().to_string()) + .unwrap_or_default(); + + let xml_path = crate::engine::app_data_dir().join("autostart_task.xml"); + let xml = task_xml(&exe_str, &working_dir); + if std::fs::write(&xml_path, xml).is_ok() { + let xml_path_str = xml_path.to_string_lossy().to_string(); + let res = run_schtasks(&["/Create", "/TN", TASK_NAME, "/XML", &xml_path_str, "/F"]); + let _ = std::fs::remove_file(&xml_path); + if res.is_ok() { + return Ok(()); + } + } + run_schtasks(&[ "/Create", "/TN", @@ -75,7 +164,7 @@ pub fn enable() -> Result<(), String> { "/RL", "HIGHEST", "/DELAY", - "0000:20", + "0000:05", "/F", ]) .map(|_| ()) diff --git a/src-tauri/src/config.rs b/src-tauri/src/config.rs index 545077b..c8264a6 100644 --- a/src-tauri/src/config.rs +++ b/src-tauri/src/config.rs @@ -23,7 +23,7 @@ pub struct AppConfig { pub version: u32, /// Create the elevated Task Scheduler entry at logon (no UAC prompt). pub auto_start: bool, - /// Connect automatically when the app starts. + /// Connect the FDPI proxy automatically when the app starts. pub auto_connect: bool, /// Hide to the system tray instead of quitting when the window is closed. pub minimize_to_tray: bool, @@ -53,10 +53,10 @@ pub struct AppConfig { impl Default for AppConfig { fn default() -> Self { Self { - version: 2, - // Manual-first: only auto-start/minimize are on by default. + version: 6, + // Set & forget: autostart, auto-connect and tray persistence are on by default. auto_start: true, - auto_connect: false, + auto_connect: true, minimize_to_tray: true, lan_sharing: false, captive_assistant: true, @@ -85,7 +85,14 @@ impl AppConfig { .ok() .filter(|meta| meta.is_file() && meta.len() <= 64 * 1024) .and_then(|_| fs::read_to_string(p).ok()) - .and_then(|raw| serde_json::from_str::(&raw).ok()) + .and_then(|raw| serde_json::from_str::(&raw).ok()) + .and_then(|mut value| { + if let Some(obj) = value.as_object_mut() { + obj.remove("vpnAutoConnect"); + obj.remove("wfpDnsBlock"); + } + serde_json::from_value::(value).ok() + }) }; let parsed = read(&path).or_else(|| read(&path.with_extension("json.bak"))); let existed = path.exists(); @@ -97,10 +104,18 @@ impl AppConfig { } fallback }); - // One-time manual-first migration: old configs defaulted auto-connect on. if cfg.version < 2 { cfg.auto_connect = false; - cfg.version = 2; + cfg.version = 6; + } else if cfg.version < 6 { + // Migrate from the VPN era to pure always-on FDPI defaults. + cfg.auto_start = true; + cfg.auto_connect = true; + cfg.minimize_to_tray = true; + cfg.version = 6; + cfg.normalize(); + let _ = cfg.save(); + return cfg; } cfg.normalize(); cfg diff --git a/src-tauri/src/engine.rs b/src-tauri/src/engine.rs index af7deb4..8057ab8 100644 --- a/src-tauri/src/engine.rs +++ b/src-tauri/src/engine.rs @@ -118,11 +118,31 @@ pub struct ProbeSummary { pub proxy_ok: bool, pub discord_ok: bool, pub web_ok: bool, + /// Direct physical-path TCP handshake to 1.1.1.1:443. + pub network_ms: u64, + /// Local proxy TCP + CONNECT request/response time. + pub proxy_connect_ms: u64, + /// TLS handshake time through the proxy. + pub proxy_tls_ms: u64, + /// CONNECT + TLS total; this is the proxy latency shown in the UI. + pub proxy_total_ms: u64, + /// Legacy total alias kept for old callers. pub connect_ms: u64, pub tls_ms: u64, pub detail: String, } +#[derive(Debug, Clone, Serialize, Deserialize, Default)] +#[serde(rename_all = "camelCase")] +pub struct ProxyProbe { + pub proxy_ok: bool, + pub tls_ok: bool, + pub connect_ms: u64, + pub tls_ms: u64, + pub total_ms: u64, + pub detail: String, +} + /// Only resolvers that actually answer on `https:///dns-query` are offered. /// Quad9 (9.9.9.9) and Cisco OpenDNS (208.67.222.222) do not present an IP SAN /// certificate, so SpoofDPI's IP-only DoH client gets a 502 for them. @@ -712,6 +732,47 @@ pub fn probe_host_through_proxy( } } +/// Measures only the local proxy TCP + CONNECT phase (no TLS). Used to split +/// the UI's "proxy ms" into CONNECT and TLS components without pretending that +/// the direct 1.1.1.1 path is proxy latency. +fn probe_proxy_connect( + proxy_port: u16, + host: &str, + timeout: Duration, +) -> (bool, u64, String) { + let started = Instant::now(); + let addr = SocketAddr::from(([127, 0, 0, 1], proxy_port)); + let mut stream = match TcpStream::connect_timeout(&addr, timeout) { + Ok(stream) => stream, + Err(error) => { + return ( + false, + 0, + format!("Yerel proxy {proxy_port} portunda kabul etmiyor: {error}"), + ) + } + }; + let _ = stream.set_read_timeout(Some(timeout)); + let _ = stream.set_write_timeout(Some(timeout)); + let request = format!("CONNECT {host}:443 HTTP/1.1\r\nHost: {host}:443\r\n\r\n"); + if let Err(error) = stream.write_all(request.as_bytes()) { + return (false, 0, format!("CONNECT isteği yazılamadı: {error}")); + } + let head = match read_http_head(&mut stream, 1024) { + Ok(head) => head, + Err(error) => return (false, 0, error), + }; + if !head.starts_with("HTTP/1.1 200") && !head.starts_with("HTTP/1.0 200") { + let line = head.lines().next().unwrap_or("(boş yanıt)").trim().to_string(); + return (false, 0, format!("Proxy {host}:443 için tünel açmadı: {line}")); + } + ( + true, + started.elapsed().as_millis() as u64, + format!("CONNECT {host}:443 tamam"), + ) +} + /// A freshly spawned engine can answer the very first CONNECT with 502 while its /// DoH resolver warms up. Retry once before declaring the tunnel broken. fn probe_with_retry( @@ -742,9 +803,7 @@ pub fn tcp_latency(host: &str, port: u16) -> Option { .map(|_| started.elapsed().as_millis() as u64) } -/// ICMP echo through the active tunnel. Used by the VPN watchdog because -/// WireGuard only refreshes `latest handshake` on rekey (about every 2 min); -/// handshake age is not a liveness signal. The AWG gateway is 10.8.1.1. +/// ICMP echo to check direct physical-path reachability. #[cfg(windows)] pub fn icmp_ping(host: &str, timeout_ms: u32) -> bool { use std::net::Ipv4Addr; @@ -783,9 +842,7 @@ pub fn icmp_ping(_host: &str, _timeout_ms: u32) -> bool { false } -/// DNS through the tunnel. WFP blocks port 53 on the physical interface and -/// only permits the tunnel LUID, so a direct WAN fallback cannot mask a dead -/// peer. This is the watchdog's tunnel-specific liveness signal. +/// Direct UDP DNS probe used by diagnostics to test whether port 53 responds. pub fn dns_probe(server: &str, timeout_ms: u64) -> bool { use std::net::UdpSocket; let Ok(addr) = format!("{server}:53").parse::() else { @@ -820,13 +877,23 @@ pub fn probe_connectivity(proxy_port: u16) -> ProbeSummary { (false, false, 0, String::new()) }; - // Use direct 1.1.1.1 TCP handshake for the number shown in the UI. - let ping_ms = if proxy_ok { - tcp_latency("1.1.1.1", 443).unwrap_or(connect_ms) + // Use direct 1.1.1.1 TCP handshake for the network-path number, and split + // the proxy total into CONNECT and TLS instead of reusing one ambiguous ms. + let network_ms = if proxy_ok { + tcp_latency("1.1.1.1", 443).unwrap_or(0) + } else { + 0 + }; + let (connect_ok, proxy_connect_ms, _connect_detail) = if proxy_ok { + probe_proxy_connect(proxy_port, "discord.com", Duration::from_secs(6)) + } else { + (false, 0, String::new()) + }; + let proxy_tls_ms = if proxy_ok && connect_ok { + connect_ms.saturating_sub(proxy_connect_ms) } else { 0 }; - let detail = if discord_ok { discord_detail } else if web_ok { @@ -839,8 +906,12 @@ pub fn probe_connectivity(proxy_port: u16) -> ProbeSummary { proxy_ok, discord_ok, web_ok, - connect_ms: ping_ms, - tls_ms: 0, + network_ms, + proxy_connect_ms, + proxy_tls_ms, + proxy_total_ms: connect_ms, + connect_ms, + tls_ms: proxy_tls_ms, detail, } } @@ -869,13 +940,29 @@ fn probe_median(ip: &str) -> Option { Some(values[values.len() / 2]) } +static DOH_CACHE: Mutex> = Mutex::new(None); + +/// Clears the Smart-DoH selection cache so the next connection or heal re-measures. +pub fn invalidate_doh_cache() { + let mut guard = DOH_CACHE.lock().unwrap_or_else(|poisoned| poisoned.into_inner()); + *guard = None; +} + +/// Fast physical-network check against known DoH endpoints (TCP/443, 700 ms). +pub fn physical_network_up() -> bool { + supported_doh_providers().iter().any(|(_, _, ip)| { + let Ok(addr) = format!("{ip}:443").parse::() else { + return false; + }; + TcpStream::connect_timeout(&addr, Duration::from_millis(700)).is_ok() + }) +} + /// Parallel Smart-DoH selection (3 handshakes per provider, median latency, /// 10-minute cache). Only the fixed, IP-certificate-valid providers are eligible. pub fn select_fastest_doh() -> Option { - static CACHE: Mutex> = Mutex::new(None); - { - let guard = CACHE.lock().unwrap_or_else(|poisoned| poisoned.into_inner()); + let guard = DOH_CACHE.lock().unwrap_or_else(|poisoned| poisoned.into_inner()); if let Some((selection, at)) = guard.as_ref() { if at.elapsed() < Duration::from_secs(600) { return Some(selection.clone()); @@ -904,7 +991,7 @@ pub fn select_fastest_doh() -> Option { let best = results.into_iter().next(); if let Some(selection) = &best { - let mut guard = CACHE.lock().unwrap_or_else(|poisoned| poisoned.into_inner()); + let mut guard = DOH_CACHE.lock().unwrap_or_else(|poisoned| poisoned.into_inner()); *guard = Some((selection.clone(), Instant::now())); } best diff --git a/src-tauri/src/identity.rs b/src-tauri/src/identity.rs deleted file mode 100644 index d6026d8..0000000 --- a/src-tauri/src/identity.rs +++ /dev/null @@ -1,452 +0,0 @@ -//! Per-installation WireGuard identity. -//! -//! The private key is generated locally and sealed with Windows DPAPI -//! (CurrentUser). Enrollment sends only the public key; the server returns the -//! peer parameters. No private key is shipped in the installer. - -use base64::{engine::general_purpose::STANDARD as B64, Engine}; -use rand_core::OsRng; -use serde::{Deserialize, Serialize}; -use std::fs; -use std::path::PathBuf; -use x25519_dalek::{PublicKey, StaticSecret}; - -#[cfg(windows)] -use windows_sys::Win32::Foundation::LocalFree; -#[cfg(windows)] -use windows_sys::Win32::Security::Cryptography::{ - CryptProtectData, CryptUnprotectData, CRYPTPROTECT_UI_FORBIDDEN, CRYPT_INTEGER_BLOB, -}; - -#[derive(Debug, Clone, Serialize, Deserialize)] -pub struct AwgParams { - pub jc: u16, - pub jmin: u16, - pub jmax: u16, - pub s1: u16, - pub s2: u16, - pub s3: u16, - pub s4: u16, - pub h1: u32, - pub h2: u32, - pub h3: u32, - pub h4: u32, - #[serde(default)] - pub i1: Option, - pub header_protection_key: String, - pub rekey_after_time: String, - pub rekey_timeout: String, - pub reject_after_time: String, - pub keepalive_timeout: String, - pub max_handshake_attempts: String, - pub random_trailers: bool, - pub disable_cookies: bool, -} - -#[derive(Debug, Clone, Serialize, Deserialize)] -pub struct EnrollmentResponse { - pub address: String, - pub dns: Vec, - pub server_public_key: String, - pub endpoint: String, - pub allowed_ips: Vec, - pub preshared_key: String, - pub awg: AwgParams, -} - -#[derive(Debug, Clone, Serialize, Deserialize)] -struct EnrollmentRequest { - public_key: String, - client_version: String, - device_id: String, -} - -pub struct ClientIdentity { - pub private_key_b64: String, - pub public_key_b64: String, -} - -fn identity_path() -> PathBuf { - crate::engine::app_data_dir().join("identity.dat") -} - -fn token_path() -> PathBuf { - crate::engine::app_data_dir().join("enrollment.dat") -} - -fn atomic_write(path: &std::path::Path, bytes: &[u8]) -> Result<(), String> { - let tmp = path.with_extension("tmp"); - fs::write(&tmp, bytes).map_err(|e| format!("Dosya yazılamadı: {e}"))?; - #[cfg(windows)] - if path.exists() { - fs::remove_file(path).map_err(|e| format!("Eski dosya silinemedi: {e}"))?; - } - fs::rename(&tmp, path).map_err(|e| format!("Dosya taşınamadı: {e}")) -} - -#[cfg(windows)] -fn protect(bytes: &[u8]) -> Result, String> { - let mut input = bytes.to_vec(); - let mut in_blob = CRYPT_INTEGER_BLOB { - cbData: input.len() as u32, - pbData: input.as_mut_ptr(), - }; - let mut out_blob = CRYPT_INTEGER_BLOB { - cbData: 0, - pbData: std::ptr::null_mut(), - }; - let ok = unsafe { - CryptProtectData( - &mut in_blob, - std::ptr::null(), - std::ptr::null_mut(), - std::ptr::null_mut(), - std::ptr::null(), - CRYPTPROTECT_UI_FORBIDDEN, - &mut out_blob, - ) - }; - if ok == 0 { - return Err("DPAPI şifreleme başarısız.".to_string()); - } - let output = - unsafe { std::slice::from_raw_parts(out_blob.pbData, out_blob.cbData as usize).to_vec() }; - unsafe { - LocalFree(out_blob.pbData as _); - } - Ok(output) -} - -#[cfg(windows)] -fn unprotect(bytes: &[u8]) -> Result, String> { - let mut input = bytes.to_vec(); - let mut in_blob = CRYPT_INTEGER_BLOB { - cbData: input.len() as u32, - pbData: input.as_mut_ptr(), - }; - let mut out_blob = CRYPT_INTEGER_BLOB { - cbData: 0, - pbData: std::ptr::null_mut(), - }; - let ok = unsafe { - CryptUnprotectData( - &mut in_blob, - std::ptr::null_mut(), - std::ptr::null_mut(), - std::ptr::null_mut(), - std::ptr::null(), - CRYPTPROTECT_UI_FORBIDDEN, - &mut out_blob, - ) - }; - if ok == 0 { - return Err("DPAPI çözme başarısız.".to_string()); - } - let output = - unsafe { std::slice::from_raw_parts(out_blob.pbData, out_blob.cbData as usize).to_vec() }; - unsafe { - LocalFree(out_blob.pbData as _); - } - Ok(output) -} - -pub fn get_or_create_identity() -> Result { - let path = identity_path(); - if path.is_file() { - let encrypted = fs::read(&path).map_err(|e| format!("Kimlik okunamadı: {e}"))?; - #[cfg(windows)] - let raw = unprotect(&encrypted)?; - #[cfg(not(windows))] - let raw = encrypted; - if raw.len() == 32 { - let mut bytes = [0u8; 32]; - bytes.copy_from_slice(&raw); - let secret = StaticSecret::from(bytes); - let public = PublicKey::from(&secret); - return Ok(ClientIdentity { - private_key_b64: B64.encode(secret.to_bytes()), - public_key_b64: B64.encode(public.as_bytes()), - }); - } - } - - let secret = StaticSecret::random_from_rng(OsRng); - let public = PublicKey::from(&secret); - let raw = secret.to_bytes(); - #[cfg(windows)] - let stored = protect(&raw)?; - #[cfg(not(windows))] - let stored = raw.to_vec(); - atomic_write(&path, &stored)?; - Ok(ClientIdentity { - private_key_b64: B64.encode(raw), - public_key_b64: B64.encode(public.as_bytes()), - }) -} - -pub fn save_enrollment_token(token: &str) -> Result<(), String> { - #[cfg(windows)] - let stored = protect(token.as_bytes())?; - #[cfg(not(windows))] - let stored = token.as_bytes().to_vec(); - atomic_write(&token_path(), &stored) -} - -pub fn load_enrollment_token() -> Result { - let path = token_path(); - if !path.is_file() { - return Err("Aktivasyon kodu girilmedi.".to_string()); - } - let stored = fs::read(&path).map_err(|e| format!("Aktivasyon kodu okunamadı: {e}"))?; - #[cfg(windows)] - let raw = unprotect(&stored)?; - #[cfg(not(windows))] - let raw = stored; - String::from_utf8(raw).map_err(|_| "Aktivasyon kodu geçersiz.".to_string()) -} - -#[cfg(windows)] -fn hklm_string(path: &str, value: &str) -> Option { - use winreg::enums::HKEY_LOCAL_MACHINE; - use winreg::RegKey; - RegKey::predef(HKEY_LOCAL_MACHINE) - .open_subkey(path) - .and_then(|key| key.get_value::(value)) - .ok() - .map(|s| s.trim().to_string()) - .filter(|s| !s.is_empty()) -} - -#[cfg(windows)] -fn hardware_fingerprint() -> Vec { - let mut values = Vec::new(); - for (path, name) in [ - (r"SYSTEM\CurrentControlSet\Control\SystemInformation", "ComputerHardwareId"), - (r"HARDWARE\DESCRIPTION\System\BIOS", "SystemSerialNumber"), - (r"HARDWARE\DESCRIPTION\System\BIOS", "BaseBoardProduct"), - (r"HARDWARE\DESCRIPTION\System\BIOS", "SystemProductName"), - (r"HARDWARE\DESCRIPTION\System\CentralProcessor\0", "ProcessorNameString"), - ] { - if let Some(value) = hklm_string(path, name) { - values.push(format!("{name}={value}")); - } - } - values -} - -pub fn device_id() -> String { - use sha2::{Digest, Sha256}; - let mut hasher = Sha256::new(); - #[cfg(windows)] - let hardware = hardware_fingerprint(); - #[cfg(windows)] - if hardware.is_empty() { - hasher.update(b"ld-fdpi-hwid-v1"); - } else { - hasher.update(b"ld-fdpi-hwid-v2"); - } - #[cfg(not(windows))] - hasher.update(b"ld-fdpi-hwid-v1"); - - #[cfg(windows)] - { - use winreg::enums::HKEY_LOCAL_MACHINE; - use winreg::RegKey; - let machine_guid = RegKey::predef(HKEY_LOCAL_MACHINE) - .open_subkey(r"SOFTWARE\Microsoft\Cryptography") - .and_then(|key| key.get_value::("MachineGuid")); - if let Ok(guid) = machine_guid { - hasher.update(guid.trim().to_ascii_lowercase().as_bytes()); - } else { - // Stable fallback for locked-down machines without registry access. - if let Ok(name) = std::env::var("COMPUTERNAME") { - hasher.update(name.as_bytes()); - } - if let Ok(user) = std::env::var("USERNAME") { - hasher.update(user.as_bytes()); - } - hasher.update(b"machine-guid-unavailable"); - } - for value in hardware { - hasher.update(value.as_bytes()); - } - } - #[cfg(not(windows))] - { - if let Ok(name) = std::env::var("HOSTNAME") { - hasher.update(name.as_bytes()); - } - } - format!("{:x}", hasher.finalize()) -} - -fn app_secret() -> Option<&'static str> { - option_env!("LD_FDPI_APP_SECRET") - .map(str::trim) - .filter(|value| !value.is_empty()) -} - -/// POST /api/v1/auto-enroll over TLS. The app secret is supplied at build time -/// via LD_FDPI_APP_SECRET; it is never committed to the repository. It is an -/// abuse barrier, not a substitute for user authentication. -pub fn auto_enroll() -> Result { - let secret = app_secret().ok_or( - "Bu build LD_FDPI_APP_SECRET olmadan derlendi; otomatik kayıt devre dışı.", - )?; - let identity = get_or_create_identity()?; - let payload = serde_json::to_string(&EnrollmentRequest { - public_key: identity.public_key_b64, - client_version: env!("CARGO_PKG_VERSION").to_string(), - device_id: device_id(), - }) - .map_err(|e| e.to_string())?; - let user_agent = format!("LD-FDPI-Enroll/{}", env!("CARGO_PKG_VERSION")); - let body = https_post_json( - "ttmadethat.shop", - "/api/v1/auto-enroll", - &[ - ("X-App-Secret", secret), - ("User-Agent", user_agent.as_str()), - ], - &payload, - )?; - serde_json::from_str(&body).map_err(|e| format!("Enrollment yanıtı geçersiz: {e}")) -} - -/// Legacy one-time-token enrollment, kept for the old UI/automation. -pub fn enroll( - endpoint_host: &str, - endpoint_path: &str, - token: &str, -) -> Result { - let identity = get_or_create_identity()?; - let payload = serde_json::to_string(&EnrollmentRequest { - public_key: identity.public_key_b64, - client_version: env!("CARGO_PKG_VERSION").to_string(), - device_id: device_id(), - }) - .map_err(|e| e.to_string())?; - let auth = format!("Bearer {token}"); - let user_agent = format!("LD-FDPI-Enroll/{}", env!("CARGO_PKG_VERSION")); - let body = https_post_json( - endpoint_host, - endpoint_path, - &[ - ("Authorization", auth.as_str()), - ("User-Agent", user_agent.as_str()), - ], - &payload, - )?; - serde_json::from_str(&body).map_err(|e| format!("Enrollment yanıtı geçersiz: {e}")) -} -fn https_post_json( - host: &str, - path: &str, - extra_headers: &[(&str, &str)], - body: &str, -) -> Result { - use native_tls::TlsConnector; - use std::io::{Read, Write}; - use std::net::{TcpStream, ToSocketAddrs}; - - let addresses: Vec<_> = (host, 443) - .to_socket_addrs() - .map_err(|e| format!("Enrollment DNS: {e}"))? - .collect(); - let connector = TlsConnector::new().map_err(|e| e.to_string())?; - for address in addresses { - let Ok(stream) = TcpStream::connect_timeout(&address, std::time::Duration::from_secs(8)) - else { - continue; - }; - let _ = stream.set_read_timeout(Some(std::time::Duration::from_secs(10))); - let _ = stream.set_write_timeout(Some(std::time::Duration::from_secs(10))); - let Ok(mut tls) = connector.connect(host, stream) else { - continue; - }; - let mut request = format!( - "POST {path} HTTP/1.0\r\nHost: {host}\r\nContent-Type: application/json\r\n\ - Content-Length: {}\r\nConnection: close\r\n", - body.len() - ); - for (name, value) in extra_headers { - request.push_str(&format!("{name}: {value}\r\n")); - } - request.push_str("\r\n"); - request.push_str(body); - if tls.write_all(request.as_bytes()).is_err() { - continue; - } - let mut raw = Vec::new(); - let _ = tls.take(64 * 1024).read_to_end(&mut raw); - let text = String::from_utf8_lossy(&raw); - let (headers, body) = text.split_once("\r\n\r\n").unwrap_or((&text, "")); - let status = headers.lines().next().unwrap_or(""); - if !(status.contains(" 200 ") || status.contains(" 201 ")) { - let code = status.split_whitespace().nth(1).unwrap_or("?"); - return Err(format!("Enrollment HTTP hatası: {code}")); - } - if headers.to_ascii_lowercase().contains("transfer-encoding: chunked") { - let mut decoded = String::new(); - let mut rest = body; - while let Some((size, tail)) = rest.split_once("\r\n") { - let Ok(size) = usize::from_str_radix(size.trim(), 16) else { - break; - }; - if size == 0 { - break; - } - if tail.len() < size { - break; - } - decoded.push_str(&tail[..size]); - rest = tail[size..].trim_start_matches("\r\n"); - } - return Ok(decoded); - } - return Ok(body.trim().to_string()); - } - Err("Enrollment sunucusuna bağlanılamadı.".to_string()) -} - -pub fn render_config(identity: &ClientIdentity, response: &EnrollmentResponse) -> String { - let mut out = String::new(); - out.push_str("[Interface]\n"); - out.push_str(&format!("Address = {}\n", response.address)); - out.push_str(&format!("DNS = {}\n", response.dns.join(", "))); - out.push_str(&format!("PrivateKey = {}\n", identity.private_key_b64)); - let awg = &response.awg; - for (key, value) in [ - ("Jc", awg.jc.to_string()), - ("Jmin", awg.jmin.to_string()), - ("Jmax", awg.jmax.to_string()), - ("S1", awg.s1.to_string()), - ("S2", awg.s2.to_string()), - ("S3", awg.s3.to_string()), - ("S4", awg.s4.to_string()), - ("H1", awg.h1.to_string()), - ("H2", awg.h2.to_string()), - ("H3", awg.h3.to_string()), - ("H4", awg.h4.to_string()), - ("HeaderProtectionKey", awg.header_protection_key.clone()), - ("RekeyAfterTime", awg.rekey_after_time.clone()), - ("RekeyTimeout", awg.rekey_timeout.clone()), - ("RejectAfterTime", awg.reject_after_time.clone()), - ("KeepaliveTimeout", awg.keepalive_timeout.clone()), - ("MaxHandshakeAttempts", awg.max_handshake_attempts.clone()), - ("RandomTrailers", if awg.random_trailers { "on" } else { "off" }.to_string()), - ("DisableCookies", if awg.disable_cookies { "on" } else { "off" }.to_string()), - ] { - out.push_str(&format!("{key} = {value}\n")); - } - if let Some(i1) = &awg.i1 { - out.push_str(&format!("I1 = {i1}\n")); - } - out.push_str("\n[Peer]\n"); - out.push_str(&format!("PublicKey = {}\n", response.server_public_key)); - out.push_str(&format!("PresharedKey = {}\n", response.preshared_key)); - out.push_str(&format!("AllowedIPs = {}\n", response.allowed_ips.join(", "))); - out.push_str(&format!("Endpoint = {}\n", response.endpoint)); - out.push_str("PersistentKeepalive = 25\n"); - out -} diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs index 5daf14e..9903cde 100644 --- a/src-tauri/src/lib.rs +++ b/src-tauri/src/lib.rs @@ -14,12 +14,11 @@ pub mod captive; pub mod config; pub mod eduroam; pub mod engine; -pub mod identity; pub mod pac_server; pub mod proxy_sentinel; pub mod supervisor; -pub mod vpn; pub mod updater; +pub mod redaction; #[cfg(target_os = "windows")] pub mod wfp_killswitch; pub mod winhttp; @@ -76,6 +75,52 @@ fn terminate_child(child: Child) { engine::terminate_child(child); } +fn kill_child_pid() { + let pid = CHILD_PID.swap(0, Ordering::SeqCst); + #[cfg(target_os = "windows")] + if pid != 0 { + use windows_sys::Win32::System::Threading::{ + OpenProcess, TerminateProcess, PROCESS_TERMINATE, + }; + unsafe { + let handle = OpenProcess(PROCESS_TERMINATE, 0, pid); + if !handle.is_null() { + let _ = TerminateProcess(handle, 1); + let _ = windows_sys::Win32::Foundation::CloseHandle(handle); + } + } + } + #[cfg(not(target_os = "windows"))] + let _ = pid; +} + +#[cfg(target_os = "windows")] +unsafe extern "system" fn console_ctrl_handler(ctrl_type: u32) -> i32 { + use windows_sys::Win32::System::Console::{ + CTRL_BREAK_EVENT, CTRL_CLOSE_EVENT, CTRL_C_EVENT, CTRL_LOGOFF_EVENT, CTRL_SHUTDOWN_EVENT, + }; + if matches!( + ctrl_type, + CTRL_C_EVENT | CTRL_BREAK_EVENT | CTRL_CLOSE_EVENT | CTRL_LOGOFF_EVENT | CTRL_SHUTDOWN_EVENT + ) { + kill_child_pid(); + let _ = proxy_sentinel::restore_system_proxy(false); + let _ = wfp_killswitch::disable_fdpi_quic_block(); + let _ = eduroam::restore_from_backup(); + } + 0 +} + +#[cfg(target_os = "windows")] +fn install_shutdown_handler() { + unsafe { + let _ = windows_sys::Win32::System::Console::SetConsoleCtrlHandler( + Some(console_ctrl_handler), + 1, + ); + } +} + /// Last-resort fail-safe: runs before the process dies from a panic. /// /// 1. kills the elevated sidecar by PID (Win32, no locks), @@ -95,6 +140,7 @@ fn panic_cleanup(info: &std::panic::PanicHookInfo<'_>) { }; let line = format!("PANIC {location} :: {message}\n"); + let line = redaction::redact(&line); let log_path = engine::app_data_dir().join("panic.log"); if let Ok(mut file) = std::fs::OpenOptions::new() .create(true) @@ -105,22 +151,7 @@ fn panic_cleanup(info: &std::panic::PanicHookInfo<'_>) { } eprintln!("[LD FDPI][PANIC] {line}"); - let pid = CHILD_PID.swap(0, Ordering::SeqCst); - #[cfg(target_os = "windows")] - if pid != 0 { - use windows_sys::Win32::System::Threading::{ - OpenProcess, TerminateProcess, PROCESS_TERMINATE, - }; - unsafe { - let handle = OpenProcess(PROCESS_TERMINATE, 0, pid); - if !handle.is_null() { - let _ = TerminateProcess(handle, 1); - let _ = windows_sys::Win32::Foundation::CloseHandle(handle); - } - } - } - #[cfg(not(target_os = "windows"))] - let _ = pid; + kill_child_pid(); // Restores WinINet, WinHTTP (if we changed it) and clears the dirty sentinel. let _ = proxy_sentinel::restore_system_proxy(true); @@ -150,6 +181,7 @@ pub struct Runtime { pub connected: bool, pub desired_connected: bool, pub connecting: bool, + pub degraded: bool, pub child: Option, pub config: EngineConfig, pub generation: u64, @@ -187,6 +219,7 @@ impl AppState { connected: false, desired_connected: cfg.auto_connect, connecting: false, + degraded: false, child: None, config: cfg.engine_config(), generation: 0, @@ -251,6 +284,10 @@ pub struct StatusResponse { pub discord_verified: bool, pub web_verified: bool, pub latency_ms: u64, + pub network_ms: u64, + pub proxy_connect_ms: u64, + pub proxy_tls_ms: u64, + pub proxy_total_ms: u64, pub last_error: Option, } @@ -262,6 +299,10 @@ pub struct ConnectResponse { pub discord_verified: bool, pub web_verified: bool, pub latency_ms: u64, + pub network_ms: u64, + pub proxy_connect_ms: u64, + pub proxy_tls_ms: u64, + pub proxy_total_ms: u64, pub proxy_backup_saved: bool, pub sentinel_armed: bool, pub winhttp_applied: bool, @@ -517,11 +558,11 @@ fn shutdown_all(app: &AppHandle) { let _ = proxy_sentinel::restore_system_proxy(false); #[cfg(target_os = "windows")] let _ = wfp_killswitch::disable_fdpi_quic_block(); - vpn::shutdown(); } } -/// Keeps the tunnel alive without user interaction. +/// Keeps the FDPI proxy alive 24/7 across sleep/wake, network changes, proxy +/// resets and sidecar crashes without user interaction. fn start_supervisor( inner: Arc>, app_config: Arc>, @@ -530,68 +571,116 @@ fn start_supervisor( std::thread::spawn(move || { let mut last_tick = Instant::now(); let mut last_failure: Option = None; + let mut last_lan_ip = engine::detect_lan_ip(); + let mut ticks_since_probe: u32 = 0; + let mut consecutive_probe_failures: u32 = 0; loop { std::thread::sleep(Duration::from_secs(15)); let now = Instant::now(); let slept = now.duration_since(last_tick); last_tick = now; - let woke = slept > Duration::from_secs(45); + let woke = slept > Duration::from_secs(25); - let (desired, connecting, connected, port, cfg) = { + let (desired, connecting, connected, degraded, port, cfg) = { let rt = lock(&inner); ( rt.desired_connected, rt.connecting, rt.connected, + rt.degraded, rt.config.proxy_port, rt.config.clone(), ) }; + let current_ip = engine::detect_lan_ip(); + let network_changed = current_ip != last_lan_ip; + last_lan_ip = current_ip; + if !desired || connecting { continue; } - if matches!( - supervisor::current(), - supervisor::NetMode::VpnActive | supervisor::NetMode::Transitioning - ) { + if supervisor::current() == supervisor::NetMode::Transitioning { continue; } - // Simple backoff so a broken network does not spawn an engine every 15s. if let Some(failed_at) = last_failure { - if failed_at.elapsed() < Duration::from_secs(30) { + if !woke && !network_changed && failed_at.elapsed() < Duration::from_secs(15) { continue; } } let lan_allowed = pac_running.load(Ordering::SeqCst); let alive = engine_alive(&inner); - let routed = proxy_routed(port); + let mut routed = proxy_routed(port); // A PID can exist while the listener is dead (sleep/wake, Wi-Fi flap). let socket_ok = engine::probe_local_port(port); - // WinHTTP is best-effort (an existing corporate proxy is preserved); - // do not restart forever just because it was not applied. - if alive && routed && socket_ok && !woke { - continue; - } - - // Another tool (Clash/v2rayN) took over the system proxy: do not fight it. - if !routed && !woke { + // Another tool (Clash/v2rayN/corporate PAC) took over the system proxy: do not fight it. + if !routed && !woke && !network_changed { let external = proxy_sentinel::system_proxy_state() .ok() - .and_then(|s| s.proxy_server) - .map(|s| !s.starts_with("127.0.0.1:") && s != format!("127.0.0.1:{port}")) + .map(|s| { + (s.proxy_enable == 1 && s.points_to_ld_fdpi_port.is_none()) + || s.auto_config_url + .as_deref() + .is_some_and(|url| !url.trim().is_empty()) + }) .unwrap_or(false); if external { continue; } + if alive && socket_ok { + if proxy_sentinel::apply_system_proxy(port, cfg.is_system_wide()).is_ok() { + routed = proxy_routed(port); + } + } } + if cfg.is_system_wide() + && alive + && routed + && socket_ok + && winhttp::is_direct() == Some(true) + { + let _ = winhttp::apply(port); + } + + if alive && routed && socket_ok && !woke && !network_changed { + ticks_since_probe += 1; + if degraded || ticks_since_probe >= 4 { + ticks_since_probe = 0; + let probe = engine::probe_connectivity(port); + if probe.proxy_ok && (probe.discord_ok || probe.web_ok) { + let mut rt = lock(&inner); + rt.last_probe = Some(probe); + rt.degraded = false; + rt.last_error = None; + consecutive_probe_failures = 0; + continue; + } else if engine::physical_network_up() { + consecutive_probe_failures += 1; + if !degraded && consecutive_probe_failures < 2 { + continue; + } + } else { + // Physical network is down; keep listener ready until link returns. + continue; + } + } else { + continue; + } + } + + engine::invalidate_doh_cache(); let result = if alive && connected { - do_restart(inner.clone(), app_config.clone(), cfg, lan_allowed).map(|_| ()) + match do_restart(inner.clone(), app_config.clone(), cfg.clone(), lan_allowed) { + Ok(_) => Ok(()), + Err(_) => { + do_start(inner.clone(), app_config.clone(), cfg, lan_allowed).map(|_| ()) + } + } } else { do_start(inner.clone(), app_config.clone(), cfg, lan_allowed).map(|_| ()) }; @@ -603,6 +692,8 @@ fn start_supervisor( last_failure = Some(Instant::now()); } else { last_failure = None; + consecutive_probe_failures = 0; + ticks_since_probe = 0; } } }); @@ -623,6 +714,10 @@ fn do_start( // Serialize all transitions: rapid UI clicks can never overlap sidecars. let _transition = transition_guard(); + // Clear orphaned sidecars before checking whether the preferred port is free + // so an old spoofdpi.exe does not force port drift after a crash/restart. + engine::hunt_zombie_processes(); + let requested_provider = cfg.doh_provider.clone(); let (mut cfg, auto_selection) = resolve_engine_doh(cfg); @@ -675,6 +770,7 @@ fn do_start( } rt.connecting = true; rt.desired_connected = true; + rt.degraded = false; rt.last_error = None; } @@ -700,6 +796,7 @@ fn do_start( } } let mut result = result; + let mut is_degraded = false; if chosen_profile.is_none() { let _ = wait_for_port_release(cfg.proxy_port, cfg.lan_sharing, Duration::from_secs(3)); // Never leave the user without a working local proxy. The last resort @@ -713,7 +810,7 @@ fn do_start( None => note.to_string(), }); result = Ok(response); - chosen_profile = Some(0); + is_degraded = true; } Err(error) => { result = Err(format!( @@ -736,6 +833,7 @@ fn do_start( { let mut rt = lock(&inner); rt.connecting = false; + rt.degraded = result.is_ok() && is_degraded; if let Err(ref e) = result { rt.last_error = Some(e.clone()); } @@ -1003,6 +1101,10 @@ fn do_start_inner( discord_verified: probe.discord_ok, web_verified: probe.web_ok, latency_ms: probe.connect_ms, + network_ms: probe.network_ms, + proxy_connect_ms: probe.proxy_connect_ms, + proxy_tls_ms: probe.proxy_tls_ms, + proxy_total_ms: probe.proxy_total_ms, proxy_backup_saved: applied.backup_saved, sentinel_armed: true, winhttp_applied: applied.winhttp_applied, @@ -1017,9 +1119,6 @@ fn do_start_inner( } fn do_stop(inner: Arc>) -> Result { - if supervisor::current() == supervisor::NetMode::VpnActive { - return Err("VPN açıkken DPI bağlantısı kesilemez; önce VPN'i durdurun.".to_string()); - } let mode_guard = supervisor::begin(supervisor::NetMode::Disconnected, true)?; let _transition = transition_guard(); @@ -1029,6 +1128,7 @@ fn do_stop(inner: Arc>) -> Result { rt.generation = rt.generation.wrapping_add(1); rt.connected = false; rt.desired_connected = false; + rt.degraded = false; rt.winhttp_applied = false; ( rt.child.take(), @@ -1261,6 +1361,7 @@ fn do_restart_inner( let mut rt = lock(inner); rt.connected = true; rt.desired_connected = true; + rt.degraded = false; rt.child = Some(child); rt.config = cfg.clone(); rt.last_probe = Some(probe.clone()); @@ -1410,6 +1511,10 @@ fn get_status(app: AppHandle, state: State<'_, AppState>) -> StatusResponse { discord_verified: probe.as_ref().map(|p| p.discord_ok).unwrap_or(false), web_verified: probe.as_ref().map(|p| p.web_ok).unwrap_or(false), latency_ms: probe.as_ref().map(|p| p.connect_ms).unwrap_or(0), + network_ms: probe.as_ref().map(|p| p.network_ms).unwrap_or(0), + proxy_connect_ms: probe.as_ref().map(|p| p.proxy_connect_ms).unwrap_or(0), + proxy_tls_ms: probe.as_ref().map(|p| p.proxy_tls_ms).unwrap_or(0), + proxy_total_ms: probe.as_ref().map(|p| p.proxy_total_ms).unwrap_or(0), last_error, } } @@ -1465,7 +1570,6 @@ fn prepare_for_update(state: State<'_, AppState>) -> Result<(), String> { // The updater installer replaces files under Program Files. Stop the // sidecar first and remove any loopback proxy so Windows never reports a // locked file or leaves the machine pointed at a dead port. - let _ = vpn::shutdown(); let _ = do_stop(state.inner.clone()); #[cfg(target_os = "windows")] let _ = wfp_killswitch::disable_fdpi_quic_block(); @@ -1495,88 +1599,63 @@ async fn auto_select_bypass() -> Result { } #[tauri::command] -async fn get_vpn_status() -> Result { - tauri::async_runtime::spawn_blocking(vpn::status) +async fn cleanup_wfp_residue() -> Result { + #[cfg(target_os = "windows")] + { + tauri::async_runtime::spawn_blocking(|| { + let _ = wfp_killswitch::disable_fdpi_quic_block(); + wfp_killswitch::disable_killswitch()?; + Ok("LD FDPI WFP kalıntıları temizlendi.".to_string()) + }) .await - .map_err(|e| format!("VPN durum görevi çöktü: {e}")) -} - -#[tauri::command] -async fn install_vpn_client(app: AppHandle) -> Result { - tauri::async_runtime::spawn_blocking(move || vpn::install_client(&app)) - .await - .map_err(|e| format!("VPN kurulum görevi çöktü: {e}"))? -} - -#[tauri::command] -async fn connect_vpn( - state: State<'_, AppState>, - app: tauri::AppHandle, -) -> Result { - let dpi_connected = { - let runtime = lock(&state.inner); - runtime.connected - }; - if dpi_connected { - return Err( - "DPI bağlantısı açıkken VPN başlatılamaz. Önce DPI bağlantısını kesin.".to_string(), - ); + .map_err(|e| format!("WFP onarım görevi çöktü: {e}"))? } - let allow_lan = { - let cfg = lock(&state.app_config); - cfg.lan_sharing + #[cfg(not(target_os = "windows"))] + { + Ok("WFP yalnızca Windows'ta kullanılır.".to_string()) + } +} + +#[tauri::command] +async fn diagnostics_report(state: State<'_, AppState>) -> Result { + let (connected, desired, port) = { + let rt = lock(&state.inner); + (rt.connected, rt.desired_connected, rt.config.proxy_port) }; - tauri::async_runtime::spawn_blocking(move || { - let mode_guard = supervisor::begin(supervisor::NetMode::VpnActive, false)?; - let status = vpn::connect(&app, allow_lan)?; - mode_guard.commit(); - Ok(status) - }) - .await - .map_err(|e| format!("VPN bağlantı görevi çöktü: {e}"))? -} + let alive = engine_alive(&state.inner); + let routed = proxy_routed(port); + let config = lock(&state.app_config).clone(); -#[tauri::command] -async fn enroll_vpn(token: String) -> Result { tauri::async_runtime::spawn_blocking(move || { - let identity = identity::get_or_create_identity()?; - let response = identity::enroll("ttmadethat.shop", "/api/v1/enroll", &token)?; - let config = identity::render_config(&identity, &response); - identity::save_enrollment_token(&token)?; - vpn::save_config(config) - }) - .await - .map_err(|e| format!("Enrollment görevi çöktü: {e}"))? -} - -#[tauri::command] -async fn run_dns_check() -> Result { - tauri::async_runtime::spawn_blocking(vpn::dns_check) - .await - .map_err(|e| format!("DNS kontrol görevi çöktü: {e}")) -} - -#[tauri::command] -async fn disconnect_vpn() -> Result { - tauri::async_runtime::spawn_blocking(move || { - // A VPN disconnect must never overwrite the DPI mode. - if supervisor::current() == supervisor::NetMode::DpiActive { - return Ok(vpn::status()); + let dir = engine::app_data_dir(); + let mut logs = String::new(); + for name in ["spoofdpi.log", "auto-recovery.log", "panic.log"] { + logs.push_str(&format!("\n--- {name} ---\n")); + if let Ok(text) = std::fs::read_to_string(dir.join(name)) { + let lines: Vec<&str> = text.lines().collect(); + let start = lines.len().saturating_sub(50); + logs.push_str(&lines[start..].join("\n")); + } } - let mode_guard = supervisor::begin(supervisor::NetMode::Disconnected, true)?; - let status = vpn::disconnect()?; - mode_guard.commit(); - Ok(status) + Ok(redaction::redact( + &serde_json::json!({ + "version": env!("CARGO_PKG_VERSION"), + "fdpi": { + "connected": connected, + "desiredConnected": desired, + "engineAlive": alive, + "proxyRouted": routed, + "proxyPort": port, + }, + "systemProxy": proxy_sentinel::system_proxy_state().ok(), + "config": config, + "logs": logs, + }) + .to_string(), + )) }) .await - .map_err(|e| format!("VPN kesme görevi çöktü: {e}"))? -} - -#[tauri::command] -async fn save_vpn_config(config: String) -> Result { - tauri::async_runtime::spawn_blocking(move || vpn::save_config(config)) - .await - .map_err(|e| format!("VPN yapılandırma görevi çöktü: {e}"))? + .map_err(|e| format!("Tanılama görevi çöktü: {e}"))? } fn eduroam_diagnostics_blocking() -> Vec { @@ -1757,12 +1836,23 @@ fn save_config( #[tauri::command] async fn start_connection( state: State<'_, AppState>, - config: EngineConfig, + mut config: EngineConfig, ) -> Result { - if vpn::status().connected { - return Err( - "VPN açıkken DPI bağlantısı başlatılamaz. Önce VPN bağlantısını kesin.".to_string(), - ); + // Never trust the webview/config file with raw sidecar parameters. + config.proxy_port = config.proxy_port.clamp(1024, u16::MAX); + config.pac_port = config.pac_port.clamp(1024, u16::MAX); + if config.pac_port == config.proxy_port { + config.pac_port = config.proxy_port.saturating_add(1).max(1025); + } + config.chunk_size = config.chunk_size.clamp(1, u16::MAX); + if config.bypass_mode > 2 { + config.bypass_mode = 1; + } + if !matches!( + config.doh_provider.as_str(), + "auto" | "cloudflare" | "google" | "adguard" + ) { + config.doh_provider = "auto".to_string(); } let inner = state.inner.clone(); let app_config = state.app_config.clone(); @@ -2071,6 +2161,46 @@ async fn run_diagnostics(state: State<'_, AppState>) -> Result { let points = state.points_to_ld_fdpi_port == Some(cfg.proxy_port); @@ -2190,30 +2320,25 @@ fn ensure_window_visible(app: &AppHandle) { #[cfg_attr(mobile, tauri::mobile_entry_point)] pub fn run() { #[cfg(target_os = "windows")] - init_app_user_model_id(); - #[cfg(target_os = "windows")] - let _ = wfp_killswitch::disable_fdpi_quic_block(); + { + init_app_user_model_id(); + install_shutdown_handler(); + } engine::rotate_logs(); - - let (clean_boot, recovered) = proxy_sentinel::run_startup_sentinel_check(); - // Kill orphaned sidecars before deciding whether a loopback proxy is dead. + // Kill orphaned sidecars before sentinel/port checks so a previous crash + // never tricks startup into keeping a dead loopback proxy or skipping port 18080. engine::hunt_zombie_processes(); - let _ = proxy_sentinel::clear_dead_loopback(18080); + #[cfg(target_os = "windows")] + { + let _ = wfp_killswitch::disable_fdpi_quic_block(); + let _ = wfp_killswitch::disable_killswitch(); + } // A crash may have left the Wi-Fi MTU clamped. let _ = eduroam::restore_from_backup(); - let vpn_connected_at_boot = vpn::status().connected; - // A previous GUI crash can leave persistent kill-switch filters behind. - // Keep them while the tunnel is up; clear them only when it is down. - #[cfg(target_os = "windows")] - if !vpn_connected_at_boot { - let _ = wfp_killswitch::disable_killswitch(); - } - supervisor::init(if vpn_connected_at_boot { - supervisor::NetMode::VpnActive - } else { - supervisor::NetMode::Disconnected - }); + let (clean_boot, recovered) = proxy_sentinel::run_startup_sentinel_check(); + let _ = proxy_sentinel::clear_dead_loopback(18080); + supervisor::init(supervisor::NetMode::Disconnected); let mut app_config = AppConfig::load(); app_config.normalize(); @@ -2253,8 +2378,8 @@ pub fn run() { ensure_window_visible(app); })) .manage(state) - .on_window_event(|window, event| { - if let WindowEvent::CloseRequested { api, .. } = event { + .on_window_event(|window, event| match event { + WindowEvent::CloseRequested { api, .. } => { let minimize = window .app_handle() .try_state::() @@ -2270,6 +2395,10 @@ pub fn run() { app.exit(0); } } + WindowEvent::Destroyed => { + shutdown_all(window.app_handle()); + } + _ => {} }) .setup(move |app| { let show_i = @@ -2362,26 +2491,6 @@ pub fn run() { ensure_window_visible(app.handle()); } - if test_cli_enabled() && std::env::args().any(|a| a == "--auto-connect-vpn") { - let handle = app.handle().clone(); - std::thread::spawn(move || { - let result = vpn::connect(&handle, false); - let text = match &result { - Ok(status) => format!( - "OK\nconnected={}\naddress={}\nendpoint={}\ndetail={}\n", - status.connected, - status.address.as_deref().unwrap_or(""), - status.endpoint.as_deref().unwrap_or(""), - status.detail - ), - Err(error) => format!("ERR\n{error}\n"), - }; - let dir = engine::app_data_dir(); - let _ = std::fs::create_dir_all(&dir); - let _ = std::fs::write(dir.join("auto-connect-result.txt"), text); - }); - } - if test_cli_enabled() && std::env::args().any(|a| a == "--auto-dpi-cycle") { if let Some(state) = app.try_state::() { let inner = state.inner.clone(); @@ -2436,17 +2545,52 @@ pub fn run() { } } - // Auto-connect starts before React loads, as requested. - if cfg_for_setup.auto_connect && !vpn_connected_at_boot { + // Auto-connect starts before React loads, and retries rapidly during the + // first 30 seconds of boot in case Wi-Fi/Ethernet comes up late. + if cfg_for_setup.auto_connect { let inner = supervisor_inner.clone(); let app_config = supervisor_config.clone(); let cfg = cfg_for_setup.engine_config(); std::thread::spawn(move || { - let mut rt = lock(&inner); - rt.desired_connected = true; - drop(rt); + { + let mut rt = lock(&inner); + rt.desired_connected = true; + } // LAN is deliberately off at boot; loopback only. - let _ = do_start(inner, app_config, cfg, false); + let initial = do_start(inner.clone(), app_config.clone(), cfg.clone(), false); + let needs_upgrade = initial.is_err() || lock(&inner).degraded; + if needs_upgrade { + for _ in 0..10 { + std::thread::sleep(Duration::from_secs(3)); + let (desired, connecting, connected, degraded) = { + let rt = lock(&inner); + (rt.desired_connected, rt.connecting, rt.connected, rt.degraded) + }; + if !desired || (connected && !degraded) { + break; + } + if connecting || !engine::physical_network_up() { + continue; + } + engine::invalidate_doh_cache(); + let attempt = if connected { + match do_restart(inner.clone(), app_config.clone(), cfg.clone(), false) + { + Ok(_) => Ok(()), + Err(_) => { + do_start(inner.clone(), app_config.clone(), cfg.clone(), false) + .map(|_| ()) + } + } + } else { + do_start(inner.clone(), app_config.clone(), cfg.clone(), false) + .map(|_| ()) + }; + if attempt.is_ok() && !lock(&inner).degraded { + break; + } + } + } }); } @@ -2475,13 +2619,8 @@ pub fn run() { restart_app, connect_without_login, auto_select_bypass, - get_vpn_status, - install_vpn_client, - connect_vpn, - enroll_vpn, - disconnect_vpn, - save_vpn_config, - run_dns_check, + cleanup_wfp_residue, + diagnostics_report, run_eduroam_diagnostics ]) .build(tauri::generate_context!()); @@ -2506,24 +2645,6 @@ pub fn run() { // CLI modes (no GUI) // --------------------------------------------------------------------------- -/// Isolated acceptance-test entry point: brings the tunnel up and installs the -/// persistent WFP filters, then exits without tearing anything down. -pub fn wfp_enable() -> i32 { - match vpn::connect_for_test(false) { - Ok(status) => { - println!( - "WFP_ENABLE_OK connected={} address={:?}", - status.connected, status.address - ); - 0 - } - Err(error) => { - eprintln!("WFP_ENABLE_ERROR {error}"); - 1 - } - } -} - /// `ld-fdpi.exe --restore-only`: restore the WinINet/WinHTTP proxy and kill the /// engine, then exit. Used by the NSIS uninstaller and by crash-recovery tests. /// (The autostart task is removed separately by the uninstaller.) @@ -2532,7 +2653,6 @@ pub fn restore_only() -> i32 { let _ = wfp_killswitch::disable_killswitch(); #[cfg(target_os = "windows")] let _ = wfp_killswitch::disable_fdpi_quic_block(); - vpn::shutdown(); let killed = engine::hunt_zombie_processes(); let _ = eduroam::restore_from_backup(); match proxy_sentinel::restore_system_proxy(true) { diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index 9534ecf..37b3400 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -16,11 +16,6 @@ fn main() { std::process::exit(ld_fdpi_lib::self_test()); } - // Isolated WFP acceptance-test entry point; leaves persistent filters up. - if std::env::args().any(|a| a == "--wfp-enable") { - std::process::exit(ld_fdpi_lib::wfp_enable()); - } - // Prints the exact Task Scheduler command and tries to apply it (quoting check). if std::env::args().any(|a| a == "--print-autostart") { std::process::exit(ld_fdpi_lib::print_autostart()); diff --git a/src-tauri/src/redaction.rs b/src-tauri/src/redaction.rs new file mode 100644 index 0000000..2c8b5fd --- /dev/null +++ b/src-tauri/src/redaction.rs @@ -0,0 +1,42 @@ +//! Redaction for logs and diagnostics. +//! +//! Ensures sensitive tokens, keys or credentials never reach a log file or a +//! diagnostic report. + +const SECRET_KEYS: &[&str] = &[ + "privatekey", + "presharedkey", + "preshared_key", + "token", + "secret", + "password", + "authorization", + "app_secret", +]; + +pub fn redact(text: &str) -> String { + let mut out = String::with_capacity(text.len()); + for line in text.lines() { + let lower = line.to_ascii_lowercase(); + if SECRET_KEYS.iter().any(|key| lower.contains(key)) { + // Keep only the key name so diagnostics remain useful. + if let Some((key, _)) = line.split_once('=') { + out.push_str(key.trim()); + out.push_str(" = [REDACTED]\n"); + } else if let Some((key, _)) = line.split_once(':') { + out.push_str(key.trim()); + out.push_str(": [REDACTED]\n"); + } else { + out.push_str("[REDACTED]\n"); + } + } else { + out.push_str(line); + out.push('\n'); + } + } + out +} + +pub fn redact_line(text: &str) -> String { + redact(text).trim_end_matches('\n').to_string() +} diff --git a/src-tauri/src/supervisor.rs b/src-tauri/src/supervisor.rs index 9028a45..03655d6 100644 --- a/src-tauri/src/supervisor.rs +++ b/src-tauri/src/supervisor.rs @@ -1,8 +1,8 @@ -//! Single-writer network mode supervisor. +//! Single-writer FDPI mode supervisor. //! -//! DPI and VPN transitions both acquire the same guard. This prevents the -//! supervisor loop, tray actions, auto-connect and UI commands from racing each -//! other (two sidecars, a proxy overwritten after quit, DPI while VPN is up). +//! All FDPI transitions acquire the same guard. This prevents the supervisor loop, +//! tray actions, auto-connect and UI commands from racing each other (two sidecars +//! or a proxy overwritten after quit). use std::sync::{Mutex, MutexGuard, OnceLock}; @@ -10,7 +10,6 @@ use std::sync::{Mutex, MutexGuard, OnceLock}; pub enum NetMode { Disconnected, DpiActive, - VpnActive, Transitioning, } @@ -63,15 +62,6 @@ pub fn begin(target: NetMode, allow_same: bool) -> Result, St if !allow_same && previous == target && target != NetMode::Disconnected { return Err("Seçilen ağ modu zaten aktif.".to_string()); } - match (previous, target) { - (NetMode::VpnActive, NetMode::DpiActive) => { - return Err("VPN açıkken DPI başlatılamaz.".to_string()) - } - (NetMode::DpiActive, NetMode::VpnActive) => { - return Err("DPI açıkken VPN başlatılamaz.".to_string()) - } - _ => {} - } *mode = NetMode::Transitioning; drop(mode); diff --git a/src-tauri/src/vpn.rs b/src-tauri/src/vpn.rs deleted file mode 100644 index 24cf58b..0000000 --- a/src-tauri/src/vpn.rs +++ /dev/null @@ -1,969 +0,0 @@ -//! AmneziaWG VPN tab backend. -//! -//! The official AmneziaWG Windows client is shipped as an MSI resource. The -//! tunnel is managed through the documented `/installtunnelservice` and -//! `/uninstalltunnelservice` commands; no shell is used. Config files contain a -//! private key and are only written to the user's local app data directory. - -use serde::Serialize; -use std::fs; -use std::path::{Path, PathBuf}; -use std::process::{Command, Stdio}; -use std::sync::atomic::{AtomicBool, Ordering}; -use std::sync::{Mutex, MutexGuard}; -use std::time::Duration; - -#[cfg(target_os = "windows")] -use std::os::windows::process::CommandExt; - -use tauri::path::BaseDirectory; -use tauri::{AppHandle, Emitter, Manager}; - -const SERVICE: &str = "AmneziaWGTunnel$ld-fdpi"; -const CREATE_NO_WINDOW: u32 = 0x0800_0000; -static VPN_TRANSITION: Mutex<()> = Mutex::new(()); -static WATCHDOG_RUNNING: AtomicBool = AtomicBool::new(false); -static WATCHDOG_STOP: AtomicBool = AtomicBool::new(false); -static WATCHDOG_ALLOW_LAN: AtomicBool = AtomicBool::new(false); - -fn vpn_guard() -> MutexGuard<'static, ()> { - VPN_TRANSITION - .lock() - .unwrap_or_else(|poisoned| poisoned.into_inner()) -} - -fn hidden(command: &mut Command) -> &mut Command { - #[cfg(target_os = "windows")] - { - command.creation_flags(CREATE_NO_WINDOW); - } - command -} - -/// The upstream client ships a desktop manager next to the service binary. -/// The manager is launched by `/installtunnelservice`; close only the windowed -/// manager, never the session-0 tunnel service. -fn close_manager() { - let Ok(taskkill) = crate::engine::system32_binary("taskkill.exe") else { - return; - }; - let _ = hidden( - Command::new(taskkill) - .args(["/IM", "amneziawg.exe", "/FI", "WINDOWTITLE eq AmneziaWG", "/F"]) - .stdin(Stdio::null()), - ) - .output(); -} -const CLIENT_RELATIVE: &str = r"AmneziaWG\amneziawg.exe"; -const MSI_SHA256: &str = "a1b48ea8699cd347832a3691d832004574ef8ad65bcf887611ac8acb99b7de8b"; -const MAX_CONFIG: usize = 64 * 1024; - -#[derive(Debug, Clone, Serialize)] -#[serde(rename_all = "camelCase")] -pub struct VpnStatus { - pub config_exists: bool, - pub client_installed: bool, - pub connected: bool, - pub service_state: String, - pub endpoint: Option, - pub address: Option, - pub detail: String, -} - -fn config_path() -> PathBuf { - crate::engine::app_data_dir().join("ld-fdpi.conf") -} - -fn client_path() -> PathBuf { - std::env::var_os("ProgramFiles") - .map(PathBuf::from) - .unwrap_or_else(|| PathBuf::from(r"C:\Program Files")) - .join(CLIENT_RELATIVE) -} - -fn client_installed() -> bool { - client_path().is_file() -} - -fn service_state() -> String { - let Ok(sc) = crate::engine::system32_binary("sc.exe") else { - return "unknown".to_string(); - }; - let output = match hidden( - Command::new(sc) - .args(["query", SERVICE]) - .stdin(Stdio::null()), - ) - .output() - { - Ok(output) => output, - Err(_) => return "unknown".to_string(), - }; - let text = format!( - "{}{}", - String::from_utf8_lossy(&output.stdout), - String::from_utf8_lossy(&output.stderr) - ); - if text.contains("RUNNING") { - "running".to_string() - } else if text.contains("STOPPED") { - "stopped".to_string() - } else { - "not-installed".to_string() - } -} - -fn parse_summary(raw: &str) -> (Option, Option) { - let mut endpoint = None; - let mut address = None; - for line in raw.lines() { - let line = line.trim(); - if let Some(value) = line.strip_prefix("Endpoint") { - endpoint = value - .trim_start_matches([' ', '=']) - .trim() - .split_whitespace() - .next() - .map(|value| value.to_string()); - } - if let Some(value) = line.strip_prefix("Address") { - address = value - .trim_start_matches([' ', '=']) - .trim() - .split(',') - .next() - .map(|value| value.trim().to_string()); - } - } - (endpoint, address) -} - -fn status_from_disk() -> VpnStatus { - let path = config_path(); - let config_exists = path.is_file(); - let raw = config_exists - .then(|| fs::read_to_string(&path).ok()) - .flatten() - .unwrap_or_default(); - let (endpoint, address) = parse_summary(&raw); - let state = service_state(); - let connected = state == "running"; - let detail = if !client_installed() { - "İlk kullanım hazırlığı: BAĞLAN'a basın, VPN motoru otomatik kurulacak.".to_string() - } else if !config_exists { - "Cihaz profili BAĞLAN'a basınca otomatik oluşturulacak.".to_string() - } else if connected { - format!( - "AmneziaWG tüneli çalışıyor · {}", - endpoint.as_deref().unwrap_or("sunucu") - ) - } else { - "VPN bağlı değil.".to_string() - }; - VpnStatus { - config_exists, - client_installed: client_installed(), - connected, - service_state: state, - endpoint, - address, - detail, - } -} - -pub fn status() -> VpnStatus { - status_from_disk() -} - -const INTERFACE_KEYS: &[&str] = &[ - "Address", "DNS", "PrivateKey", "ListenPort", "MTU", "Jc", "Jmin", "Jmax", "S1", "S2", - "S3", "S4", "H1", "H2", "H3", "H4", "I1", "I2", "I3", "I4", "I5", - "HeaderProtectionKey", "RekeyAfterTime", "RekeyTimeout", "RejectAfterTime", - "KeepaliveTimeout", "MaxHandshakeAttempts", "RandomTrailers", "DisableCookies", -]; -const PEER_KEYS: &[&str] = &[ - "PublicKey", "PresharedKey", "AllowedIPs", "Endpoint", "PersistentKeepalive", -]; - -fn valid_endpoint(value: &str) -> bool { - let value = value.trim(); - let Some((host, port)) = value.rsplit_once(':') else { - return false; - }; - !host.is_empty() - && port - .parse::() - .map(|port| port > 0) - .unwrap_or(false) -} - -fn validate_config(text: &str) -> Result<(), String> { - if text.len() > MAX_CONFIG { - return Err("VPN yapılandırması 64 KB sınırını aşıyor.".to_string()); - } - let mut section = ""; - let mut has_interface = false; - let mut has_peer = false; - let mut has_private = false; - let mut has_public = false; - let mut has_endpoint = false; - - for (index, raw) in text.lines().enumerate() { - let line = raw.trim_start_matches('\u{feff}').trim(); - if line.is_empty() || line.starts_with('#') || line.starts_with(';') { - continue; - } - if line.len() > 4096 { - return Err(format!("VPN yapılandırması {}. satırı çok uzun.", index + 1)); - } - if line.starts_with('[') { - if !line.ends_with(']') { - return Err(format!("VPN yapılandırması {}. satırı geçersiz başlık.", index + 1)); - } - section = match &line[1..line.len() - 1] { - "Interface" => { - has_interface = true; - "Interface" - } - "Peer" => { - has_peer = true; - "Peer" - } - _ => { - return Err(format!( - "VPN yapılandırmasında desteklenmeyen bölüm: {}", - &line[1..line.len() - 1] - )) - } - }; - continue; - } - let (key, value) = line.split_once('=').ok_or_else(|| { - format!("VPN yapılandırması {}. satırı 'anahtar = değer' biçiminde değil.", index + 1) - })?; - let key = key.trim(); - let value = value.trim(); - if key.is_empty() || key.len() > 64 || key.chars().any(char::is_whitespace) { - return Err(format!("VPN yapılandırması {}. satırında geçersiz anahtar.", index + 1)); - } - if value.len() > 4096 { - return Err(format!("VPN yapılandırması {}. satırındaki değer çok uzun.", index + 1)); - } - let allowed = match section { - "Interface" => INTERFACE_KEYS.contains(&key), - "Peer" => PEER_KEYS.contains(&key), - _ => false, - }; - if !allowed { - return Err(format!( - "Güvenlik: '{}' anahtarı bu VPN yapılandırmasında kullanılamaz.", - key - )); - } - match (section, key) { - ("Interface", "PrivateKey") => has_private = !value.is_empty(), - ("Peer", "PublicKey") => has_public = !value.is_empty(), - ("Peer", "Endpoint") => { - if !valid_endpoint(value) { - return Err("VPN Endpoint 'host:port' biçiminde olmalı.".to_string()); - } - has_endpoint = true; - } - _ => {} - } - } - - if !has_interface || !has_peer { - return Err("Geçersiz AmneziaWG yapılandırması: [Interface] ve [Peer] gerekli.".to_string()); - } - if !has_private || !has_public || !has_endpoint { - return Err("Geçersiz AmneziaWG yapılandırması: PrivateKey, PublicKey ve Endpoint gerekli." - .to_string()); - } - Ok(()) -} - -fn write_private_config(path: &std::path::Path, text: &str) -> Result<(), String> { - if let Some(parent) = path.parent() { - fs::create_dir_all(parent).map_err(|e| format!("VPN klasörü oluşturulamadı: {e}"))?; - } - let tmp = path.with_extension("conf.tmp"); - fs::write(&tmp, text).map_err(|e| format!("VPN yapılandırması yazılamadı: {e}"))?; - #[cfg(target_os = "windows")] - if path.exists() { - // Windows rename does not replace an existing destination. - fs::remove_file(path).map_err(|e| format!("Eski VPN yapılandırması silinemedi: {e}"))?; - } - if let Err(e) = fs::rename(&tmp, path) { - let _ = fs::remove_file(&tmp); - return Err(format!("VPN yapılandırması taşınamadı: {e}")); - } - Ok(()) -} - -pub fn save_config(text: String) -> Result { - let _transition = vpn_guard(); - validate_config(&text)?; - write_private_config(&config_path(), &text)?; - if service_state() != "not-installed" { - let _ = service_control("stop"); - let _ = service_control("delete"); - close_manager(); - } - Ok(status_from_disk()) -} - -fn msi_resource(app: &AppHandle) -> Result { - let from_resource = app - .path() - .resolve("resources/amneziawg.msi", BaseDirectory::Resource) - .ok() - .filter(|path| path.is_file()); - if let Some(path) = from_resource { - return Ok(path); - } - let dev = PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("resources/amneziawg.msi"); - if dev.is_file() { - return Ok(dev); - } - let beside = std::env::current_exe() - .ok() - .and_then(|path| path.parent().map(|dir| dir.join("resources/amneziawg.msi"))) - .filter(|path| path.is_file()); - if let Some(path) = beside { - return Ok(path); - } - Err("AmneziaWG kurulum dosyası bulunamadı.".to_string()) -} - -fn plain_path(path: &Path) -> PathBuf { - let raw = path.to_string_lossy(); - raw.strip_prefix(r"\\?\") - .map(PathBuf::from) - .unwrap_or_else(|| path.to_path_buf()) -} - -fn msi_temp_paths() -> (PathBuf, PathBuf) { - let root = std::env::var_os("WINDIR") - .map(PathBuf::from) - .unwrap_or_else(std::env::temp_dir) - .join("Temp"); - (root.join("ld-amneziawg.msi"), root.join("ld-awg-msi.log")) -} - -pub fn install_client(app: &AppHandle) -> Result { - let _transition = vpn_guard(); - if client_installed() { - close_manager(); - return Ok(status_from_disk()); - } - let source = plain_path(&msi_resource(app)?); - let hash = crate::engine::sha256_file(&source)?; - if hash.to_lowercase() != MSI_SHA256 { - return Err("AmneziaWG MSI bütünlük doğrulaması başarısız.".to_string()); - } - - // msiexec rejects \\?\ extended paths and can fail with 1619 when the - // package lives under Program Files. Copy to a plain, space-free temp path. - let (msi, log) = msi_temp_paths(); - if let Some(parent) = msi.parent() { - fs::create_dir_all(parent).map_err(|e| format!("MSI temp klasörü: {e}"))?; - } - fs::copy(&source, &msi).map_err(|e| format!("MSI geçici kopya: {e}"))?; - let size = fs::metadata(&msi).map(|m| m.len()).unwrap_or(0); - if size == 0 { - let _ = fs::remove_file(&msi); - return Err("Geçici MSI kopyası boş.".to_string()); - } - - let msiexec = crate::engine::system32_binary("msiexec.exe")?; - let output = hidden( - Command::new(&msiexec) - .arg("/i") - .arg(&msi) - .args(["/qn", "/norestart", "/l*v"]) - .arg(&log) - .stdin(Stdio::null()), - ) - .output() - .map_err(|e| format!("AmneziaWG kurulumu başlatılamadı: {e}"))?; - if !output.status.success() || !client_installed() { - // A non-elevated app can still ask Windows for elevation. The MSI is - // SHA-256 verified above; the UAC prompt is the only user interaction. - #[cfg(target_os = "windows")] - { - use windows_sys::Win32::UI::Shell::ShellExecuteW; - let operation: Vec = "runas\0".encode_utf16().collect(); - let target: Vec = msiexec.to_string_lossy().encode_utf16().chain([0]).collect(); - let params: Vec = format!( - "/i \"{}\" /qn /norestart /l*v \"{}\"", - msi.display(), - log.display() - ) - .encode_utf16() - .chain([0]) - .collect(); - let result = unsafe { - ShellExecuteW( - std::ptr::null_mut(), - operation.as_ptr(), - target.as_ptr(), - params.as_ptr(), - std::ptr::null(), - 1, - ) - }; - if result as isize > 32 { - for _ in 0..120 { - if client_installed() { - let _ = fs::remove_file(&msi); - close_manager(); - return Ok(status_from_disk()); - } - std::thread::sleep(Duration::from_millis(500)); - } - } - } - let tail = fs::read_to_string(&log) - .ok() - .map(|text| { - text.lines() - .rev() - .take(20) - .collect::>() - .into_iter() - .rev() - .collect::>() - .join(" | ") - }) - .unwrap_or_default(); - let _ = fs::remove_file(&msi); - return Err(format!( - "AmneziaWG kurulumu başarısız (çıkış {:?}). MSI log: {}", - output.status.code(), - tail - )); - } - let _ = fs::remove_file(&msi); - close_manager(); - Ok(status_from_disk()) -} - -fn run_client(args: &[&str]) -> Result<(), String> { let path = client_path(); - if !path.is_file() { - return Err("AmneziaWG istemcisi kurulu değil.".to_string()); - } - let output = hidden( - Command::new(path) - .args(args) - .stdin(Stdio::null()), - ) - .output() - .map_err(|e| format!("AmneziaWG çalıştırılamadı: {e}"))?; - if output.status.success() { - return Ok(()); - } - let text = format!( - "{}{}", - String::from_utf8_lossy(&output.stdout), - String::from_utf8_lossy(&output.stderr) - ); - Err(format!( - "AmneziaWG komutu başarısız (çıkış {:?}): {}", - output.status.code(), - text.trim() - )) -} - -fn service_control(action: &str) -> Result<(), String> { - let sc = crate::engine::system32_binary("sc.exe")?; - let output = hidden( - Command::new(sc) - .args([action, SERVICE]) - .stdin(Stdio::null()), - ) - .output() - .map_err(|e| format!("Tünel servisi {action} çalıştırılamadı: {e}"))?; - if output.status.success() { - return Ok(()); - } - let text = format!( - "{}{}", - String::from_utf8_lossy(&output.stdout), - String::from_utf8_lossy(&output.stderr) - ); - Err(format!("Tünel servisi {action} başarısız: {}", text.trim())) -} - -#[derive(Debug, Clone, Serialize)] -#[serde(rename_all = "camelCase")] -pub struct DnsCheck { - pub tunnel_active: bool, - pub servers: Vec, - pub egress_ip: Option, - pub leak_risk: bool, - pub detail: String, - pub physical_dns_blocked: bool, - pub ipv6_status: String, - pub egress_matches_vpn: bool, -} - -fn https_get(host: &str, path: &str) -> Option { - use std::io::{Read, Write}; - use std::net::{TcpStream, ToSocketAddrs}; - let addresses: Vec<_> = (host, 443).to_socket_addrs().ok()?.collect(); - let connector = native_tls::TlsConnector::builder().build().ok()?; - for address in addresses { - let Ok(stream) = TcpStream::connect_timeout(&address, Duration::from_secs(4)) else { - continue; - }; - let _ = stream.set_read_timeout(Some(Duration::from_secs(5))); - let _ = stream.set_write_timeout(Some(Duration::from_secs(5))); - let Ok(mut tls) = connector.connect(host, stream) else { - continue; - }; - let request = format!( - "GET {path} HTTP/1.1\r\nHost: {host}\r\nUser-Agent: LD-FDPI-DNS/1.0\r\nConnection: close\r\n\r\n" - ); - if tls.write_all(request.as_bytes()).is_err() { - continue; - } - let mut bytes = Vec::new(); - let _ = tls.take(16 * 1024).read_to_end(&mut bytes); - let text = String::from_utf8_lossy(&bytes); - let body = text.split("\r\n\r\n").nth(1).unwrap_or("").trim().to_string(); - if !body.is_empty() { - return Some(body); - } - } - None -} - -fn dns_servers() -> Vec { - let Ok(netsh) = crate::engine::system32_binary("netsh.exe") else { - return Vec::new(); - }; - let output = match hidden( - Command::new(netsh) - .args(["interface", "ipv4", "show", "dnsservers"]) - .stdin(Stdio::null()), - ) - .output() - { - Ok(output) => output, - Err(_) => return Vec::new(), - }; - let text = String::from_utf8_lossy(&output.stdout); - let mut servers = Vec::new(); - for line in text.lines() { - for token in line.split_whitespace() { - let token = token.trim_matches(|c: char| !c.is_ascii_digit() && c != '.'); - if token.parse::().is_ok() && !servers.iter().any(|s| s == token) { - servers.push(token.to_string()); - } - } - } - servers -} - -fn fetch_egress_ip() -> Option { - let body = https_get("1.1.1.1", "/cdn-cgi/trace")?; - body.lines() - .find_map(|line| line.strip_prefix("ip=")) - .map(|ip| ip.trim().to_string()) -} - -fn test_untrusted_dns_blocked(physical_ip: Option) -> bool { - use std::net::{SocketAddr, UdpSocket}; - let Some(ip) = physical_ip else { - return false; - }; - let Ok(sock) = UdpSocket::bind(SocketAddr::from((ip, 0))) else { - return false; - }; - let _ = sock.set_read_timeout(Some(Duration::from_millis(1200))); - let query: [u8; 29] = [ - 0xAB, 0xCD, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x07, b'e', b'x', b'a', b'm', b'p', b'l', b'e', 0x03, b'c', b'o', b'm', - 0x00, 0x00, 0x01, 0x00, 0x01, - ]; - if sock.send_to(&query, "9.9.9.9:53").is_err() { - return true; - } - let mut buf = [0u8; 64]; - sock.recv_from(&mut buf).is_err() -} - -fn test_ipv6_leak_status(has_global_ipv6: bool) -> (&'static str, bool) { - if !has_global_ipv6 { - return ("not_applicable", true); - } - let target = std::net::SocketAddr::new( - std::net::IpAddr::V6(std::net::Ipv6Addr::new( - 0x2606, 0x4700, 0x4700, 0, 0, 0, 0, 0x1111, - )), - 443, - ); - match std::net::TcpStream::connect_timeout(&target, Duration::from_millis(1200)) { - Ok(_) => ("leaking", false), - Err(_) => ("blocked", true), - } -} - -pub fn dns_check() -> DnsCheck { - let connected = status().connected; - let expected_vpn_ip = "116.202.14.171"; - let (physical_ip, has_global_ipv6) = crate::wfp_killswitch::probe_physical_network(); - let egress_ip = fetch_egress_ip(); - let physical_dns_blocked = if connected { - test_untrusted_dns_blocked(physical_ip) - } else { - false - }; - let (ipv6_status, ipv6_safe) = if connected { - test_ipv6_leak_status(has_global_ipv6) - } else { - ("not_applicable", true) - }; - let egress_matches_vpn = egress_ip.as_deref() == Some(expected_vpn_ip); - let servers = if connected { - vec!["1.1.1.1".to_string(), "1.0.0.1".to_string()] - } else { - dns_servers() - }; - let leak_risk = connected && !(physical_dns_blocked && ipv6_safe && egress_matches_vpn); - let detail = if !connected { - "VPN kapalı; standart sistem bağlantısı aktif.".to_string() - } else { - format!( - "Çıkış IP: {} | Fiziksel DNS Engeli: {} | IPv6: {}", - egress_ip.as_deref().unwrap_or("yok"), - if physical_dns_blocked { "Aktif" } else { "AÇIK" }, - ipv6_status - ) - }; - DnsCheck { - tunnel_active: connected, - servers, - egress_ip, - leak_risk, - detail, - physical_dns_blocked, - ipv6_status: ipv6_status.to_string(), - egress_matches_vpn, - } -} - -pub(crate) fn start_service_only() -> Result<(), String> { - if service_state() == "not-installed" { - return Err("VPN servisi kurulu değil.".to_string()); - } - if service_state() != "running" { - service_control("start")?; - } - Ok(()) -} - -pub(crate) fn stop_service_only() -> Result<(), String> { - if service_state() == "running" { - service_control("stop")?; - } - Ok(()) -} - -pub fn connect(app: &AppHandle, allow_lan: bool) -> Result { - if !client_installed() { - emit_progress(app, "İlk kullanım hazırlığı: VPN motoru kuruluyor..."); - install_client(app)?; - } - if !config_ready() { - emit_progress(app, "Cihaz profili otomatik oluşturuluyor..."); - auto_enroll_config()?; - } - emit_progress(app, "Tünel başlatılıyor..."); - let status = connect_inner(allow_lan, Some(app))?; - if !wait_for_handshake() { - emit_progress(app, "Tünel yanıt vermedi; WFP kilidi kaldırılıp profil yenileniyor..."); - disable_wfp_for_retry()?; - let _ = stop_service_only(); - let _ = service_control("delete"); - let _ = fs::remove_file(config_path()); - auto_enroll_config()?; - let retry = connect_inner(allow_lan, Some(app))?; - if !wait_for_handshake() { - disable_wfp_for_retry()?; - let _ = stop_service_only(); - let _ = service_control("delete"); - return Err("Tünel 10 saniye içinde el sıkışmadı. Sunucu peer'ı yenilendi; tekrar deneyin.".to_string()); - } - start_watchdog(app, allow_lan); - return Ok(retry); - } - start_watchdog(app, allow_lan); - Ok(status) -} - -/// Headless entry point used by the isolated WFP acceptance test. -pub fn connect_for_test(allow_lan: bool) -> Result { - connect_inner(allow_lan, None) -} - -fn connect_inner(allow_lan: bool, app: Option<&AppHandle>) -> Result { - let _transition = vpn_guard(); - connect_locked(allow_lan, app) -} - -fn config_ready() -> bool { - let path = config_path(); - path.is_file() - && fs::read_to_string(&path) - .map(|text| validate_config(&text).is_ok()) - .unwrap_or(false) -} - -fn auto_enroll_config() -> Result<(), String> { - let identity = crate::identity::get_or_create_identity()?; - let response = crate::identity::auto_enroll()?; - let config = crate::identity::render_config(&identity, &response); - validate_config(&config)?; - write_private_config(&config_path(), &config) -} - -fn emit_progress(app: &AppHandle, message: &str) { - let _ = app.emit("vpn-progress", message.to_string()); -} - -fn wait_for_handshake() -> bool { - for _ in 0..10 { - if crate::engine::tcp_latency("1.1.1.1", 443).is_some() { - return true; - } - std::thread::sleep(Duration::from_secs(1)); - } - false -} - -/// Enrollment HTTPS must not run while the WFP catch-all is active. Retry the -/// teardown a few times and hard-fail instead of falling through to a request -/// that the kill-switch will blackhole. -fn disable_wfp_for_retry() -> Result<(), String> { - let mut last = String::new(); - for _ in 0..3 { - match crate::wfp_killswitch::disable_killswitch() { - Ok(()) => return Ok(()), - Err(e) => { - last = e; - std::thread::sleep(Duration::from_millis(250)); - } - } - } - Err(format!( - "Tünel el sıkışmadı ve WFP kill-switch temizlenemedi; internet kesilmemesi için VPN açık tutuldu: {last}" - )) -} - -fn connect_locked(allow_lan: bool, app: Option<&AppHandle>) -> Result { - if !client_installed() { - return Err("AmneziaWG istemcisi kurulu değil.".to_string()); - } - let config = config_path(); - if !config.is_file() { - return Err("VPN yapılandırması oluşturulamadı.".to_string()); - } - let config_str = config.to_string_lossy().to_string(); - if service_state() == "not-installed" { - run_client(&["/installtunnelservice", &config_str])?; - close_manager(); - } else if service_state() != "running" { - service_control("start")?; - } - for _ in 0..40 { - if service_state() == "running" { - break; - } - std::thread::sleep(Duration::from_millis(250)); - } - if service_state() != "running" { - close_manager(); - return Err("AmneziaWG tüneli 10 saniye içinde başlamadı.".to_string()); - } - - let mut luid = None; - for _ in 0..25 { - if let Ok(value) = crate::wfp_killswitch::find_tunnel_luid("ld-fdpi") { - luid = Some(value); - break; - } - std::thread::sleep(Duration::from_millis(200)); - } - let Some(luid) = luid else { - let _ = service_control("stop"); - close_manager(); - return Err("VPN adaptörü (LUID) 5 saniye içinde hazır olmadı.".to_string()); - }; - - if let Err(e) = crate::wfp_killswitch::enable_killswitch( - std::net::Ipv4Addr::new(116, 202, 14, 171), - 42771, - luid, - &[ - std::net::Ipv4Addr::new(1, 1, 1, 1), - std::net::Ipv4Addr::new(1, 0, 0, 1), - ], - allow_lan, - ) { - let _ = crate::wfp_killswitch::disable_killswitch(); - let _ = service_control("stop"); - close_manager(); - return Err(format!("Kill-switch etkinleştirilemedi: {e}")); - } - if let Some(app) = app { - emit_progress(app, "Bağlandı."); - } - close_manager(); - Ok(status_from_disk()) -} - -fn start_watchdog(app: &AppHandle, allow_lan: bool) { - WATCHDOG_ALLOW_LAN.store(allow_lan, Ordering::SeqCst); - WATCHDOG_STOP.store(false, Ordering::SeqCst); - if WATCHDOG_RUNNING.swap(true, Ordering::SeqCst) { - return; - } - let app = app.clone(); - std::thread::spawn(move || { - let mut failures = 0u8; - let mut recovery_attempts = 0u8; - loop { - for _ in 0..3 { - if WATCHDOG_STOP.load(Ordering::SeqCst) { - WATCHDOG_RUNNING.store(false, Ordering::SeqCst); - return; - } - std::thread::sleep(Duration::from_secs(1)); - } - if WATCHDOG_STOP.load(Ordering::SeqCst) { - WATCHDOG_RUNNING.store(false, Ordering::SeqCst); - return; - } - let service_running = service_state() == "running"; - if service_running && crate::engine::dns_probe("1.1.1.1", 2000) { - failures = 0; - continue; - } - if service_running { - failures = failures.saturating_add(1); - if failures < 3 { - continue; - } - emit_progress(&app, "Tünel yanıt vermiyor; kendi kendini onarma başlıyor..."); - } else { - emit_progress(&app, "VPN servisi durdu; kendi kendini onarma başlıyor..."); - } - { - let _transition = vpn_guard(); - if WATCHDOG_STOP.load(Ordering::SeqCst) { - WATCHDOG_RUNNING.store(false, Ordering::SeqCst); - return; - } - if let Err(e) = recover_locked(&app) { - recovery_attempts = recovery_attempts.saturating_add(1); - append_recovery_log(&format!("recovery failed ({recovery_attempts}): {e}")); - emit_progress(&app, &format!("Kendi kendini onarma başarısız: {e}")); - if recovery_attempts >= 3 { - emit_progress(&app, "Kendi kendini onarma 3 kez başarısız; watchdog durdu."); - WATCHDOG_RUNNING.store(false, Ordering::SeqCst); - return; - } - } else { - recovery_attempts = 0; - } - } - failures = 0; - } - }); -} - -fn recover_locked(app: &AppHandle) -> Result<(), String> { - append_recovery_log("recovery start"); - disable_wfp_for_retry()?; - append_recovery_log("wfp removed"); - stop_service_only()?; - let _ = service_control("delete"); - let _ = fs::remove_file(config_path()); - auto_enroll_config()?; - append_recovery_log("enrolled"); - let _ = service_control("delete"); - connect_locked(WATCHDOG_ALLOW_LAN.load(Ordering::SeqCst), Some(app))?; - if !wait_for_handshake() { - disable_wfp_for_retry()?; - let _ = stop_service_only(); - return Err("Yeniden bağlanma sonrası el sıkışma yok.".to_string()); - } - append_recovery_log("recovery complete"); - emit_progress(app, "Kendi kendini onarma tamamlandı."); - Ok(()) -} - -fn append_recovery_log(message: &str) { - let path = crate::engine::app_data_dir().join("auto-recovery.log"); - let _ = fs::create_dir_all(crate::engine::app_data_dir()); - if let Ok(mut file) = fs::OpenOptions::new().create(true).append(true).open(path) { - use std::io::Write; - let _ = writeln!(file, "{message}"); - } -} - -pub fn disconnect() -> Result { - WATCHDOG_STOP.store(true, Ordering::SeqCst); - let _transition = vpn_guard(); - let stop_result = stop_service_only(); - if let Err(wfp_error) = crate::wfp_killswitch::disable_killswitch() { - let _ = start_service_only(); - return Err(format!( - "Ağ kilidi (WFP) kaldırılamadı, internet erişimi kesilmemesi için VPN açık tutuldu: {wfp_error}" - )); - } - stop_result?; - close_manager(); - Ok(status_from_disk()) -} - -/// Best-effort teardown for app exit and uninstall. -pub fn shutdown() { - WATCHDOG_STOP.store(true, Ordering::SeqCst); - let _transition = vpn_guard(); - let _ = crate::wfp_killswitch::disable_killswitch(); - let _ = stop_service_only(); - close_manager(); -} - -#[cfg(test)] -mod tests { - use super::*; - - #[test] - fn rejects_incomplete_config() { - assert!(validate_config("[Interface]\nPrivateKey = x\n").is_err()); - assert!(validate_config( - "[Interface]\nPrivateKey = x\n[Peer]\nPublicKey = y\nEndpoint = host:1\n" - ) - .is_ok()); - assert!(validate_config( - "[Interface]\nPrivateKey = x\n[Peer]\nPublicKey = y\nEndpoint = host:1\nPostUp = calc.exe\n" - ) - .is_err()); - assert!(validate_config( - "[Interface]\nPrivateKey = x\n[Peer]\nPublicKey = y\nEndpoint = host:notaport\n" - ) - .is_err()); - } - - #[test] - fn parses_summary_without_keys() { - let (endpoint, address) = - parse_summary("[Interface]\nAddress = 10.8.1.5/32\n[Peer]\nEndpoint = 1.2.3.4:42771\n"); - assert_eq!(address.as_deref(), Some("10.8.1.5/32")); - assert_eq!(endpoint.as_deref(), Some("1.2.3.4:42771")); - } -} diff --git a/src-tauri/src/wfp_killswitch.rs b/src-tauri/src/wfp_killswitch.rs index 5e25c00..8a0d0fc 100644 --- a/src-tauri/src/wfp_killswitch.rs +++ b/src-tauri/src/wfp_killswitch.rs @@ -1,27 +1,19 @@ -//! Fail-closed WFP kill switch for the LD-FDPI VPN tunnel. +//! FDPI QUIC compatibility WFP layer and legacy WFP filter cleanup. //! -//! Persistent filters are intentional: if the GUI or the tunnel service dies, -//! outbound traffic stays blocked until `disable_killswitch()` is called by the -//! app, `--restore-only`, or the uninstaller. +//! App-scoped dynamic WFP filters block QUIC (UDP/443) for known browsers and +//! Discord when the optional compatibility mode is enabled, and `disable_killswitch` +//! removes any legacy persistent WFP filters left behind by older versions. #![cfg(windows)] use std::ffi::OsStr; -use std::net::Ipv4Addr; use std::os::windows::ffi::OsStrExt; use std::ptr; use std::sync::atomic::{AtomicUsize, Ordering}; use windows_sys::core::GUID; -use windows_sys::Win32::Foundation::{ERROR_BUFFER_OVERFLOW, ERROR_SUCCESS, HANDLE}; -use windows_sys::Win32::NetworkManagement::IpHelper::{ - FreeMibTable, GetAdaptersAddresses, GetIfTable2, GAA_FLAG_SKIP_ANYCAST, - GAA_FLAG_SKIP_DNS_SERVER, GAA_FLAG_SKIP_MULTICAST, IP_ADAPTER_ADDRESSES_LH, MIB_IF_TABLE2, -}; +use windows_sys::Win32::Foundation::{ERROR_SUCCESS, HANDLE}; use windows_sys::Win32::NetworkManagement::WindowsFilteringPlatform::*; -use windows_sys::Win32::Networking::WinSock::{ - AF_INET, AF_INET6, AF_UNSPEC, SOCKADDR_IN, SOCKADDR_IN6, -}; const SUBLAYER_GUID: GUID = GUID { data1: 0x7A9E4B12, @@ -43,12 +35,7 @@ const MAX_FILTER_SEQ: u8 = 52; const FWP_E_FILTER_NOT_FOUND: u32 = 0x8032_0003; const FWP_E_SUBLAYER_NOT_FOUND: u32 = 0x8032_0007; -const WFP_SUBLAYER_FLAG_PERSISTENT: u32 = 0x0000_0001; -const WFP_FILTER_FLAG_PERSISTENT: u32 = 0x0000_0001; - -// FDPI QUIC compatibility filters deliberately use their own namespace. They -// must never share keys with the VPN kill-switch above; otherwise a DPI stop -// could delete a live VPN firewall or vice versa. +// FDPI QUIC compatibility filters use their own namespace. const FDPI_SUBLAYER_GUID: GUID = GUID { data1: 0x7A9E4C12, data2: 0x6C3D, @@ -77,12 +64,6 @@ fn wide_null(s: &str) -> Vec { .collect() } -/// WFP expects host-order IPv4 values in FWP_V4_ADDR_AND_MASK. -#[inline] -fn ipv4_to_wfp_u32(ip: Ipv4Addr) -> u32 { - u32::from_be_bytes(ip.octets()) -} - struct EngineHandle(HANDLE); impl Drop for EngineHandle { @@ -128,136 +109,6 @@ fn open_dynamic_engine() -> Result { open_engine_with(FWPM_SESSION_FLAG_DYNAMIC) } -pub fn find_tunnel_luid(adapter_hint: &str) -> Result { - unsafe { - let mut table: *mut MIB_IF_TABLE2 = ptr::null_mut(); - let status = GetIfTable2(&mut table); - if status != ERROR_SUCCESS || table.is_null() { - return Err(format!("GetIfTable2 hatası: 0x{status:08X}")); - } - - let rows = - std::slice::from_raw_parts((*table).Table.as_ptr(), (*table).NumEntries as usize); - let hint = adapter_hint.to_lowercase(); - let mut found = None; - for row in rows { - if row.OperStatus != 1 { - continue; - } - let alias = String::from_utf16_lossy(&row.Alias) - .trim_end_matches('\0') - .to_lowercase(); - let desc = String::from_utf16_lossy(&row.Description) - .trim_end_matches('\0') - .to_lowercase(); - if alias.contains(&hint) - || desc.contains(&hint) - || desc.contains("amnezia") - || desc.contains("wintun") - { - found = Some(row.InterfaceLuid.Value); - break; - } - } - FreeMibTable(table as *const _); - found.ok_or_else(|| "Aktif VPN tünel adaptörü (LUID) bulunamadı.".to_string()) - } -} - -/// Finds the physical Ethernet/Wi-Fi IPv4 and whether a global IPv6 exists. -pub fn probe_physical_network() -> (Option, bool) { - unsafe { - let flags = GAA_FLAG_SKIP_ANYCAST | GAA_FLAG_SKIP_MULTICAST | GAA_FLAG_SKIP_DNS_SERVER; - let mut buf_len: u32 = 16 * 1024; - let mut buf: Vec = vec![0u64; (buf_len as usize + 7) / 8]; - let mut ret = GetAdaptersAddresses( - AF_UNSPEC as u32, - flags, - ptr::null_mut(), - buf.as_mut_ptr() as *mut IP_ADAPTER_ADDRESSES_LH, - &mut buf_len, - ); - if ret == ERROR_BUFFER_OVERFLOW { - buf = vec![0u64; (buf_len as usize + 7) / 8]; - ret = GetAdaptersAddresses( - AF_UNSPEC as u32, - flags, - ptr::null_mut(), - buf.as_mut_ptr() as *mut IP_ADAPTER_ADDRESSES_LH, - &mut buf_len, - ); - } - if ret != ERROR_SUCCESS { - return (None, false); - } - - let mut physical = None; - let mut global_v6 = false; - let mut curr = buf.as_ptr() as *const IP_ADAPTER_ADDRESSES_LH; - while !curr.is_null() { - let adapter = &*curr; - let is_up = adapter.OperStatus == 1; - let is_physical = adapter.IfType == 6 || adapter.IfType == 71; - let desc = if adapter.Description.is_null() { - String::new() - } else { - let mut len = 0; - while *adapter.Description.add(len) != 0 { - len += 1; - } - String::from_utf16_lossy(std::slice::from_raw_parts(adapter.Description, len)) - .to_lowercase() - }; - let is_virtual = [ - "hyper-v", - "vmware", - "virtualbox", - "vethernet", - "loopback", - "wintun", - "amnezia", - "wireguard", - ] - .iter() - .any(|needle| desc.contains(needle)); - if is_up && is_physical && !is_virtual { - let mut ua = adapter.FirstUnicastAddress; - while !ua.is_null() { - let address = &*ua; - let sa = address.Address.lpSockaddr; - if !sa.is_null() { - match (*sa).sa_family { - f if f == AF_INET as u16 => { - let sin = &*(sa as *const SOCKADDR_IN); - let ip = Ipv4Addr::from(u32::from_be(sin.sin_addr.S_un.S_addr)); - let o = ip.octets(); - if physical.is_none() - && !ip.is_loopback() - && !(o[0] == 169 && o[1] == 254) - && !(o[0] == 10 && o[1] == 8 && o[2] == 1) - { - physical = Some(ip); - } - } - f if f == AF_INET6 as u16 => { - let sin6 = &*(sa as *const SOCKADDR_IN6); - let b = sin6.sin6_addr.u.Byte; - if (b[0] & 0xE0) == 0x20 { - global_v6 = true; - } - } - _ => {} - } - } - ua = address.Next; - } - } - curr = adapter.Next; - } - (physical, global_v6) - } -} - pub fn disable_killswitch() -> Result<(), String> { let engine = open_engine()?; unsafe { @@ -286,435 +137,6 @@ pub fn disable_killswitch() -> Result<(), String> { Ok(()) } -pub fn enable_killswitch( - endpoint_ip: Ipv4Addr, - endpoint_port: u16, - tunnel_luid: u64, - dns_servers: &[Ipv4Addr], - allow_lan: bool, -) -> Result<(), String> { - let _ = disable_killswitch(); - let result = enable_inner( - endpoint_ip, - endpoint_port, - tunnel_luid, - dns_servers, - allow_lan, - ); - if result.is_err() { - let _ = disable_killswitch(); - } - result -} - -fn enable_inner( - endpoint_ip: Ipv4Addr, - endpoint_port: u16, - tunnel_luid: u64, - dns_servers: &[Ipv4Addr], - allow_lan: bool, -) -> Result<(), String> { - let engine = open_engine()?; - let mut seq = 1u8; - unsafe { - let status = FwpmTransactionBegin0(engine.0, 0); - if status != ERROR_SUCCESS { - return Err(format!("Transaction başlatılamadı: 0x{status:08X}")); - } - let result = (|| -> Result<(), String> { - let mut name = wide_null("LD-FDPI KillSwitch SubLayer"); - let mut sublayer: FWPM_SUBLAYER0 = std::mem::zeroed(); - sublayer.subLayerKey = SUBLAYER_GUID; - sublayer.displayData.name = name.as_mut_ptr(); - sublayer.flags = WFP_SUBLAYER_FLAG_PERSISTENT; - sublayer.weight = 0xFF00; - let res = FwpmSubLayerAdd0(engine.0, &sublayer, ptr::null_mut()); - if res != ERROR_SUCCESS { - return Err(format!("SubLayer eklenemedi: 0x{res:08X}")); - } - - for layer in [ - FWPM_LAYER_ALE_AUTH_CONNECT_V4, - FWPM_LAYER_ALE_AUTH_CONNECT_V6, - ] { - add_loopback(engine.0, &mut seq, layer, 15)?; - } - add_endpoint( - engine.0, - &mut seq, - 14, - ipv4_to_wfp_u32(endpoint_ip), - endpoint_port, - )?; - add_dhcp(engine.0, &mut seq, 14)?; - - if allow_lan { - for &(net, mask) in LAN_RANGES { - add_lan(engine.0, &mut seq, 13, ipv4_to_wfp_u32(net), mask)?; - } - } - for &dns in dns_servers { - for proto in [17u8, 6u8] { - add_tunnel_dns( - engine.0, - &mut seq, - 13, - tunnel_luid, - ipv4_to_wfp_u32(dns), - 53, - proto, - )?; - } - } - for layer in [ - FWPM_LAYER_ALE_AUTH_CONNECT_V4, - FWPM_LAYER_ALE_AUTH_CONNECT_V6, - ] { - for port in [53u16, 853u16] { - add_port_block(engine.0, &mut seq, layer, 12, port)?; - } - } - add_luid_permit( - engine.0, - &mut seq, - FWPM_LAYER_ALE_AUTH_CONNECT_V4, - 11, - tunnel_luid, - )?; - for (low, high) in [(3478u16, 3479u16), (5349, 5349), (19302, 19309)] { - for layer in [ - FWPM_LAYER_ALE_AUTH_CONNECT_V4, - FWPM_LAYER_ALE_AUTH_CONNECT_V6, - ] { - add_stun_block(engine.0, &mut seq, layer, 10, low, high)?; - } - } - for layer in [ - FWPM_LAYER_ALE_AUTH_CONNECT_V4, - FWPM_LAYER_ALE_AUTH_CONNECT_V6, - ] { - add_catchall(engine.0, &mut seq, layer, 1)?; - } - Ok(()) - })(); - if let Err(e) = result { - let _ = FwpmTransactionAbort0(engine.0); - return Err(e); - } - let commit = FwpmTransactionCommit0(engine.0); - if commit != ERROR_SUCCESS { - let _ = FwpmTransactionAbort0(engine.0); - return Err(format!("KillSwitch commit hatası: 0x{commit:08X}")); - } - } - Ok(()) -} - -const LAN_RANGES: &[(Ipv4Addr, u32)] = &[ - (Ipv4Addr::new(192, 168, 0, 0), 0xFFFF_0000), - (Ipv4Addr::new(172, 16, 0, 0), 0xFFF0_0000), - // 10.0.0.0/8 minus 10.8.1.0/24 - (Ipv4Addr::new(10, 0, 0, 0), 0xFFF8_0000), - (Ipv4Addr::new(10, 8, 0, 0), 0xFFFF_FF00), - (Ipv4Addr::new(10, 8, 2, 0), 0xFFFF_FE00), - (Ipv4Addr::new(10, 8, 4, 0), 0xFFFF_FC00), - (Ipv4Addr::new(10, 8, 8, 0), 0xFFFF_F800), - (Ipv4Addr::new(10, 8, 16, 0), 0xFFFF_F000), - (Ipv4Addr::new(10, 8, 32, 0), 0xFFFF_E000), - (Ipv4Addr::new(10, 8, 64, 0), 0xFFFF_C000), - (Ipv4Addr::new(10, 8, 128, 0), 0xFFFF_8000), - (Ipv4Addr::new(10, 9, 0, 0), 0xFFFF_0000), - (Ipv4Addr::new(10, 10, 0, 0), 0xFFFE_0000), - (Ipv4Addr::new(10, 12, 0, 0), 0xFFFC_0000), - (Ipv4Addr::new(10, 16, 0, 0), 0xFFF0_0000), - (Ipv4Addr::new(10, 32, 0, 0), 0xFFE0_0000), - (Ipv4Addr::new(10, 64, 0, 0), 0xFFC0_0000), - (Ipv4Addr::new(10, 128, 0, 0), 0xFF80_0000), -]; - -unsafe fn add_filter( - engine: HANDLE, - seq: &mut u8, - layer: GUID, - weight: u64, - action: FWP_ACTION_TYPE, - name: &str, - conditions: &mut [FWPM_FILTER_CONDITION0], -) -> Result<(), String> { - let mut weight_value = weight; - let mut name_w = wide_null(name); - let mut filter: FWPM_FILTER0 = std::mem::zeroed(); - filter.filterKey = filter_guid(*seq); - *seq += 1; - filter.layerKey = layer; - filter.subLayerKey = SUBLAYER_GUID; - filter.displayData.name = name_w.as_mut_ptr(); - filter.flags = WFP_FILTER_FLAG_PERSISTENT; - filter.action.r#type = action; - filter.weight.r#type = FWP_UINT64; - filter.weight.Anonymous.uint64 = &mut weight_value; - filter.numFilterConditions = conditions.len() as u32; - filter.filterCondition = conditions.as_mut_ptr(); - let res = FwpmFilterAdd0(engine, &filter, ptr::null_mut(), ptr::null_mut()); - if res != ERROR_SUCCESS { - return Err(format!("{name} eklenemedi: 0x{res:08X}")); - } - Ok(()) -} - -unsafe fn add_loopback( - engine: HANDLE, - seq: &mut u8, - layer: GUID, - weight: u64, -) -> Result<(), String> { - let mut cond: FWPM_FILTER_CONDITION0 = std::mem::zeroed(); - cond.fieldKey = FWPM_CONDITION_FLAGS; - cond.matchType = FWP_MATCH_FLAGS_ALL_SET; - cond.conditionValue.r#type = FWP_UINT32; - cond.conditionValue.Anonymous.uint32 = FWP_CONDITION_FLAG_IS_LOOPBACK; - add_filter( - engine, - seq, - layer, - weight, - FWP_ACTION_PERMIT, - "LD-FDPI Permit Loopback", - std::slice::from_mut(&mut cond), - ) -} - -unsafe fn add_endpoint( - engine: HANDLE, - seq: &mut u8, - weight: u64, - ip: u32, - port: u16, -) -> Result<(), String> { - let mut addr = FWP_V4_ADDR_AND_MASK { - addr: ip, - mask: 0xFFFF_FFFF, - }; - let mut conds: [FWPM_FILTER_CONDITION0; 3] = std::mem::zeroed(); - conds[0].fieldKey = FWPM_CONDITION_IP_REMOTE_ADDRESS; - conds[0].matchType = FWP_MATCH_EQUAL; - conds[0].conditionValue.r#type = FWP_V4_ADDR_MASK; - conds[0].conditionValue.Anonymous.v4AddrMask = &mut addr; - conds[1].fieldKey = FWPM_CONDITION_IP_REMOTE_PORT; - conds[1].matchType = FWP_MATCH_EQUAL; - conds[1].conditionValue.r#type = FWP_UINT16; - conds[1].conditionValue.Anonymous.uint16 = port; - conds[2].fieldKey = FWPM_CONDITION_IP_PROTOCOL; - conds[2].matchType = FWP_MATCH_EQUAL; - conds[2].conditionValue.r#type = FWP_UINT8; - conds[2].conditionValue.Anonymous.uint8 = 17; - add_filter( - engine, - seq, - FWPM_LAYER_ALE_AUTH_CONNECT_V4, - weight, - FWP_ACTION_PERMIT, - "LD-FDPI Permit VPN Endpoint", - &mut conds, - ) -} - -unsafe fn add_dhcp(engine: HANDLE, seq: &mut u8, weight: u64) -> Result<(), String> { - let mut conds: [FWPM_FILTER_CONDITION0; 3] = std::mem::zeroed(); - conds[0].fieldKey = FWPM_CONDITION_IP_PROTOCOL; - conds[0].matchType = FWP_MATCH_EQUAL; - conds[0].conditionValue.r#type = FWP_UINT8; - conds[0].conditionValue.Anonymous.uint8 = 17; - conds[1].fieldKey = FWPM_CONDITION_IP_LOCAL_PORT; - conds[1].matchType = FWP_MATCH_EQUAL; - conds[1].conditionValue.r#type = FWP_UINT16; - conds[1].conditionValue.Anonymous.uint16 = 68; - conds[2].fieldKey = FWPM_CONDITION_IP_REMOTE_PORT; - conds[2].matchType = FWP_MATCH_EQUAL; - conds[2].conditionValue.r#type = FWP_UINT16; - conds[2].conditionValue.Anonymous.uint16 = 67; - add_filter( - engine, - seq, - FWPM_LAYER_ALE_AUTH_CONNECT_V4, - weight, - FWP_ACTION_PERMIT, - "LD-FDPI Permit DHCPv4", - &mut conds, - ) -} - -unsafe fn add_lan( - engine: HANDLE, - seq: &mut u8, - weight: u64, - net: u32, - mask: u32, -) -> Result<(), String> { - let mut addr = FWP_V4_ADDR_AND_MASK { addr: net, mask }; - let mut conds: [FWPM_FILTER_CONDITION0; 2] = std::mem::zeroed(); - conds[0].fieldKey = FWPM_CONDITION_IP_REMOTE_ADDRESS; - conds[0].matchType = FWP_MATCH_EQUAL; - conds[0].conditionValue.r#type = FWP_V4_ADDR_MASK; - conds[0].conditionValue.Anonymous.v4AddrMask = &mut addr; - conds[1].fieldKey = FWPM_CONDITION_IP_REMOTE_PORT; - conds[1].matchType = FWP_MATCH_NOT_EQUAL; - conds[1].conditionValue.r#type = FWP_UINT16; - conds[1].conditionValue.Anonymous.uint16 = 53; - add_filter( - engine, - seq, - FWPM_LAYER_ALE_AUTH_CONNECT_V4, - weight, - FWP_ACTION_PERMIT, - "LD-FDPI Permit LAN Subnet", - &mut conds, - ) -} - -unsafe fn add_tunnel_dns( - engine: HANDLE, - seq: &mut u8, - weight: u64, - luid: u64, - dns: u32, - port: u16, - proto: u8, -) -> Result<(), String> { - let mut luid = luid; - let mut addr = FWP_V4_ADDR_AND_MASK { - addr: dns, - mask: 0xFFFF_FFFF, - }; - let mut conds: [FWPM_FILTER_CONDITION0; 4] = std::mem::zeroed(); - conds[0].fieldKey = FWPM_CONDITION_IP_LOCAL_INTERFACE; - conds[0].matchType = FWP_MATCH_EQUAL; - conds[0].conditionValue.r#type = FWP_UINT64; - conds[0].conditionValue.Anonymous.uint64 = &mut luid; - conds[1].fieldKey = FWPM_CONDITION_IP_REMOTE_ADDRESS; - conds[1].matchType = FWP_MATCH_EQUAL; - conds[1].conditionValue.r#type = FWP_V4_ADDR_MASK; - conds[1].conditionValue.Anonymous.v4AddrMask = &mut addr; - conds[2].fieldKey = FWPM_CONDITION_IP_REMOTE_PORT; - conds[2].matchType = FWP_MATCH_EQUAL; - conds[2].conditionValue.r#type = FWP_UINT16; - conds[2].conditionValue.Anonymous.uint16 = port; - conds[3].fieldKey = FWPM_CONDITION_IP_PROTOCOL; - conds[3].matchType = FWP_MATCH_EQUAL; - conds[3].conditionValue.r#type = FWP_UINT8; - conds[3].conditionValue.Anonymous.uint8 = proto; - add_filter( - engine, - seq, - FWPM_LAYER_ALE_AUTH_CONNECT_V4, - weight, - FWP_ACTION_PERMIT, - "LD-FDPI Permit Tunnel DNS", - &mut conds, - ) -} - -unsafe fn add_port_block( - engine: HANDLE, - seq: &mut u8, - layer: GUID, - weight: u64, - port: u16, -) -> Result<(), String> { - let mut cond: FWPM_FILTER_CONDITION0 = std::mem::zeroed(); - cond.fieldKey = FWPM_CONDITION_IP_REMOTE_PORT; - cond.matchType = FWP_MATCH_EQUAL; - cond.conditionValue.r#type = FWP_UINT16; - cond.conditionValue.Anonymous.uint16 = port; - add_filter( - engine, - seq, - layer, - weight, - FWP_ACTION_BLOCK, - "LD-FDPI Block Untrusted DNS", - std::slice::from_mut(&mut cond), - ) -} - -unsafe fn add_stun_block( - engine: HANDLE, - seq: &mut u8, - layer: GUID, - weight: u64, - low: u16, - high: u16, -) -> Result<(), String> { - let mut range = FWP_RANGE0 { - valueLow: FWP_VALUE0 { - r#type: FWP_UINT16, - Anonymous: FWP_VALUE0_0 { uint16: low }, - }, - valueHigh: FWP_VALUE0 { - r#type: FWP_UINT16, - Anonymous: FWP_VALUE0_0 { uint16: high }, - }, - }; - let mut conds: [FWPM_FILTER_CONDITION0; 2] = std::mem::zeroed(); - conds[0].fieldKey = FWPM_CONDITION_IP_PROTOCOL; - conds[0].matchType = FWP_MATCH_EQUAL; - conds[0].conditionValue.r#type = FWP_UINT8; - conds[0].conditionValue.Anonymous.uint8 = 17; - conds[1].fieldKey = FWPM_CONDITION_IP_REMOTE_PORT; - conds[1].matchType = FWP_MATCH_RANGE; - conds[1].conditionValue.r#type = FWP_RANGE_TYPE; - conds[1].conditionValue.Anonymous.rangeValue = &mut range; - add_filter( - engine, - seq, - layer, - weight, - FWP_ACTION_BLOCK, - "LD-FDPI Block Physical STUN", - &mut conds, - ) -} - -unsafe fn add_luid_permit( - engine: HANDLE, - seq: &mut u8, - layer: GUID, - weight: u64, - luid: u64, -) -> Result<(), String> { - let mut luid = luid; - let mut cond: FWPM_FILTER_CONDITION0 = std::mem::zeroed(); - cond.fieldKey = FWPM_CONDITION_IP_LOCAL_INTERFACE; - cond.matchType = FWP_MATCH_EQUAL; - cond.conditionValue.r#type = FWP_UINT64; - cond.conditionValue.Anonymous.uint64 = &mut luid; - add_filter( - engine, - seq, - layer, - weight, - FWP_ACTION_PERMIT, - "LD-FDPI Permit Tunnel LUID", - std::slice::from_mut(&mut cond), - ) -} - -unsafe fn add_catchall( - engine: HANDLE, - seq: &mut u8, - layer: GUID, - weight: u64, -) -> Result<(), String> { - add_filter( - engine, - seq, - layer, - weight, - FWP_ACTION_BLOCK, - "LD-FDPI CatchAll Block", - &mut [], - ) -} // --------------------------------------------------------------------------- // FDPI QUIC compatibility layer // --------------------------------------------------------------------------- @@ -735,6 +157,8 @@ fn fdpi_app_candidates() -> Vec { push(base.join(r"Mozilla Firefox\firefox.exe")); push(base.join(r"Opera\launcher.exe")); push(base.join(r"Discord\Discord.exe")); + push(base.join(r"DiscordPTB\DiscordPTB.exe")); + push(base.join(r"DiscordCanary\DiscordCanary.exe")); } if let Some(pf86) = std::env::var_os("ProgramFiles(x86)") { let base = PathBuf::from(pf86); @@ -743,21 +167,42 @@ fn fdpi_app_candidates() -> Vec { push(base.join(r"BraveSoftware\Brave-Browser\Application\brave.exe")); push(base.join(r"Mozilla Firefox\firefox.exe")); push(base.join(r"Opera\launcher.exe")); + push(base.join(r"Discord\Discord.exe")); + push(base.join(r"DiscordPTB\DiscordPTB.exe")); + push(base.join(r"DiscordCanary\DiscordCanary.exe")); } if let Some(local) = std::env::var_os("LOCALAPPDATA") { let base = PathBuf::from(local); push(base.join(r"Programs\Opera\launcher.exe")); push(base.join(r"Discord\Update.exe")); - let discord = base.join("Discord"); - if let Ok(entries) = std::fs::read_dir(&discord) { - for entry in entries.flatten() { - let name = entry.file_name().to_string_lossy().to_string(); - if name.to_lowercase().starts_with("app-") { - push(entry.path().join("Discord.exe")); + push(base.join(r"DiscordPTB\Update.exe")); + push(base.join(r"DiscordCanary\Update.exe")); + for folder in ["Discord", "DiscordPTB", "DiscordCanary"] { + let discord = base.join(folder); + if let Ok(entries) = std::fs::read_dir(&discord) { + for entry in entries.flatten() { + let name = entry.file_name().to_string_lossy().to_string(); + if name.to_lowercase().starts_with("app-") { + let exe = match folder { + "DiscordPTB" => "DiscordPTB.exe", + "DiscordCanary" => "DiscordCanary.exe", + _ => "Discord.exe", + }; + push(entry.path().join(exe)); + } } } } } + // WebView2 hosts (Teams, Outlook, Discord web wrappers) also use QUIC. + if let Some(pf86) = std::env::var_os("ProgramFiles(x86)") { + let edge = PathBuf::from(pf86).join(r"Microsoft\EdgeWebView\Application"); + if let Ok(entries) = std::fs::read_dir(&edge) { + for entry in entries.flatten() { + push(entry.path().join("msedgewebview2.exe")); + } + } + } out } @@ -791,6 +236,62 @@ unsafe fn add_fdpi_filter( Ok(()) } +unsafe fn add_fdpi_ipv6_prefix_permit( + engine: HANDLE, + seq: &mut u8, + weight: u64, + prefix: [u8; 16], + prefix_length: u8, + name: &str, +) -> Result<(), String> { + let mut addr = FWP_V6_ADDR_AND_MASK { + addr: prefix, + prefixLength: prefix_length, + }; + let mut cond: FWPM_FILTER_CONDITION0 = std::mem::zeroed(); + cond.fieldKey = FWPM_CONDITION_IP_REMOTE_ADDRESS; + cond.matchType = FWP_MATCH_EQUAL; + cond.conditionValue.r#type = FWP_V6_ADDR_MASK; + cond.conditionValue.Anonymous.v6AddrMask = &mut addr; + add_fdpi_filter( + engine, + seq, + FWPM_LAYER_ALE_AUTH_CONNECT_V6, + weight, + FWP_ACTION_PERMIT, + name, + std::slice::from_mut(&mut cond), + ) +} + +unsafe fn add_fdpi_port_permit( + engine: HANDLE, + seq: &mut u8, + weight: u64, + port: u16, + proto: u8, + name: &str, +) -> Result<(), String> { + let mut conds: [FWPM_FILTER_CONDITION0; 2] = std::mem::zeroed(); + conds[0].fieldKey = FWPM_CONDITION_IP_REMOTE_PORT; + conds[0].matchType = FWP_MATCH_EQUAL; + conds[0].conditionValue.r#type = FWP_UINT16; + conds[0].conditionValue.Anonymous.uint16 = port; + conds[1].fieldKey = FWPM_CONDITION_IP_PROTOCOL; + conds[1].matchType = FWP_MATCH_EQUAL; + conds[1].conditionValue.r#type = FWP_UINT8; + conds[1].conditionValue.Anonymous.uint8 = proto; + add_fdpi_filter( + engine, + seq, + FWPM_LAYER_ALE_AUTH_CONNECT_V6, + weight, + FWP_ACTION_PERMIT, + name, + &mut conds, + ) +} + unsafe fn add_fdpi_port_block( engine: HANDLE, seq: &mut u8, @@ -890,8 +391,37 @@ pub fn enable_fdpi_quic_block() -> Result { )?; } } - // FDPI has no IPv6 tunnel. Fail closed on physical IPv6 DNS/HTTPS - // instead of letting QUIC/DoH bypass the IPv4 proxy. + // FDPI has no IPv6 tunnel. Fail closed on physical IPv6 DNS/HTTPS, + // but preserve local link-local/ULA and DHCPv6 traffic. + let mut link_local = [0u8; 16]; + link_local[0] = 0xfe; + link_local[1] = 0x80; + add_fdpi_ipv6_prefix_permit( + engine.0, + &mut seq, + 60, + link_local, + 10, + "LD-FDPI Permit IPv6 Link-Local", + )?; + let mut ula = [0u8; 16]; + ula[0] = 0xfc; + add_fdpi_ipv6_prefix_permit( + engine.0, + &mut seq, + 60, + ula, + 7, + "LD-FDPI Permit IPv6 ULA", + )?; + add_fdpi_port_permit( + engine.0, + &mut seq, + 60, + 547, + 17, + "LD-FDPI Permit DHCPv6", + )?; for port in [53u16, 443u16] { for proto in [6u8, 17u8] { add_fdpi_port_block( diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 40e0fa3..b0ee040 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -1,6 +1,6 @@ { "productName": "LD FDPI", - "version": "1.7.3", + "version": "1.8.12", "identifier": "com.ldfdpi.desktop", "build": { "beforeDevCommand": "npm run dev", @@ -43,9 +43,6 @@ "externalBin": [ "binaries/spoofdpi" ], - "resources": [ - "resources/amneziawg.msi" - ], "windows": { "webviewInstallMode": { "type": "embedBootstrapper", diff --git a/src/App.jsx b/src/App.jsx index 7c9b20c..b47b63d 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -1,12 +1,8 @@ import React, { useEffect, useMemo, useRef, useState } from "react"; import { ShieldCheck, - ShieldAlert, - Shield, Power, Zap, - Globe, - Gamepad2, GraduationCap, DoorOpen, Gauge, @@ -21,8 +17,6 @@ import { RotateCcw, Wifi, Smartphone, - Lock, - Cpu, Trash2, AlertTriangle, CheckCircle2, @@ -30,7 +24,6 @@ import { X, Languages, Sparkles, - Server, FolderOpen, Search, } from "lucide-react"; @@ -43,9 +36,10 @@ import { buildSpoofDpiArgs, SPOOFDPI_VERSION, } from "./utils/tauriBridge"; -import { listen } from "@tauri-apps/api/event"; import { check as checkTauriUpdate } from "@tauri-apps/plugin-updater"; import UpdatePanel from "./components/UpdatePanel"; +import NetworkRepairPanel from "./components/NetworkRepairPanel"; +import { isNewerVersion } from "./utils/version"; const EMPTY_STATUS = { isConnected: false, @@ -56,6 +50,10 @@ const EMPTY_STATUS = { discordVerified: false, webVerified: false, latencyMs: 0, + networkMs: 0, + proxyConnectMs: 0, + proxyTlsMs: 0, + proxyTotalMs: 0, lastError: null, }; @@ -131,7 +129,7 @@ export default function App() { const [engineVersion, setEngineVersion] = useState(`SpoofDPI ${SPOOFDPI_VERSION}`); const [localIp, setLocalIp] = useState("127.0.0.1"); const [isAdmin, setIsAdmin] = useState(false); - const [appVersion, setAppVersion] = useState("1.7.3"); + const [appVersion, setAppVersion] = useState("1.8.12"); const [updateInfo, setUpdateInfo] = useState(null); const [updateBusy, setUpdateBusy] = useState(false); const [updateError, setUpdateError] = useState(null); @@ -155,12 +153,6 @@ export default function App() { const [eduroam, setEduroam] = useState(null); const [captive, setCaptive] = useState(null); const [autoBypass, setAutoBypass] = useState(null); - const [vpn, setVpn] = useState(null); - const [vpnBusy, setVpnBusy] = useState(null); - const [vpnError, setVpnError] = useState(null); - const [vpnProgress, setVpnProgress] = useState(null); - const [dnsCheck, setDnsCheck] = useState(null); - const [dnsChecking, setDnsChecking] = useState(false); const dohAutoRan = useRef(false); const [uiActive, setUiActive] = useState( () => typeof document === "undefined" || document.visibilityState !== "hidden" @@ -312,44 +304,6 @@ export default function App() { // eslint-disable-next-line react-hooks/exhaustive-deps }, [runtimeReady, config?.dohProvider]); - // VPN progress comes from the Rust zero-touch setup pipeline. - useEffect(() => { - let unlisten = null; - let cancelled = false; - listen("vpn-progress", (event) => { - if (!cancelled) setVpnProgress(String(event.payload || "")); - }) - .then((fn) => { - if (cancelled) fn(); - else unlisten = fn; - }) - .catch(() => {}); - return () => { - cancelled = true; - if (unlisten) unlisten(); - }; - }, []); - - // VPN status is polled globally so DPI and VPN stay mutually exclusive. - useEffect(() => { - if (!runtimeReady) return undefined; - let cancelled = false; - const load = async () => { - try { - const snapshot = await invokeTauri("get_vpn_status"); - if (!cancelled) setVpn(snapshot); - } catch { - /* client not installed or service unavailable */ - } - }; - load(); - const timer = setInterval(load, 5000); - return () => { - cancelled = true; - clearInterval(timer); - }; - }, [runtimeReady]); - // Eduroam SSID/MTU snapshot (only while the mode is selected and the UI is active). useEffect(() => { if (!runtimeReady || !uiActive || config?.connectionMode !== "eduroam") { @@ -377,19 +331,21 @@ export default function App() { let cancelled = false; checkTauriUpdate() .then((update) => { - if (!cancelled && update) { + if (!cancelled && update && isNewerVersion(update.version, appVersion)) { setUpdateInfo({ latest_version: update.version, notes: update.body || "", page_url: "https://ttmadethat.shop/ld-fdpi", }); + } else if (!cancelled) { + setUpdateInfo(null); } }) .catch(() => {}); return () => { cancelled = true; }; - }, [runtimeReady]); + }, [runtimeReady, appVersion]); const handleInstallUpdate = async () => { if (updateBusy) return; @@ -435,7 +391,7 @@ export default function App() { }); setSettingsVisible(query ? visible : items.length); return undefined; - }, [view, settingsQuery, config?.connectionMode, vpn?.connected, resetArmed]); + }, [view, settingsQuery, config?.connectionMode, resetArmed]); const jumpToSetting = (id) => { setSettingsQuery(""); @@ -502,12 +458,6 @@ export default function App() { const handleConnect = async () => { if (!config) return; - if (vpn?.connected) { - const message = "VPN açıkken DPI bağlantısı başlatılamaz. Önce VPN sekmesinden bağlantıyı kesin."; - setLastError(message); - pushLog("ERROR", message); - return; - } setBusy("connect"); setLastError(null); pushLog("INFO", t.log.connecting); @@ -555,6 +505,10 @@ export default function App() { discordVerified: Boolean(res.discordVerified), webVerified: Boolean(res.webVerified), latencyMs: res.latencyMs || 0, + networkMs: res.networkMs || 0, + proxyConnectMs: res.proxyConnectMs || 0, + proxyTlsMs: res.proxyTlsMs || 0, + proxyTotalMs: res.proxyTotalMs || 0, })); pushLog("SUCCESS", res.message); if (res.dohProvider) { @@ -594,6 +548,10 @@ export default function App() { discordVerified: false, webVerified: false, latencyMs: 0, + networkMs: 0, + proxyConnectMs: 0, + proxyTlsMs: 0, + proxyTotalMs: 0, })); prevConnected.current = false; pushLog(res.externalProxyDetected ? "WARN" : "SUCCESS", res.message); @@ -622,7 +580,7 @@ export default function App() { setResetArmed(false); const defaults = { autoStart: true, - autoConnect: false, + autoConnect: true, minimizeToTray: true, lanSharing: false, captiveAssistant: true, @@ -819,42 +777,6 @@ export default function App() { } }; - const handleVpnToggle = async () => { - if (!vpn?.connected && connected) { - const message = "DPI bağlantısı açıkken VPN başlatılamaz. Önce DPI bağlantısını kesin."; - setVpnError(message); - pushLog("ERROR", message); - return; - } - setVpnBusy(vpn?.connected ? "disconnect" : "connect"); - setVpnError(null); - setVpnProgress(null); - try { - const snapshot = await invokeTauri(vpn?.connected ? "disconnect_vpn" : "connect_vpn"); - setVpn(snapshot); - pushLog(snapshot.connected ? "SUCCESS" : "INFO", snapshot.detail); - } catch (error) { - setVpnError(String(error)); - pushLog("ERROR", String(error)); - } finally { - setVpnBusy(null); - setVpnProgress(null); - } - }; - - const handleDnsCheck = async () => { - setDnsChecking(true); - try { - const result = await invokeTauri("run_dns_check"); - setDnsCheck(result); - pushLog(result.leakRisk ? "WARN" : "INFO", result.detail); - } catch (error) { - pushLog("ERROR", String(error)); - } finally { - setDnsChecking(false); - } - }; - const handleEmergencyRestore = async () => { try { const res = await invokeTauri("emergency_sentinel_restore"); @@ -907,13 +829,10 @@ export default function App() { ); const connected = status.isConnected; - const vpnConnected = Boolean(vpn?.connected); const connecting = status.connecting || busy === "connect"; const autoWaiting = !connected && !connecting && status.desiredConnected; - const statusTitle = vpnConnected - ? t.status.vpnConnected - : connected + const statusTitle = connected ? t.status.fdpiConnected : connecting ? t.status.connecting @@ -921,7 +840,7 @@ export default function App() { ? t.status.autoConnecting : t.status.disconnected; - const statusTone = vpnConnected || connected ? "green" : connecting || autoWaiting ? "amber" : "slate"; + const statusTone = connected ? "green" : connecting || autoWaiting ? "amber" : "slate"; if (!config) { return ( @@ -959,11 +878,7 @@ export default function App() {

    {t.nav[view]}

    - {vpnConnected - ? vpn?.endpoint || "AmneziaWG" - : connected - ? `${localIp}:${config.proxyPort}` - : "LD FDPI"} + {connected ? `${localIp}:${config.proxyPort}` : "LD FDPI"}

    @@ -1063,7 +978,7 @@ export default function App() { )} - - -

    - {vpn?.connected ? t.vpn.connected : t.vpn.disconnected} -

    -

    - {connected - ? "DPI bağlantısı açık. VPN kullanmak için önce DPI bağlantısını kesin." - : vpnError || vpnProgress || vpn?.detail || "BAĞLAN'a bas; gerisini uygulama halleder."} -

    - -
    -
    {t.vpn.server}
    -
    - {vpn?.endpoint || "116.202.14.171:42771"} -
    -
    - {vpn?.address || "10.8.1.5/32"} - {vpn?.connected ? t.vpn.connected : t.vpn.disconnected} -
    -
    - - - {dnsCheck && ( -
    -
    DNS: {dnsCheck.servers?.join(", ") || "—"}
    -
    Çıkış IP: {dnsCheck.egressIp || "—"}
    -
    - {dnsCheck.detail} -
    -
    - )} - -

    {t.vpn.note}

    - - )} - {view === "settings" && ( <>
    @@ -1315,11 +1149,6 @@ export default function App() {
    )} - {vpn?.connected && ( -
    - VPN açık. DPI ayarları kilitli; değiştirmek için önce VPN sekmesinden bağlantıyı kesin. -
    - )} {config.captiveAssistant !== false && ( -
    +
    {t.captive.title} @@ -1517,7 +1346,7 @@ export default function App() {

    {t.captive.note}

    )} -
    +
    {t.mode.eduroam} @@ -1531,7 +1360,7 @@ export default function App() {

    {t.mode.eduroamNote}

    {config.connectionMode === "eduroam" && ( -
    +
    @@ -1636,7 +1465,7 @@ export default function App() {
    )} {/* Bypass strength */} -
    +
    {t.power.title} @@ -1670,6 +1499,19 @@ export default function App() { )}
    )} + {connected && status.networkMs > 0 && ( +
    +
    + {lang === "tr" ? "Bağlantı ölçümü" : "Connection measurements"} +
    +
    + {lang === "tr" ? "Ağ pingi" : "Network"}: {status.networkMs} ms + CONNECT: {status.proxyConnectMs} ms + TLS: {status.proxyTlsMs} ms + {lang === "tr" ? "Proxy toplam" : "Proxy total"}: {status.proxyTotalMs} ms +
    +
    + )}
    DNS
    -
    +
    {t.dns.title} @@ -1791,7 +1633,7 @@ export default function App() {
    {lang === "tr" ? "Gelişmiş" : "Advanced"}
    -
    +
    @@ -1840,6 +1682,7 @@ export default function App() {
    +
    )} @@ -1940,10 +1786,9 @@ export default function App() { {/* Bottom navigation */}
    ); } diff --git a/src/i18n.js b/src/i18n.js index 834d3df..728b8bf 100644 --- a/src/i18n.js +++ b/src/i18n.js @@ -1,10 +1,9 @@ export const TEXT = { tr: { - nav: { home: "Bağlantı", vpn: "VPN", settings: "Ayarlar", about: "Hakkında" }, + nav: { home: "Bağlantı", settings: "Ayarlar", about: "Hakkında" }, status: { connected: "Bağlı ve Korunuyor", fdpiConnected: "FDPI Bağlı", - vpnConnected: "VPN Bağlı", disconnected: "Bağlı Değil", connecting: "Bağlanıyor...", autoConnecting: "Otomatik bağlanıyor...", @@ -43,22 +42,6 @@ export const TEXT = { eduroamDesc: "Kurumsal Wi-Fi için DoH + MTU 1400 + WinHTTP/WinINet; Discord metin ve uygulama trafiği.", eduroamNote: "Eduroam modu yalnızca yerel ağ yığınını optimize eder; kurumun güvenlik duvarını aşmaz.", }, - vpn: { - title: "VPN", - server: "AmneziaWG Sunucusu", - connect: "VPN'E BAĞLAN", - disconnect: "VPN BAĞLANTISINI KES", - install: "AmneziaWG İstemcisini Kur", - installing: "Kuruluyor...", - preparing: "Hazırlanıyor...", - import: "AmneziaWG .conf İçe Aktar", - restore: "Gömülü Sunucuyu Geri Yükle", - note: "Tam tünel: tüm trafik sunucu üzerinden gider. LD FDPI proxy'siyle birlikte kullanılabilir.", - connected: "VPN bağlı", - disconnected: "VPN bağlı değil", - noClient: "AmneziaWG istemcisi kurulu değil.", - noConfig: "VPN yapılandırması yok; .conf içe aktarın.", - }, captive: { title: "Oturum Açmadan Bağlantı", desc: "Kafe/otel captive portalını algılar. Açık ağda doğrudan bağlanır; giriş duvarı varsa portalı tarayıcıda açar. Normal/Oyun modu ayarlarını değiştirmez.", @@ -119,8 +102,8 @@ export const TEXT = { startup: "Başlangıç", autoStart: "Windows açıldığında otomatik başlat", autoStartDesc: "Yönetici göreviyle, UAC sormadan sistem tepsisinde başlar.", - autoConnect: "Uygulama açıldığında otomatik bağlan", - autoConnectDesc: "Arayüz yüklenmeden motor ve proxy hazırlanır.", + autoConnect: "Açılışta otomatik bağlan", + autoConnectDesc: "Bilgisayar veya uygulama açılırken FDPI proxy otomatik olarak başlatılır.", minimize: "Pencere kapatılınca tepsiye küçült", minimizeDesc: "X'e basınca bağlantı kopmaz, arka planda çalışmaya devam eder.", lan: "LAN Paylaşımı", @@ -181,11 +164,10 @@ export const TEXT = { }, }, en: { - nav: { home: "Connection", vpn: "VPN", settings: "Settings", about: "About" }, + nav: { home: "Connection", settings: "Settings", about: "About" }, status: { connected: "Connected & Protected", fdpiConnected: "FDPI Connected", - vpnConnected: "VPN Connected", disconnected: "Disconnected", connecting: "Connecting...", autoConnecting: "Auto-connecting...", @@ -224,22 +206,6 @@ export const TEXT = { eduroamDesc: "DoH + MTU 1400 + WinHTTP/WinINet for campus Wi-Fi; Discord text and app traffic.", eduroamNote: "Eduroam mode only tunes the local network stack; it does not bypass your institution's firewall.", }, - vpn: { - title: "VPN", - server: "AmneziaWG Server", - connect: "CONNECT VPN", - disconnect: "DISCONNECT VPN", - install: "Install AmneziaWG Client", - installing: "Installing...", - preparing: "Preparing...", - import: "Import AmneziaWG .conf", - restore: "Restore Built-in Server", - note: "Full tunnel: all traffic goes through the server. Can be used alongside the LD FDPI proxy.", - connected: "VPN connected", - disconnected: "VPN disconnected", - noClient: "AmneziaWG client is not installed.", - noConfig: "No VPN configuration; import a .conf file.", - }, captive: { title: "Connect Without Login", desc: "Detects a cafe/hotel captive portal. Connects directly when the network is open; if there is a login wall, opens the portal in your browser. Does not change Normal/Game mode settings.", @@ -300,8 +266,8 @@ export const TEXT = { startup: "Startup", autoStart: "Start with Windows", autoStartDesc: "Starts elevated in the tray at logon without a UAC prompt.", - autoConnect: "Connect automatically on launch", - autoConnectDesc: "Engine and proxy are ready before the UI loads.", + autoConnect: "Auto-connect on launch", + autoConnectDesc: "Automatically starts the FDPI proxy when your PC or app boots.", minimize: "Minimize to tray when closed", minimizeDesc: "Closing the window keeps the connection alive in the background.", lan: "LAN Sharing", diff --git a/src/utils/version.js b/src/utils/version.js new file mode 100644 index 0000000..58f51d8 --- /dev/null +++ b/src/utils/version.js @@ -0,0 +1,20 @@ +// Monotonic version gate for the updater. The server must never be able to +// downgrade a client by serving an older or equal latest.json. +export function parseVersion(value) { + const match = String(value || "") + .trim() + .replace(/^v/i, "") + .match(/^(\d+)\.(\d+)\.(\d+)/); + return match ? match.slice(1, 4).map(Number) : null; +} + +export function isNewerVersion(remote, current) { + const a = parseVersion(remote); + const b = parseVersion(current); + if (!a || !b) return false; + for (let i = 0; i < 3; i += 1) { + if (a[i] > b[i]) return true; + if (a[i] < b[i]) return false; + } + return false; +}