chore: add bilingual documentation, MIT license, and clean repository for Forgejo
Some checks are pending
Release / build (push) Waiting to run
Some checks are pending
Release / build (push) Waiting to run
This commit is contained in:
parent
5efc65a15b
commit
84ca3d9bd6
118 changed files with 11236 additions and 6425 deletions
|
|
@ -1,4 +1,3 @@
|
||||||
# Build-time environment (never commit real values)
|
# Build-time environment (never commit real values)
|
||||||
LD_FDPI_APP_SECRET=
|
|
||||||
TAURI_SIGNING_PRIVATE_KEY=
|
TAURI_SIGNING_PRIVATE_KEY=
|
||||||
TAURI_SIGNING_PRIVATE_KEY_PASSWORD=
|
TAURI_SIGNING_PRIVATE_KEY_PASSWORD=
|
||||||
|
|
|
||||||
1
.github/workflows/release.yml
vendored
1
.github/workflows/release.yml
vendored
|
|
@ -63,7 +63,6 @@ jobs:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
|
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
|
||||||
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
|
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
|
||||||
LD_FDPI_APP_SECRET: ${{ secrets.LD_FDPI_APP_SECRET }}
|
|
||||||
with:
|
with:
|
||||||
tagName: ${{ github.event_name == 'workflow_dispatch' && format('v{0}', inputs.version) || github.ref_name }}
|
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 }}"
|
releaseName: "LD FDPI ${{ github.event_name == 'workflow_dispatch' && inputs.version || github.ref_name }}"
|
||||||
|
|
|
||||||
30
.gitignore
vendored
30
.gitignore
vendored
|
|
@ -17,8 +17,11 @@ src-tauri/binaries/*.log
|
||||||
!src-tauri/binaries/spoofdpi-x86_64-pc-windows-msvc.exe
|
!src-tauri/binaries/spoofdpi-x86_64-pc-windows-msvc.exe
|
||||||
!src-tauri/binaries/.gitkeep
|
!src-tauri/binaries/.gitkeep
|
||||||
|
|
||||||
# Build outputs (uploaded to GitHub Releases instead)
|
# Build outputs (uploaded to Releases instead)
|
||||||
release/
|
release/
|
||||||
|
linuxFDPI/release/
|
||||||
|
*.AppImage
|
||||||
|
*.deb
|
||||||
|
|
||||||
# Logs & OS
|
# Logs & OS
|
||||||
*.log
|
*.log
|
||||||
|
|
@ -34,11 +37,18 @@ Thumbs.db
|
||||||
*.sln
|
*.sln
|
||||||
*.sw?
|
*.sw?
|
||||||
|
|
||||||
# Personal SSH shortcut (never publish)
|
# Security & Local Server Scripts (NEVER commit)
|
||||||
/baðlan.bat
|
bağlan.bat
|
||||||
|
*baglan*.bat
|
||||||
|
ba*lan.bat
|
||||||
*.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)
|
# Private AmneziaWG client config (embedded locally into the installer; never publish source)
|
||||||
src-tauri/resources/amnezia_for_awg.conf
|
src-tauri/resources/amnezia_for_awg.conf
|
||||||
|
|
@ -66,8 +76,14 @@ src-tauri/.tauri/
|
||||||
*.rej
|
*.rej
|
||||||
.vscode/
|
.vscode/
|
||||||
.idea/
|
.idea/
|
||||||
|
__pycache__/
|
||||||
|
*.pyc
|
||||||
|
*.pyo
|
||||||
src-tauri/binaries/*.log
|
src-tauri/binaries/*.log
|
||||||
src-tauri/resources/amnezia_for_awg.conf
|
|
||||||
|
|
||||||
# Website local output
|
# Website local output & release archives
|
||||||
site/*.tmp
|
site/*.tmp
|
||||||
|
site/*.deb
|
||||||
|
site/*.zip
|
||||||
|
site/*-live.html
|
||||||
|
site/app-live.js
|
||||||
2
LICENSE
2
LICENSE
|
|
@ -1,6 +1,6 @@
|
||||||
MIT License
|
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
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|
|
||||||
334
README.md
334
README.md
|
|
@ -1,294 +1,96 @@
|
||||||
<div align="center">
|
<div align="center">
|
||||||
<img src="./app-icon.png" width="128" height="128" alt="LD FDPI logo" />
|
|
||||||
<h1>LD FDPI</h1>
|
# LD FDPI
|
||||||
<p><strong>Zero-touch VPN + DPI bypass for Windows.</strong><br/>
|
|
||||||
Tauri v2 · Rust · React · AmneziaWG · SpoofDPI</p>
|
**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**
|
||||||
<p>
|
|
||||||
<a href="https://github.com/L1lDosto/LD-FDPI/releases/latest">
|
[](./LICENSE)
|
||||||
<img src="https://img.shields.io/badge/İndir-v1.7.3-2ea44f?style=for-the-badge&logo=windows" alt="Download" />
|
[](https://git.ttmadethat.shop/LilDosto/LD-FDPI/releases/latest)
|
||||||
</a>
|
[](https://v2.tauri.app)
|
||||||
<img src="https://img.shields.io/badge/Platform-Windows%2010%20%7C%2011-0078D6?style=for-the-badge&logo=windows" alt="Windows" />
|
[](https://git.ttmadethat.shop/LilDosto/LD-FDPI/releases/latest)
|
||||||
<img src="https://img.shields.io/badge/License-MIT-10B981?style=for-the-badge" alt="MIT" />
|
|
||||||
<img src="https://img.shields.io/badge/Rust-1.80%2B-B7410E?style=for-the-badge&logo=rust" alt="Rust" />
|
[🇹🇷 Türkçe](#-türkçe) • [🇬🇧 English](#-english) • [📦 Releases](https://git.ttmadethat.shop/LilDosto/LD-FDPI/releases/latest)
|
||||||
</p>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
**LD FDPI**, Windows 10/11 x64 için iki modlu bir ağ aracıdı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.
|
||||||
|
|
||||||
- **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.
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Ö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.
|
### Özellikler
|
||||||
- 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.
|
|
||||||
|
|
||||||
### 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**.
|
### Teknoloji Yığını
|
||||||
- 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.
|
|
||||||
|
|
||||||
### 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.
|
### Kurulum ve Kullanım
|
||||||
- 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.
|
|
||||||
|
|
||||||
### Dayanıklılık
|
**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).
|
||||||
- Elektrik kesintisi/`taskkill` sonrası açılışta kirli durum kurtarma.
|
2. Zorla kapatma sonrasında sistem proxy'si takılı kalırsa temizlemek için:
|
||||||
- Ölü `127.0.0.1:<port>` proxy’sinin sessizce temizlenmesi.
|
```powershell
|
||||||
- Yetim `spoofdpi` süreçlerinin temizlenmesi.
|
& "C:\Program Files\LD FDPI\ld-fdpi.exe" --restore-only
|
||||||
- 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
|
|
||||||
|
|
||||||
|
**Geliştirici (Kaynaktan Derleme):**
|
||||||
```powershell
|
```powershell
|
||||||
npm ci
|
npm ci
|
||||||
npm run tauri build
|
npm run check:rust # Rust tip/derleme kontrolü
|
||||||
```
|
npm test # Doğrulama testleri
|
||||||
|
npm run tauri build # Kurulum paketi üretimi
|
||||||
Çıktı:
|
|
||||||
|
|
||||||
```text
|
|
||||||
src-tauri/target/release/bundle/nsis/LD FDPI_<version>_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 = "<server-enrollment-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 = "<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
|
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 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
|
```powershell
|
||||||
npm ci
|
npm ci
|
||||||
npm run dev
|
npm run check:rust # Rust compile check
|
||||||
npm run check:rust
|
npm test # Verification suite
|
||||||
npm test
|
npm run tauri build # Build Windows installer
|
||||||
```
|
|
||||||
|
|
||||||
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"
|
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Güvenlik ve Gizlilik
|
## 📄 Lisans / License
|
||||||
|
|
||||||
- Kaynak kod açıktır; güvenlik açıkları için [SECURITY.md](SECURITY.md) izle.
|
Bu proje [MIT Lisansı](./LICENSE) altında lisanslanmıştır. • Licensed under the [MIT License](./LICENSE).
|
||||||
- `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
|
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,8 @@
|
||||||
|
|
||||||
| Sürüm | Destek |
|
| Sürüm | Destek |
|
||||||
|---|---|
|
|---|---|
|
||||||
| 1.7.x | ✅ |
|
| 1.8.x | ✅ |
|
||||||
| 1.6.x ve öncesi | ❌ |
|
| 1.7.x ve öncesi | ❌ |
|
||||||
|
|
||||||
## Güvenlik açığı bildirimi
|
## Güvenlik açığı bildirimi
|
||||||
|
|
||||||
|
|
@ -23,17 +23,14 @@ Alternatif olarak depo sahibine GitHub üzerinden özel mesaj gönder.
|
||||||
|
|
||||||
Özellikle şunlar ilgi alanına girer:
|
Ö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ı
|
- Proxy sentinel’in ölü proxy bırakması
|
||||||
- Enrollment/peer yetkisiz erişim
|
|
||||||
- Updater imza doğrulamasının atlatılması
|
- Updater imza doğrulamasının atlatılması
|
||||||
- Path traversal, komut enjeksiyonu, ayrıcalık yükseltme
|
- Path traversal, komut enjeksiyonu, ayrıcalık yükseltme
|
||||||
- Hassas anahtar/token sızıntısı
|
- Hassas anahtar/token sızıntısı
|
||||||
|
|
||||||
## Bilinen tasarım sınırları
|
## 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.
|
- Authenticode yoktur; SmartScreen uyarısı beklenir.
|
||||||
- FDPI yalnızca sistem proxy’sini kullanan uygulamaları kapsar.
|
- FDPI yalnızca sistem proxy’sini kullanan uygulamaları kapsar.
|
||||||
- Windows Sandbox, host proxy politikası nedeniyle desteklenmez.
|
- Windows Sandbox, host proxy politikası nedeniyle desteklenmez.
|
||||||
|
|
|
||||||
|
|
@ -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')
|
|
||||||
|
|
@ -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()
|
|
||||||
|
|
@ -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
|
|
||||||
|
|
@ -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}
|
|
||||||
|
|
@ -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,
|
|
||||||
)
|
|
||||||
|
|
@ -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ı. "
|
"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. "
|
"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.")
|
"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; "
|
new_desc = ("Windows için hız kayıpsız SpoofDPI yerel proxy ve DPI bypass aracı. Kur, BAĞLAN'a bas: "
|
||||||
"token veya .conf gerekmez. Kalıcı WFP kill-switch, DNS/IPv6/STUN sızıntı koruması ve "
|
"otomatik başlangıç, Akıllı DoH, Proxy Sentinel ve 15 saniyede kendini onaran 7/24 koruma. "
|
||||||
"10 saniyede kendini onaran tünel. Rust/Tauri v2 + React + SpoofDPI 0.12.2.")
|
"Rust/Tauri v2 + React + SpoofDPI 0.12.2.")
|
||||||
if old_desc not in t:
|
if old_desc not in t:
|
||||||
raise SystemExit('card desc not found')
|
raise SystemExit('card desc not found')
|
||||||
t = t.replace(old_desc, new_desc, 1)
|
t = t.replace(old_desc, new_desc, 1)
|
||||||
|
|
|
||||||
|
|
@ -3,25 +3,26 @@
|
||||||
## 1. Katmanlar
|
## 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.
|
- **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.
|
- **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`):** `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.
|
- **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.
|
- **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.
|
- **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ğı.
|
- **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`.
|
- **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:<port>`, tokio, `Semaphore(50)`, RFC1918 + `.local` için DIRECT.
|
- **PAC (`src-tauri/src/pac_server.rs`):** `0.0.0.0:<port>`, 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.
|
1. `run()` açılmadan önce `hunt_zombie_processes()` + eski WFP/QUIC temizliği + `run_startup_sentinel_check()`.
|
||||||
2. `config.json` okunur, normalize edilir, yazılır.
|
2. `config.json` okunur, normalize/migrate edilir, yazılır.
|
||||||
3. `autostart::apply(auto_start)` görevi oluşturur/siler.
|
3. `autostart::apply(auto_start)` Görev Zamanlayıcısı XML görevini oluşturur/siler.
|
||||||
4. `setup`:
|
4. `setup`:
|
||||||
- `--minimized`/`--autostart` yoksa pencere gösterilir (config'te `visible:false`).
|
- `--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.
|
- `lan_sharing` ise PAC sunucusu arka planda başlatılır.
|
||||||
- 15 sn'lik supervisor başlatılır.
|
- 15 sn'lik 7/24 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.
|
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ışı
|
## 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ı
|
## 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.
|
- `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ış.
|
- `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.
|
- `ld-fdpi.exe --self-test` (12): motor + registry + WinHTTP bayrağı + config round-trip.
|
||||||
|
|
|
||||||
|
|
@ -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: <embedded shared 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=<same value embedded in client>
|
|
||||||
```
|
|
||||||
|
|
||||||
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.
|
|
||||||
23
linuxFDPI/.gitignore
vendored
Normal file
23
linuxFDPI/.gitignore
vendored
Normal file
|
|
@ -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/
|
||||||
21
linuxFDPI/LICENSE
Normal file
21
linuxFDPI/LICENSE
Normal file
|
|
@ -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.
|
||||||
116
linuxFDPI/README.md
Normal file
116
linuxFDPI/README.md
Normal file
|
|
@ -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).
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
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).
|
||||||
53
linuxFDPI/ROADMAP.md
Normal file
53
linuxFDPI/ROADMAP.md
Normal file
|
|
@ -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**.
|
||||||
83
linuxFDPI/docs/ARCHITECTURE.md
Normal file
83
linuxFDPI/docs/ARCHITECTURE.md
Normal file
|
|
@ -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.
|
||||||
55
linuxFDPI/docs/COMPATIBILITY.md
Normal file
55
linuxFDPI/docs/COMPATIBILITY.md
Normal file
|
|
@ -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.
|
||||||
38
linuxFDPI/docs/SECURITY.md
Normal file
38
linuxFDPI/docs/SECURITY.md
Normal file
|
|
@ -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.
|
||||||
23
linuxFDPI/docs/SIDECAR.md
Normal file
23
linuxFDPI/docs/SIDECAR.md
Normal file
|
|
@ -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.
|
||||||
48
linuxFDPI/docs/TESTPLAN.md
Normal file
48
linuxFDPI/docs/TESTPLAN.md
Normal file
|
|
@ -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
|
||||||
BIN
linuxFDPI/docs/screenshot-home.png
Normal file
BIN
linuxFDPI/docs/screenshot-home.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 97 KiB |
BIN
linuxFDPI/docs/screenshot-zorin.png
Normal file
BIN
linuxFDPI/docs/screenshot-zorin.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 152 KiB |
24
linuxFDPI/helper/ld-fdpi-helper.service
Normal file
24
linuxFDPI/helper/ld-fdpi-helper.service
Normal file
|
|
@ -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
|
||||||
208
linuxFDPI/helper/ld_fdpi_helper.py
Normal file
208
linuxFDPI/helper/ld_fdpi_helper.py
Normal file
|
|
@ -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()
|
||||||
6
linuxFDPI/helper/nftables/ld-fdpi.nft
Normal file
6
linuxFDPI/helper/nftables/ld-fdpi.nft
Normal file
|
|
@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
12
linuxFDPI/index.html
Normal file
12
linuxFDPI/index.html
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
<!doctype html>
|
||||||
|
<html lang="tr" class="dark">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
|
<title>LD FDPI Linux</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="root"></div>
|
||||||
|
<script type="module" src="/src/main.jsx"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
2105
linuxFDPI/package-lock.json
generated
Normal file
2105
linuxFDPI/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load diff
24
linuxFDPI/package.json
Normal file
24
linuxFDPI/package.json
Normal file
|
|
@ -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"
|
||||||
|
}
|
||||||
|
}
|
||||||
10
linuxFDPI/packaging/ld-fdpi.desktop
Normal file
10
linuxFDPI/packaging/ld-fdpi.desktop
Normal file
|
|
@ -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
|
||||||
3
linuxFDPI/postcss.config.js
Normal file
3
linuxFDPI/postcss.config.js
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
export default {
|
||||||
|
plugins: {},
|
||||||
|
};
|
||||||
13
linuxFDPI/scripts/build.sh
Normal file
13
linuxFDPI/scripts/build.sh
Normal file
|
|
@ -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
|
||||||
42
linuxFDPI/scripts/install.sh
Normal file
42
linuxFDPI/scripts/install.sh
Normal file
|
|
@ -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."
|
||||||
16
linuxFDPI/scripts/uninstall.sh
Normal file
16
linuxFDPI/scripts/uninstall.sh
Normal file
|
|
@ -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."
|
||||||
4414
linuxFDPI/src-tauri/Cargo.lock
generated
Normal file
4414
linuxFDPI/src-tauri/Cargo.lock
generated
Normal file
File diff suppressed because it is too large
Load diff
24
linuxFDPI/src-tauri/Cargo.toml
Normal file
24
linuxFDPI/src-tauri/Cargo.toml
Normal file
|
|
@ -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"
|
||||||
3
linuxFDPI/src-tauri/build.rs
Normal file
3
linuxFDPI/src-tauri/build.rs
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
fn main() {
|
||||||
|
tauri_build::build()
|
||||||
|
}
|
||||||
7
linuxFDPI/src-tauri/capabilities/default.json
Normal file
7
linuxFDPI/src-tauri/capabilities/default.json
Normal file
|
|
@ -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"]
|
||||||
|
}
|
||||||
BIN
linuxFDPI/src-tauri/icons/128x128.png
Normal file
BIN
linuxFDPI/src-tauri/icons/128x128.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 18 KiB |
BIN
linuxFDPI/src-tauri/icons/32x32.png
Normal file
BIN
linuxFDPI/src-tauri/icons/32x32.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.2 KiB |
BIN
linuxFDPI/src-tauri/icons/icon.ico
Normal file
BIN
linuxFDPI/src-tauri/icons/icon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 76 KiB |
BIN
linuxFDPI/src-tauri/icons/icon.png
Normal file
BIN
linuxFDPI/src-tauri/icons/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 239 KiB |
101
linuxFDPI/src-tauri/src/config.rs
Normal file
101
linuxFDPI/src-tauri/src/config.rs
Normal file
|
|
@ -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::<Config>(&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<PathBuf, String> {
|
||||||
|
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}"));
|
||||||
|
}
|
||||||
|
}
|
||||||
79
linuxFDPI/src-tauri/src/helper.rs
Normal file
79
linuxFDPI/src-tauri/src/helper.rs
Normal file
|
|
@ -0,0 +1,79 @@
|
||||||
|
use serde_json::Value;
|
||||||
|
|
||||||
|
#[cfg(unix)]
|
||||||
|
pub fn call(action: &str) -> Result<Value, String> {
|
||||||
|
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<Value, String> {
|
||||||
|
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<Value, String> {
|
||||||
|
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<Value, String> {
|
||||||
|
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())
|
||||||
|
}
|
||||||
204
linuxFDPI/src-tauri/src/lib.rs
Normal file
204
linuxFDPI/src-tauri/src/lib.rs
Normal file
|
|
@ -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<config::Config>,
|
||||||
|
child: Mutex<Option<Child>>,
|
||||||
|
proxy_active: Mutex<bool>,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[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<String>,
|
||||||
|
}
|
||||||
|
|
||||||
|
fn child_alive(child: &mut Option<Child>) -> 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<config::Config, String> {
|
||||||
|
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<serde_json::Value, String> {
|
||||||
|
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::<AppState>() {
|
||||||
|
cleanup(&state);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
14
linuxFDPI/src-tauri/src/main.rs
Normal file
14
linuxFDPI/src-tauri/src/main.rs
Normal file
|
|
@ -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();
|
||||||
|
}
|
||||||
387
linuxFDPI/src-tauri/src/proxy.rs
Normal file
387
linuxFDPI/src-tauri/src/proxy.rs
Normal file
|
|
@ -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<String, String> {
|
||||||
|
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<Backup, String> {
|
||||||
|
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<Backup, String> {
|
||||||
|
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<Backup, String> {
|
||||||
|
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<Backup, String> {
|
||||||
|
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)")
|
||||||
|
}
|
||||||
|
}
|
||||||
90
linuxFDPI/src-tauri/src/spoofdpi.rs
Normal file
90
linuxFDPI/src-tauri/src/spoofdpi.rs
Normal file
|
|
@ -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<PathBuf> {
|
||||||
|
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<std::fs::File> {
|
||||||
|
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<Child, String> {
|
||||||
|
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();
|
||||||
|
}
|
||||||
54
linuxFDPI/src-tauri/src/update.rs
Normal file
54
linuxFDPI/src-tauri/src/update.rs
Normal file
|
|
@ -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<UpdateInfo, String> {
|
||||||
|
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<u32> {
|
||||||
|
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"))
|
||||||
|
}
|
||||||
39
linuxFDPI/src-tauri/tauri.conf.json
Normal file
39
linuxFDPI/src-tauri/tauri.conf.json
Normal file
|
|
@ -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."
|
||||||
|
}
|
||||||
|
}
|
||||||
312
linuxFDPI/src/App.jsx
Normal file
312
linuxFDPI/src/App.jsx
Normal file
|
|
@ -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 (
|
||||||
|
<div className="app">
|
||||||
|
<header className="topbar">
|
||||||
|
<div className="brand">
|
||||||
|
<div className="logo">LD</div>
|
||||||
|
<div>
|
||||||
|
<strong>LD FDPI Linux</strong>
|
||||||
|
<small>Phase 1 · FDPI MVP</small>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div className="top-actions">
|
||||||
|
<span className="version">v{state.appVersion}</span>
|
||||||
|
<span className={`pill ${status.tone}`}>{status.label}</span>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<main className="content">
|
||||||
|
{error && (
|
||||||
|
<div className="alert error">
|
||||||
|
<AlertTriangle size={16} />
|
||||||
|
<span>{error}</span>
|
||||||
|
<button onClick={() => setError(null)} aria-label="Kapat">×</button>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
{notice && (
|
||||||
|
<div className="alert ok">
|
||||||
|
<CheckCircle2 size={16} />
|
||||||
|
<span>{notice}</span>
|
||||||
|
<button onClick={() => setNotice(null)} aria-label="Kapat">×</button>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
|
||||||
|
<section className="hero">
|
||||||
|
<div>
|
||||||
|
<div className="eyebrow">WINDOWS PARITY · PHASE 1</div>
|
||||||
|
<h1>DPI engelini<br /><span>Linux'ta aş.</span></h1>
|
||||||
|
<p>
|
||||||
|
SpoofDPI tabanlı yerel proxy. Sistem proxy'si GNOME üzerinden
|
||||||
|
uygulanır ve QUIC uyumluluğu systemd helper tarafından yönetilir.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div className={`pulse-card ${connected ? "is-on" : ""}`}>
|
||||||
|
<div className="pulse-orb"><Power size={28} /></div>
|
||||||
|
<div>
|
||||||
|
<strong>{connected ? "Koruma aktif" : "Hazır"}</strong>
|
||||||
|
<small>{connected ? `127.0.0.1:${state.config.proxyPort}` : "Bağlantı bekleniyor"}</small>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section className="card connect-card">
|
||||||
|
<div className="card-head">
|
||||||
|
<div>
|
||||||
|
<div className="kicker">FDPI</div>
|
||||||
|
<h2>SpoofDPI yerel proxy</h2>
|
||||||
|
</div>
|
||||||
|
<span className={`pill ${helperOk ? "ok" : "warn"}`}>
|
||||||
|
helper: {state.helper}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="facts">
|
||||||
|
<div><span>Desktop</span><b>{state.desktop}</b></div>
|
||||||
|
<div><span>SpoofDPI</span><b>{state.spoofdpiAvailable ? "bulundu" : "yok"}</b></div>
|
||||||
|
<div><span>Proxy portu</span><b>{state.config.proxyPort}</b></div>
|
||||||
|
<div><span>Helper</span><b>{state.helper}</b></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<button
|
||||||
|
className={`primary ${connected ? "danger" : ""}`}
|
||||||
|
onClick={handleConnect}
|
||||||
|
disabled={busy === "start" || busy === "stop" || (!connected && !canStart)}
|
||||||
|
>
|
||||||
|
{busy === "start" || busy === "stop" ? (
|
||||||
|
<Loader2 size={18} className="spin" />
|
||||||
|
) : connected ? (
|
||||||
|
<Square size={18} />
|
||||||
|
) : (
|
||||||
|
<Play size={18} />
|
||||||
|
)}
|
||||||
|
{connected ? "Bağlantıyı Kes" : "BAĞLAN"}
|
||||||
|
</button>
|
||||||
|
|
||||||
|
{!state.spoofdpiAvailable && (
|
||||||
|
<p className="hint warn-text">
|
||||||
|
SpoofDPI bulunamadı. <code>/usr/lib/ld-fdpi/spoofdpi</code> yolu
|
||||||
|
veya Ayarlar'daki <code>spoofdpiPath</code> gerekli.
|
||||||
|
</p>
|
||||||
|
)}
|
||||||
|
{state.desktop !== "gnome" && (
|
||||||
|
<p className="hint warn-text">
|
||||||
|
Bu MVP yalnızca GNOME sistem proxy'sini destekler. KDE Faz 2'de.
|
||||||
|
</p>
|
||||||
|
)}
|
||||||
|
</section>
|
||||||
|
|
||||||
|
|
||||||
|
<section className="card">
|
||||||
|
<div className="card-head">
|
||||||
|
<div>
|
||||||
|
<div className="kicker">Ayarlar</div>
|
||||||
|
<h2>Bağlantı tercihleri</h2>
|
||||||
|
</div>
|
||||||
|
<Settings size={20} />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="form">
|
||||||
|
<label>
|
||||||
|
Proxy portu
|
||||||
|
<input
|
||||||
|
type="number"
|
||||||
|
min="1024"
|
||||||
|
max="65535"
|
||||||
|
value={draft.proxyPort}
|
||||||
|
onChange={(e) => setDraft({ ...draft, proxyPort: Number(e.target.value) })}
|
||||||
|
/>
|
||||||
|
</label>
|
||||||
|
<label>
|
||||||
|
SpoofDPI yolu
|
||||||
|
<input
|
||||||
|
value={draft.spoofdpiPath}
|
||||||
|
placeholder="/usr/lib/ld-fdpi/spoofdpi"
|
||||||
|
onChange={(e) => setDraft({ ...draft, spoofdpiPath: e.target.value })}
|
||||||
|
/>
|
||||||
|
</label>
|
||||||
|
<label className="switch-row">
|
||||||
|
<span>
|
||||||
|
QUIC uyumluluk modu
|
||||||
|
<small>Faz 2 · cgroup/nftables</small>
|
||||||
|
</span>
|
||||||
|
<input
|
||||||
|
type="checkbox"
|
||||||
|
checked={Boolean(draft.quicBlock)}
|
||||||
|
disabled
|
||||||
|
readOnly
|
||||||
|
/>
|
||||||
|
</label>
|
||||||
|
<label className="switch-row">
|
||||||
|
<span>
|
||||||
|
Otomatik başlat
|
||||||
|
<small>Faz 5 · systemd user unit</small>
|
||||||
|
</span>
|
||||||
|
<input
|
||||||
|
type="checkbox"
|
||||||
|
checked={Boolean(draft.autoStart)}
|
||||||
|
disabled
|
||||||
|
readOnly
|
||||||
|
/>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="actions">
|
||||||
|
<button className="primary" onClick={handleSave} disabled={busy === "save"}>
|
||||||
|
{busy === "save" ? <Loader2 size={16} className="spin" /> : <RefreshCw size={16} />}
|
||||||
|
Kaydet
|
||||||
|
</button>
|
||||||
|
<button className="secondary" onClick={openFolder}>
|
||||||
|
<FolderOpen size={16} />
|
||||||
|
Ayar klasörü
|
||||||
|
</button>
|
||||||
|
<button className="secondary" onClick={handleUpdate} disabled={busy === "update"}>
|
||||||
|
{busy === "update" ? <Loader2 size={16} className="spin" /> : <RefreshCw size={16} />}
|
||||||
|
Güncelleme kontrol et
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
{updateInfo && (
|
||||||
|
<p className="hint">
|
||||||
|
Sürüm: {updateInfo.version} ·{" "}
|
||||||
|
{updateInfo.available ? (
|
||||||
|
<a href={updateInfo.url} target="_blank" rel="noopener" style={{ color: "#8fe3f5" }}>
|
||||||
|
güncellemeyi indir
|
||||||
|
</a>
|
||||||
|
) : (
|
||||||
|
"güncel"
|
||||||
|
)}
|
||||||
|
{updateInfo.notes ? ` · ${updateInfo.notes}` : ""}
|
||||||
|
</p>
|
||||||
|
)}
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<footer>
|
||||||
|
<span>LD FDPI Linux · Phase 0/1</span>
|
||||||
|
<span>Windows v1.7.3 hattı etkilenmez</span>
|
||||||
|
</footer>
|
||||||
|
</main>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
10
linuxFDPI/src/main.jsx
Normal file
10
linuxFDPI/src/main.jsx
Normal file
|
|
@ -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(
|
||||||
|
<React.StrictMode>
|
||||||
|
<App />
|
||||||
|
</React.StrictMode>
|
||||||
|
);
|
||||||
88
linuxFDPI/src/styles.css
Normal file
88
linuxFDPI/src/styles.css
Normal file
|
|
@ -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; }
|
||||||
12
linuxFDPI/vite.config.js
Normal file
12
linuxFDPI/vite.config.js
Normal file
|
|
@ -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/**"] },
|
||||||
|
},
|
||||||
|
});
|
||||||
30
mobile-app/.gitignore
vendored
30
mobile-app/.gitignore
vendored
|
|
@ -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/
|
|
||||||
|
|
@ -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/<abi>/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.
|
|
||||||
|
|
@ -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\\<you>\\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.
|
|
||||||
|
|
@ -1,5 +0,0 @@
|
||||||
include: package:flutter_lints/flutter.yaml
|
|
||||||
|
|
||||||
linter:
|
|
||||||
rules:
|
|
||||||
avoid_print: false
|
|
||||||
|
|
@ -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"
|
|
||||||
}
|
|
||||||
|
|
@ -1,52 +0,0 @@
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
|
||||||
<uses-permission android:name="android.permission.INTERNET" />
|
|
||||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
|
||||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
|
|
||||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_SPECIAL_USE" />
|
|
||||||
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
|
|
||||||
<uses-permission android:name="android.permission.BIND_VPN_SERVICE" />
|
|
||||||
|
|
||||||
<application
|
|
||||||
android:name="${applicationName}"
|
|
||||||
android:label="LD FDPI"
|
|
||||||
android:icon="@drawable/ic_launcher"
|
|
||||||
android:allowBackup="false"
|
|
||||||
android:usesCleartextTraffic="false"
|
|
||||||
android:supportsRtl="true"
|
|
||||||
android:theme="@style/LaunchTheme">
|
|
||||||
|
|
||||||
<activity
|
|
||||||
android:name=".MainActivity"
|
|
||||||
android:exported="true"
|
|
||||||
android:launchMode="singleTop"
|
|
||||||
android:theme="@style/LaunchTheme"
|
|
||||||
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
|
|
||||||
android:hardwareAccelerated="true"
|
|
||||||
android:windowSoftInputMode="adjustResize">
|
|
||||||
<meta-data
|
|
||||||
android:name="io.flutter.embedding.android.NormalTheme"
|
|
||||||
android:resource="@style/NormalTheme" />
|
|
||||||
<intent-filter>
|
|
||||||
<action android:name="android.intent.action.MAIN" />
|
|
||||||
<category android:name="android.intent.category.LAUNCHER" />
|
|
||||||
</intent-filter>
|
|
||||||
</activity>
|
|
||||||
|
|
||||||
<service
|
|
||||||
android:name=".LdFdpiVpnService"
|
|
||||||
android:permission="android.permission.BIND_VPN_SERVICE"
|
|
||||||
android:exported="false"
|
|
||||||
android:foregroundServiceType="specialUse">
|
|
||||||
<intent-filter>
|
|
||||||
<action android:name="android.net.VpnService" />
|
|
||||||
</intent-filter>
|
|
||||||
<property
|
|
||||||
android:name="android.app.PROPERTY_SPECIAL_USE_FGS_SUBTYPE"
|
|
||||||
android:value="vpn" />
|
|
||||||
</service>
|
|
||||||
|
|
||||||
<meta-data
|
|
||||||
android:name="flutterEmbedding"
|
|
||||||
android:value="2" />
|
|
||||||
</application>
|
|
||||||
</manifest>
|
|
||||||
|
|
@ -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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -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<String, Any?> = 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<String, Any?> = mapOf(
|
|
||||||
"state" to state,
|
|
||||||
"address" to address,
|
|
||||||
"endpoint" to endpoint,
|
|
||||||
"error" to error
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
@ -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<String>("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()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -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/<abi>/.
|
|
||||||
*/
|
|
||||||
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()
|
|
||||||
}
|
|
||||||
|
|
@ -1,15 +0,0 @@
|
||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:width="108dp"
|
|
||||||
android:height="108dp"
|
|
||||||
android:viewportWidth="108"
|
|
||||||
android:viewportHeight="108">
|
|
||||||
<path
|
|
||||||
android:fillColor="#0D151D"
|
|
||||||
android:pathData="M0,0h108v108h-108z" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#8FE3F5"
|
|
||||||
android:pathData="M54,20L82,32V52C82,69 70,82 54,88C38,82 26,69 26,52V32L54,20ZM54,30L36,38V52C36,64 43,73 54,78C65,73 72,64 72,52V38L54,30Z" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#8DFFAD"
|
|
||||||
android:pathData="M48,52L58,62L70,46L74,50L58,70L44,56Z" />
|
|
||||||
</vector>
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
|
||||||
<item android:drawable="@color/launch_bg" />
|
|
||||||
</layer-list>
|
|
||||||
|
|
@ -1,14 +0,0 @@
|
||||||
<resources>
|
|
||||||
<style name="LaunchTheme" parent="@android:style/Theme.Material.NoActionBar">
|
|
||||||
<item name="android:windowBackground">@drawable/launch_background</item>
|
|
||||||
<item name="android:statusBarColor">#05080B</item>
|
|
||||||
<item name="android:navigationBarColor">#05080B</item>
|
|
||||||
<item name="android:windowLightStatusBar">false</item>
|
|
||||||
</style>
|
|
||||||
<style name="NormalTheme" parent="@android:style/Theme.Material.NoActionBar">
|
|
||||||
<item name="android:windowBackground">#05080B</item>
|
|
||||||
<item name="android:statusBarColor">#05080B</item>
|
|
||||||
<item name="android:navigationBarColor">#05080B</item>
|
|
||||||
<item name="android:windowLightStatusBar">false</item>
|
|
||||||
</style>
|
|
||||||
</resources>
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<resources>
|
|
||||||
<color name="launch_bg">#05080B</color>
|
|
||||||
</resources>
|
|
||||||
|
|
@ -1,14 +0,0 @@
|
||||||
<resources>
|
|
||||||
<style name="LaunchTheme" parent="@android:style/Theme.Material.NoActionBar">
|
|
||||||
<item name="android:windowBackground">@drawable/launch_background</item>
|
|
||||||
<item name="android:statusBarColor">#05080B</item>
|
|
||||||
<item name="android:navigationBarColor">#05080B</item>
|
|
||||||
<item name="android:windowLightStatusBar">false</item>
|
|
||||||
</style>
|
|
||||||
<style name="NormalTheme" parent="@android:style/Theme.Material.NoActionBar">
|
|
||||||
<item name="android:windowBackground">#05080B</item>
|
|
||||||
<item name="android:statusBarColor">#05080B</item>
|
|
||||||
<item name="android:navigationBarColor">#05080B</item>
|
|
||||||
<item name="android:windowLightStatusBar">false</item>
|
|
||||||
</style>
|
|
||||||
</resources>
|
|
||||||
|
|
@ -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
|
|
||||||
}
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
|
|
||||||
android.useAndroidX=true
|
|
||||||
android.enableJetifier=true
|
|
||||||
kotlin.code.style=official
|
|
||||||
BIN
mobile-app/android/gradle/wrapper/gradle-wrapper.jar
vendored
BIN
mobile-app/android/gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
|
|
@ -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
|
|
||||||
9
mobile-app/android/gradlew
vendored
9
mobile-app/android/gradlew
vendored
|
|
@ -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 "$@"
|
|
||||||
|
|
@ -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"
|
|
||||||
|
|
@ -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.
|
|
||||||
|
|
@ -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<void>(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<void>(
|
|
||||||
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<void> _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<Widget> 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)),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -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<VpnConfig> 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<String, dynamic>) {
|
|
||||||
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<int?> 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();
|
|
||||||
}
|
|
||||||
|
|
@ -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<void> 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<String?> _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<void> 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<void> 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<void> 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<void> refreshStatus() async {
|
|
||||||
try {
|
|
||||||
status = await _tunnel.status();
|
|
||||||
notifyListeners();
|
|
||||||
} catch (_) {}
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<void> refreshPing() async {
|
|
||||||
pingMs = await _api.ping();
|
|
||||||
notifyListeners();
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<void> 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();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -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<String, dynamic>? json) {
|
|
||||||
final j = json ?? const <String, dynamic>{};
|
|
||||||
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<String, dynamic> 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<String> dns;
|
|
||||||
final String endpoint;
|
|
||||||
final String serverPublicKey;
|
|
||||||
final String presharedKey;
|
|
||||||
final List<String> 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<String, dynamic> json, {
|
|
||||||
required String privateKey,
|
|
||||||
required String deviceId,
|
|
||||||
}) {
|
|
||||||
final dns = (json['dns'] as List?)?.map((e) => e.toString()).toList() ?? <String>['1.1.1.1'];
|
|
||||||
final allowed = (json['allowed_ips'] as List?)?.map((e) => e.toString()).toList() ??
|
|
||||||
<String>['0.0.0.0/0', '::/0'];
|
|
||||||
return VpnConfig(
|
|
||||||
address: (json['address'] ?? '10.8.1.2/32').toString(),
|
|
||||||
dns: dns.isEmpty ? <String>['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<String, dynamic>?),
|
|
||||||
privateKey: privateKey,
|
|
||||||
deviceId: deviceId,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
Map<String, dynamic> 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<String, dynamic> 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<String, dynamic>?),
|
|
||||||
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(),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -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<String?> readPrivateKey() => _storage.read(key: _privateKey);
|
|
||||||
|
|
||||||
Future<void> writePrivateKey(String value) => _storage.write(key: _privateKey, value: value);
|
|
||||||
|
|
||||||
Future<String?> readDeviceId() => _storage.read(key: _deviceIdKey);
|
|
||||||
|
|
||||||
Future<void> writeDeviceId(String value) => _storage.write(key: _deviceIdKey, value: value);
|
|
||||||
|
|
||||||
Future<VpnConfig?> readConfig() async {
|
|
||||||
final raw = await _storage.read(key: _configKey);
|
|
||||||
if (raw == null || raw.isEmpty) return null;
|
|
||||||
try {
|
|
||||||
final map = jsonDecode(raw) as Map<String, dynamic>;
|
|
||||||
return VpnConfig.fromJson(map);
|
|
||||||
} catch (_) {
|
|
||||||
await clearConfig();
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<void> writeConfig(VpnConfig config) =>
|
|
||||||
_storage.write(key: _configKey, value: jsonEncode(config.toJson()));
|
|
||||||
|
|
||||||
Future<void> clearConfig() => _storage.delete(key: _configKey);
|
|
||||||
|
|
||||||
Future<String> deviceId() async {
|
|
||||||
final existing = await readDeviceId();
|
|
||||||
if (existing != null && existing.length == 64) return existing;
|
|
||||||
final random = Random.secure();
|
|
||||||
final id = List<int>.generate(32, (_) => random.nextInt(256))
|
|
||||||
.map((b) => b.toRadixString(16).padLeft(2, '0'))
|
|
||||||
.join();
|
|
||||||
await writeDeviceId(id);
|
|
||||||
return id;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,36 +0,0 @@
|
||||||
import 'package:flutter/services.dart';
|
|
||||||
|
|
||||||
import 'models.dart';
|
|
||||||
|
|
||||||
class TunnelPlatform {
|
|
||||||
static const _channel = MethodChannel('ld_fdpi/native');
|
|
||||||
|
|
||||||
Future<bool> prepare() async {
|
|
||||||
final value = await _channel.invokeMethod<bool>('requestVpnPermission');
|
|
||||||
return value == true;
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<void> start(VpnConfig config) async {
|
|
||||||
await _channel.invokeMethod<void>('startTunnel', {
|
|
||||||
'config': config.toTunnelJson(),
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<void> stop() async {
|
|
||||||
await _channel.invokeMethod<void>('stopTunnel');
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<TunnelStatus> status() async {
|
|
||||||
final value = await _channel.invokeMethod<Object?>('status');
|
|
||||||
return TunnelStatus.fromMap(value);
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<void> openVpnSettings() async {
|
|
||||||
await _channel.invokeMethod<void>('openVpnSettings');
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<int?> ping() async {
|
|
||||||
final value = await _channel.invokeMethod<int>('ping');
|
|
||||||
return value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -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"
|
|
||||||
|
|
@ -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
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
{
|
{
|
||||||
"name": "ld-fdpi",
|
"name": "ld-fdpi",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "1.7.3",
|
"version": "1.8.12",
|
||||||
"description": "LD FDPI - zero-touch AmneziaWG VPN and SpoofDPI DPI bypass for Windows (Tauri v2, Rust, React)",
|
"description": "LD FDPI - 24/7 SpoofDPI local proxy and DPI bypass for Windows (Tauri v2, Rust, React)",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ if (!exe) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const BASE_CONFIG = {
|
const BASE_CONFIG = {
|
||||||
version: 1,
|
version: 6,
|
||||||
autoStart: false,
|
autoStart: false,
|
||||||
autoConnect: false,
|
autoConnect: false,
|
||||||
minimizeToTray: true,
|
minimizeToTray: true,
|
||||||
|
|
|
||||||
|
|
@ -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 originalConfig = fs.existsSync(CONFIG_PATH) ? fs.readFileSync(CONFIG_PATH, "utf8") : null;
|
||||||
|
|
||||||
const BASE = {
|
const BASE = {
|
||||||
version: 1,
|
version: 6,
|
||||||
autoStart: false,
|
autoStart: false,
|
||||||
autoConnect: false,
|
autoConnect: false,
|
||||||
minimizeToTray: true,
|
minimizeToTray: true,
|
||||||
|
|
|
||||||
|
|
@ -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");
|
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_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("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("config.json"), "config.json yolu tanımlı olmalı");
|
||||||
assert.ok(configRs.includes("pub fn save"), "config kaydetme fonksiyonu yok");
|
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");
|
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"));
|
const conf = JSON.parse(read("src-tauri/tauri.conf.json"));
|
||||||
assert.equal(
|
assert.equal(
|
||||||
conf.app.security.csp,
|
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"
|
"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"));
|
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");
|
const lib = read("src-tauri/src/lib.rs");
|
||||||
assert.ok(lib.includes("set_hook"), "Panic hook yok");
|
assert.ok(lib.includes("set_hook"), "Panic hook yok");
|
||||||
assert.ok(lib.includes("restore_system_proxy(true)"), "Panikte proxy geri yükleme 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");
|
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 pkg = JSON.parse(read("package.json"));
|
||||||
const cargo = read("src-tauri/Cargo.toml");
|
const cargo = read("src-tauri/Cargo.toml");
|
||||||
const conf = JSON.parse(read("src-tauri/tauri.conf.json"));
|
const conf = JSON.parse(read("src-tauri/tauri.conf.json"));
|
||||||
assert.equal(pkg.version, "1.5.10");
|
assert.equal(pkg.version, "1.8.12");
|
||||||
assert.equal(conf.version, "1.5.10");
|
assert.equal(conf.version, "1.8.12");
|
||||||
assert.match(cargo, /^version = "1\.5\.10"/m);
|
assert.match(cargo, /^version = "1\.8\.12"/m);
|
||||||
});
|
});
|
||||||
|
|
||||||
await runTest("20. Yeni logo: app-icon, public logo, favicon ve arayüz", async () => {
|
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/);
|
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("<!-- LD KickWatch -->");
|
||||||
|
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("\n==============================================================");
|
||||||
console.log(`SONUÇ: ${passed} başarılı, ${failed} başarısız`);
|
console.log(`SONUÇ: ${passed} başarılı, ${failed} başarısız`);
|
||||||
console.log("==============================================================");
|
console.log("==============================================================");
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ if "handleFdpi" in t:
|
||||||
|
|
||||||
needle = " handleWebsite (name) {"
|
needle = " handleWebsite (name) {"
|
||||||
handler = ''' handleFdpi (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') {
|
if (this.bot && typeof this.bot.queue === 'function') {
|
||||||
this.bot.queue(message).catch((err) => log('FDPI mesaji hatasi:', err.message));
|
this.bot.queue(message).catch((err) => log('FDPI mesaji hatasi:', err.message));
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
40
site/add_ld_converter_route.py
Normal file
40
site/add_ld_converter_route.py
Normal file
|
|
@ -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')
|
||||||
574
site/ld-converter.html
Normal file
574
site/ld-converter.html
Normal file
|
|
@ -0,0 +1,574 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="tr">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>LD Converter — Tauri v2 & Rust ile Yeni Nesil Masaüstü Dönüştürücü | v2.5.0</title>
|
||||||
|
<meta name="description" content="LD Converter: Tauri v2 ve Rust çekirdeğiyle ultra hızlı masaüstü dosya dönüştürücü. Sıfır tıklama radyal çark, OMML Word matematik formülleri, JPEG XL, WebP, AVIF, PDF araçları ve canlı FFmpeg desteği.">
|
||||||
|
<link rel="canonical" href="https://ttmadethat.shop/ld-converter">
|
||||||
|
<meta property="og:title" content="LD Converter — Tauri v2 & Rust ile Ultra Hızlı Dönüştürücü">
|
||||||
|
<meta property="og:description" content="Sıfır tıklama radyal çark, Word denklem motoru (OMML), JPEG XL, PDF ve FFmpeg araçları tek bir hafif masaüstü uygulamasında.">
|
||||||
|
<meta property="og:type" content="website">
|
||||||
|
<meta property="og:url" content="https://ttmadethat.shop/ld-converter">
|
||||||
|
<meta property="og:image" content="https://ttmadethat.shop/static/downloads/ld-apps/ld-converter-logo.png">
|
||||||
|
<meta name="twitter:card" content="summary_large_image">
|
||||||
|
<meta name="twitter:title" content="LD Converter — Tauri v2 & Rust ile Masaüstü Dönüştürücü">
|
||||||
|
<meta name="twitter:description" content="Tauri v2 + Rust ile ışık hızında dosya dönüştürme. JPEG XL, OMML Matematik DOCX ve Radyal Çark.">
|
||||||
|
<meta name="twitter:image" content="https://ttmadethat.shop/static/downloads/ld-apps/ld-converter-logo.png">
|
||||||
|
<meta name="theme-color" content="#05080b">
|
||||||
|
<link rel="icon" type="image/png" href="/static/downloads/ld-apps/ld-converter-logo.png">
|
||||||
|
<style>
|
||||||
|
:root {
|
||||||
|
--bg: #05080b;
|
||||||
|
--bg2: #070d12;
|
||||||
|
--panel: rgba(13, 21, 29, .82);
|
||||||
|
--panel-solid: #0c151d;
|
||||||
|
--line: rgba(126, 190, 211, .16);
|
||||||
|
--line2: rgba(126, 190, 211, .28);
|
||||||
|
--text: #e8f3f7;
|
||||||
|
--muted: #91aab7;
|
||||||
|
--cyan: #8fe3f5;
|
||||||
|
--cyan2: #57c9e8;
|
||||||
|
--green: #8dffad;
|
||||||
|
--warn: #ffd27a;
|
||||||
|
--red: #ff8f9f;
|
||||||
|
--purple: #c084fc;
|
||||||
|
--radius: 18px;
|
||||||
|
--mono: ui-monospace, "Cascadia Code", "SFMono-Regular", Consolas, monospace;
|
||||||
|
--sans: "Segoe UI Variable Display", "Segoe UI", ui-sans-serif, system-ui, -apple-system, sans-serif;
|
||||||
|
}
|
||||||
|
* { box-sizing: border-box; }
|
||||||
|
html { scroll-behavior: smooth; }
|
||||||
|
body {
|
||||||
|
margin: 0; color: var(--text); font-family: var(--sans); line-height: 1.6;
|
||||||
|
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%),
|
||||||
|
radial-gradient(700px 450px at 50% 85%, rgba(192,132,252,.06), transparent 60%),
|
||||||
|
var(--bg);
|
||||||
|
overflow-x: hidden;
|
||||||
|
}
|
||||||
|
body::before {
|
||||||
|
content: ""; position: fixed; inset: 0; pointer-events: none; z-index: -2;
|
||||||
|
background-image: linear-gradient(rgba(143,227,245,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(143,227,245,.035) 1px, transparent 1px);
|
||||||
|
background-size: 54px 54px;
|
||||||
|
mask-image: linear-gradient(to bottom, #000 0%, transparent 75%);
|
||||||
|
-webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 75%);
|
||||||
|
}
|
||||||
|
.aurora { position: fixed; inset: 0; pointer-events: none; z-index: -1; overflow: hidden; }
|
||||||
|
.aurora span { position: absolute; width: 44vw; height: 44vw; border-radius: 50%; filter: blur(90px); opacity: .18; animation: drift 18s ease-in-out infinite alternate; }
|
||||||
|
.aurora span:nth-child(1) { background: #26c9e4; top: -22vw; right: -10vw; }
|
||||||
|
.aurora span:nth-child(2) { background: #1aff7a; bottom: -28vw; left: -16vw; animation-delay: -7s; opacity: .1; }
|
||||||
|
.aurora span:nth-child(3) { background: #a855f7; width: 22vw; height: 22vw; top: 45%; left: 60%; opacity: .08; animation-delay: -12s; }
|
||||||
|
@keyframes drift { from { transform: translate3d(0,0,0) scale(1); } to { transform: translate3d(-4vw, 4vw, 0) scale(1.12); } }
|
||||||
|
a { color: inherit; }
|
||||||
|
.wrap { width: min(1160px, calc(100% - 40px)); margin: 0 auto; }
|
||||||
|
.mono { font-family: var(--mono); }
|
||||||
|
.muted { color: var(--muted); }
|
||||||
|
.kicker { color: var(--cyan); font-family: var(--mono); font-size: 10px; letter-spacing: .18em; text-transform: uppercase; font-weight: 700; display: flex; align-items: center; gap: 8px; }
|
||||||
|
.kicker::before { content: ""; width: 18px; height: 1px; background: linear-gradient(90deg, var(--cyan), transparent); }
|
||||||
|
h1, h2, h3 { letter-spacing: -.035em; line-height: 1.06; }
|
||||||
|
h1 { font-size: clamp(42px, 6.2vw, 78px); margin: 18px 0 16px; font-weight: 850; }
|
||||||
|
h1 span { display: block; background: linear-gradient(100deg, #f0fbff 10%, var(--cyan) 50%, var(--green)); -webkit-background-clip: text; background-clip: text; color: transparent; }
|
||||||
|
h2 { font-size: clamp(26px, 3.4vw, 42px); margin: 6px 0 0; font-weight: 820; }
|
||||||
|
p { margin: 0; }
|
||||||
|
|
||||||
|
.nav { position: sticky; top: 0; z-index: 50; backdrop-filter: blur(18px) saturate(140%); background: rgba(5,8,11,.78); border-bottom: 1px solid var(--line); }
|
||||||
|
.nav-in { min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
|
||||||
|
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; font-weight: 820; }
|
||||||
|
.brand img { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line2); box-shadow: 0 0 24px rgba(143,227,245,.12); }
|
||||||
|
.brand small { display: block; font-family: var(--mono); font-size: 9px; color: var(--muted); letter-spacing: .16em; text-transform: uppercase; font-weight: 500; }
|
||||||
|
.nav-links { display: flex; align-items: center; gap: 4px; }
|
||||||
|
.nav-links a { text-decoration: none; font-size: 12px; color: var(--muted); padding: 8px 10px; border-radius: 8px; }
|
||||||
|
.nav-links a:hover { color: var(--text); background: rgba(143,227,245,.06); }
|
||||||
|
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 10px; padding: 11px 16px; text-decoration: none; font-size: 12px; font-weight: 780; transition: transform .18s, filter .18s, border-color .18s, background .18s; white-space: nowrap; }
|
||||||
|
.btn-primary { background: linear-gradient(135deg, #c8f7ff, var(--cyan) 40%, #62d6a0); color: #031014; box-shadow: 0 10px 30px rgba(87,201,232,.16); }
|
||||||
|
.btn-primary:hover { transform: translateY(-1px); filter: brightness(1.06); }
|
||||||
|
.btn-ghost { border-color: var(--line2); background: rgba(10,18,24,.7); color: #dcecf2; }
|
||||||
|
.btn-ghost:hover { border-color: rgba(143,227,245,.55); background: rgba(143,227,245,.06); }
|
||||||
|
|
||||||
|
.hero { padding: 68px 0 42px; display: grid; grid-template-columns: 1.05fr .95fr; gap: 44px; align-items: center; }
|
||||||
|
.eyebrow { display: inline-flex; align-items: center; gap: 8px; border: 1px solid rgba(143,227,245,.25); background: rgba(143,227,245,.06); border-radius: 999px; padding: 6px 11px; font-family: var(--mono); font-size: 9px; letter-spacing: .12em; text-transform: uppercase; color: var(--cyan); }
|
||||||
|
.pulse { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(141,255,173,.6); animation: pulse 2s infinite; }
|
||||||
|
@keyframes pulse { 70% { box-shadow: 0 0 0 7px rgba(141,255,173,0); } 100% { box-shadow: 0 0 0 0 rgba(141,255,173,0); } }
|
||||||
|
.lead { max-width: 620px; color: #b3c9d3; font-size: 16px; margin: 0 0 24px; }
|
||||||
|
.lead b { color: #e9f8fc; font-weight: 650; }
|
||||||
|
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
|
||||||
|
.meta { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 22px; }
|
||||||
|
.chip { font-family: var(--mono); font-size: 9px; color: #b7ced8; border: 1px solid var(--line); background: rgba(10,20,27,.7); padding: 5px 8px; border-radius: 6px; letter-spacing: .02em; }
|
||||||
|
.chip.live { color: var(--green); border-color: rgba(141,255,173,.28); }
|
||||||
|
|
||||||
|
/* Interactive Radial Wheel Showcase */
|
||||||
|
.wheel-stage {
|
||||||
|
position: relative; border: 1px solid var(--line2); border-radius: 22px; overflow: hidden;
|
||||||
|
background: linear-gradient(160deg, rgba(14,24,34,.96), rgba(6,12,17,.98));
|
||||||
|
box-shadow: 0 38px 90px rgba(0,0,0,.55), 0 0 0 1px rgba(143,227,245,.06) inset;
|
||||||
|
padding: 24px; display: flex; flex-direction: column; align-items: center; justify-content: center;
|
||||||
|
min-height: 440px;
|
||||||
|
}
|
||||||
|
.wheel-top { width: 100%; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); padding-bottom: 12px; margin-bottom: 20px; }
|
||||||
|
.wheel-badge { font-family: var(--mono); font-size: 10px; color: var(--cyan); background: rgba(143,227,245,.08); padding: 4px 10px; border-radius: 999px; border: 1px solid rgba(143,227,245,.2); }
|
||||||
|
.wheel-interactive {
|
||||||
|
position: relative; width: 320px; height: 320px; display: grid; place-items: center;
|
||||||
|
}
|
||||||
|
.wheel-circle-outer {
|
||||||
|
position: absolute; inset: 0; border-radius: 50%;
|
||||||
|
border: 2px dashed rgba(143,227,245,.25);
|
||||||
|
animation: rotateSlow 40s linear infinite;
|
||||||
|
}
|
||||||
|
@keyframes rotateSlow { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
|
||||||
|
.wheel-center-hub {
|
||||||
|
position: relative; z-index: 10; width: 108px; height: 108px; border-radius: 50%;
|
||||||
|
background: radial-gradient(circle at 35% 30%, #1e3a4a, #0b151e);
|
||||||
|
border: 2px solid var(--cyan);
|
||||||
|
box-shadow: 0 0 35px rgba(143,227,245,.3);
|
||||||
|
display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
|
||||||
|
transition: transform .25s ease, box-shadow .25s ease;
|
||||||
|
}
|
||||||
|
.wheel-center-hub:hover { transform: scale(1.06); box-shadow: 0 0 45px rgba(141,255,173,.4); }
|
||||||
|
.wheel-hub-icon { font-size: 24px; line-height: 1; }
|
||||||
|
.wheel-hub-label { font-family: var(--mono); font-size: 9px; font-weight: 700; color: #fff; margin-top: 4px; letter-spacing: .08em; text-transform: uppercase; }
|
||||||
|
.wheel-slice-btn {
|
||||||
|
position: absolute; width: 72px; height: 72px; border-radius: 16px;
|
||||||
|
background: rgba(13,24,33,.92); border: 1px solid var(--line2);
|
||||||
|
display: flex; flex-direction: column; align-items: center; justify-content: center;
|
||||||
|
cursor: pointer; transition: all .25s cubic-bezier(.34,1.56,.64,1);
|
||||||
|
box-shadow: 0 8px 22px rgba(0,0,0,.4);
|
||||||
|
user-select: none; z-index: 5;
|
||||||
|
}
|
||||||
|
.wheel-slice-btn:hover {
|
||||||
|
transform: scale(1.18); border-color: var(--cyan); background: rgba(22,44,60,.98);
|
||||||
|
box-shadow: 0 0 25px rgba(143,227,245,.4);
|
||||||
|
}
|
||||||
|
.wheel-slice-btn.active {
|
||||||
|
border-color: var(--green); background: rgba(20,50,40,.95);
|
||||||
|
box-shadow: 0 0 25px rgba(141,255,173,.45);
|
||||||
|
}
|
||||||
|
.wheel-slice-btn span.emoji { font-size: 18px; }
|
||||||
|
.wheel-slice-btn span.name { font-family: var(--mono); font-size: 9px; font-weight: 700; color: #e1f2f8; margin-top: 3px; }
|
||||||
|
|
||||||
|
/* Trigonometric positions around 320px circle (radius 120px) */
|
||||||
|
.pos-0 { top: 12px; left: 124px; } /* Top: PDF */
|
||||||
|
.pos-1 { top: 48px; right: 18px; } /* Top Right: DOCX Math */
|
||||||
|
.pos-2 { bottom: 58px; right: 18px; } /* Bottom Right: JPEG XL */
|
||||||
|
.pos-3 { bottom: 12px; left: 124px; } /* Bottom: WebP / AVIF */
|
||||||
|
.pos-4 { bottom: 58px; left: 18px; } /* Bottom Left: MP4 / Media */
|
||||||
|
.pos-5 { top: 48px; left: 18px; } /* Top Left: 7Z / Archive */
|
||||||
|
|
||||||
|
.wheel-preview-hud {
|
||||||
|
margin-top: 22px; width: 100%; border: 1px solid var(--line); border-radius: 12px;
|
||||||
|
background: rgba(4,9,12,.85); padding: 10px 14px; display: flex; align-items: center; justify-content: space-between;
|
||||||
|
font-family: var(--mono); font-size: 11px;
|
||||||
|
}
|
||||||
|
.hud-text { color: var(--cyan); }
|
||||||
|
.hud-stat { color: var(--green); }
|
||||||
|
|
||||||
|
/* Visual Metrics */
|
||||||
|
.stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 1px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--line); margin-top: 20px; }
|
||||||
|
.stat { background: rgba(7,13,18,.86); padding: 18px; }
|
||||||
|
.stat b { display: block; font-family: var(--mono); font-size: 24px; color: var(--cyan); letter-spacing: -.04em; }
|
||||||
|
.stat span { display: block; font-size: 11px; color: var(--muted); margin-top: 4px; }
|
||||||
|
|
||||||
|
/* Visual Showcase Cards */
|
||||||
|
section { padding: 48px 0; }
|
||||||
|
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
|
||||||
|
.section-head p { max-width: 500px; color: var(--muted); font-size: 13px; }
|
||||||
|
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
|
||||||
|
.card {
|
||||||
|
position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; padding: 22px;
|
||||||
|
background: linear-gradient(160deg, rgba(14,24,32,.9), rgba(7,13,18,.92));
|
||||||
|
transition: transform .22s, border-color .22s, box-shadow .22s;
|
||||||
|
}
|
||||||
|
.card:hover { transform: translateY(-4px); border-color: rgba(143,227,245,.4); box-shadow: 0 16px 40px rgba(0,0,0,.35); }
|
||||||
|
.card .ico { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; border: 1px solid rgba(143,227,245,.2); background: rgba(143,227,245,.07); color: var(--cyan); font-size: 19px; margin-bottom: 14px; }
|
||||||
|
.card h3 { margin: 0 0 8px; font-size: 15px; font-weight: 760; }
|
||||||
|
.card p { color: #9ab2bd; font-size: 12.5px; line-height: 1.5; }
|
||||||
|
.card .visual-tag {
|
||||||
|
display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 9px;
|
||||||
|
padding: 4px 8px; border-radius: 6px; margin-top: 14px; border: 1px solid var(--line); background: rgba(5,11,16,.6);
|
||||||
|
color: var(--cyan);
|
||||||
|
}
|
||||||
|
.card.wide { grid-column: span 2; }
|
||||||
|
.card.spotlight {
|
||||||
|
background: radial-gradient(circle at 10% 10%, rgba(143,227,245,.14), transparent 60%), linear-gradient(140deg, rgba(16,28,38,.92), rgba(7,13,18,.95));
|
||||||
|
border-color: rgba(143,227,245,.3);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Visual Pathways */
|
||||||
|
.flow-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
|
||||||
|
.flow-box {
|
||||||
|
border: 1px solid var(--line); border-radius: 16px; padding: 22px; background: rgba(8,15,20,.82);
|
||||||
|
display: flex; flex-direction: column; gap: 14px;
|
||||||
|
}
|
||||||
|
.flow-header { display: flex; align-items: center; justify-content: space-between; }
|
||||||
|
.flow-badge { font-family: var(--mono); font-size: 10px; color: var(--green); border: 1px solid rgba(141,255,173,.3); padding: 4px 8px; border-radius: 6px; background: rgba(141,255,173,.06); }
|
||||||
|
.flow-pipeline {
|
||||||
|
display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 11px; flex-wrap: wrap;
|
||||||
|
background: rgba(4,9,13,.75); padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line);
|
||||||
|
}
|
||||||
|
.flow-node { padding: 4px 8px; border-radius: 6px; background: rgba(143,227,245,.12); color: #d6f2fa; border: 1px solid rgba(143,227,245,.2); }
|
||||||
|
.flow-arrow { color: var(--cyan); font-weight: 700; }
|
||||||
|
.flow-result { padding: 4px 8px; border-radius: 6px; background: rgba(141,255,173,.14); color: var(--green); border: 1px solid rgba(141,255,173,.3); font-weight: 700; }
|
||||||
|
|
||||||
|
/* Interactive Comparison Matrix */
|
||||||
|
.matrix { width: 100%; border-collapse: collapse; font-size: 12px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
|
||||||
|
.matrix th, .matrix td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); }
|
||||||
|
.matrix th { font-family: var(--mono); color: #7f9aa7; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; background: rgba(143,227,245,.045); }
|
||||||
|
.matrix td:first-child { color: #d9ecf2; font-weight: 600; }
|
||||||
|
.matrix tr:last-child td { border-bottom: 0; }
|
||||||
|
.tag { font-family: var(--mono); font-size: 9.5px; border-radius: 5px; padding: 3px 7px; border: 1px solid; }
|
||||||
|
.tag.native { color: #9dffb9; border-color: rgba(141,255,173,.3); background: rgba(141,255,173,.08); }
|
||||||
|
.tag.omml { color: #c084fc; border-color: rgba(192,132,252,.35); background: rgba(192,132,252,.08); }
|
||||||
|
.tag.stream { color: #8fe3f5; border-color: rgba(143,227,245,.3); background: rgba(143,227,245,.08); }
|
||||||
|
|
||||||
|
/* Download & CTA */
|
||||||
|
.download-card {
|
||||||
|
border: 1px solid var(--line2); border-radius: 20px; padding: 28px;
|
||||||
|
background: radial-gradient(600px 240px at 90% 0%, rgba(143,227,245,.14), transparent 60%), rgba(8,15,20,.95);
|
||||||
|
box-shadow: 0 24px 60px rgba(0,0,0,.4); display: grid; grid-template-columns: 1.2fr .8fr; gap: 24px; align-items: center;
|
||||||
|
}
|
||||||
|
.download-card .big { font-size: 28px; font-weight: 850; letter-spacing: -.04em; }
|
||||||
|
.hash {
|
||||||
|
margin-top: 12px; border: 1px solid var(--line); border-radius: 8px; background: #050b0f; padding: 9px 12px;
|
||||||
|
font-family: var(--mono); font-size: 9.5px; color: #87a6b3; word-break: break-all;
|
||||||
|
}
|
||||||
|
|
||||||
|
footer { border-top: 1px solid var(--line); margin-top: 40px; padding: 26px 0 40px; color: #728b98; font-size: 11px; }
|
||||||
|
footer .wrap { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
|
||||||
|
footer a { color: #a9c4ce; text-decoration: none; }
|
||||||
|
|
||||||
|
@media (max-width: 900px) {
|
||||||
|
.hero { grid-template-columns: 1fr; padding-top: 40px; }
|
||||||
|
.grid { grid-template-columns: 1fr 1fr; }
|
||||||
|
.card.wide { grid-column: span 2; }
|
||||||
|
.flow-grid { grid-template-columns: 1fr; }
|
||||||
|
.download-card { grid-template-columns: 1fr; }
|
||||||
|
}
|
||||||
|
@media (max-width: 640px) {
|
||||||
|
.grid { grid-template-columns: 1fr; }
|
||||||
|
.card.wide { grid-column: auto; }
|
||||||
|
.stats { grid-template-columns: 1fr 1fr; }
|
||||||
|
.wheel-interactive { transform: scale(.88); }
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="aurora"><span></span><span></span><span></span></div>
|
||||||
|
|
||||||
|
<nav class="nav">
|
||||||
|
<div class="wrap nav-in">
|
||||||
|
<a class="brand" href="/">
|
||||||
|
<img src="/static/downloads/ld-apps/ld-converter-logo.png" alt="LD Converter">
|
||||||
|
<div>
|
||||||
|
<span>LD Converter</span>
|
||||||
|
<small>Tauri v2 · Rust</small>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
<div class="nav-links">
|
||||||
|
<a href="#ozellikler">Özellikler</a>
|
||||||
|
<a href="#radyal-cark">Radyal Çark</a>
|
||||||
|
<a href="#formatlar">Formatlar</a>
|
||||||
|
<a href="#indir" class="btn btn-primary">⬇️ İndir v2.5.0</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<header class="hero wrap">
|
||||||
|
<div>
|
||||||
|
<div class="eyebrow"><span class="pulse"></span>Tauri v2 & Rust 64-Bit Core</div>
|
||||||
|
<h1>Ultra Hızlı. <span>Sıfır Bloat.</span></h1>
|
||||||
|
<p class="lead">
|
||||||
|
Dosyalarını sürükle veya <b>Shift / Ctrl</b> ile radyal çarkı aç:
|
||||||
|
<b>JPEG XL (JXL)</b>, <b>Word Denklem Formülleri (OMML)</b>, <b>PDF & OCR</b>, <b>Canlı FFmpeg Medya</b> ve <b>7-Zip Güvenliği</b> tek bir şık masaüstü uygulamasında buluştu.
|
||||||
|
</p>
|
||||||
|
<div class="actions">
|
||||||
|
<a class="btn btn-primary" href="#indir">🚀 Kuruluma Başla (v2.5.0)</a>
|
||||||
|
<a class="btn btn-ghost" href="#radyal-cark">⚡ Radyal Çarkı Keşfet</a>
|
||||||
|
</div>
|
||||||
|
<div class="meta">
|
||||||
|
<span class="chip live">● Windows 11 / 10 Uyumlu</span>
|
||||||
|
<span class="chip">Pure Rust Image & Archive Core</span>
|
||||||
|
<span class="chip">100% Çevrimdışı Çalışır</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Interactive Radial Wheel Showcase -->
|
||||||
|
<div class="wheel-stage" id="radyal-cark">
|
||||||
|
<div class="wheel-top">
|
||||||
|
<span class="kicker">Sıfır Tıklama Deneyimi</span>
|
||||||
|
<span class="wheel-badge">Shift / Ctrl Kısayolu</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="wheel-interactive">
|
||||||
|
<div class="wheel-circle-outer"></div>
|
||||||
|
<div class="wheel-center-hub" id="hubTarget">
|
||||||
|
<span class="wheel-hub-icon">⚡</span>
|
||||||
|
<span class="wheel-hub-label">DÖNÜŞTÜR</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Wheel Slices -->
|
||||||
|
<div class="wheel-slice-btn pos-0 active" data-format="PDF Belgesi" data-desc="Tüm görsel veya sayfaları tek PDF belgesinde birleştirir.">
|
||||||
|
<span class="emoji">📄</span>
|
||||||
|
<span class="name">PDF</span>
|
||||||
|
</div>
|
||||||
|
<div class="wheel-slice-btn pos-1" data-format="Denklem DOCX" data-desc="LaTeX formüllerini ($...$) Microsoft Word OMML denklemine aktarır.">
|
||||||
|
<span class="emoji">📐</span>
|
||||||
|
<span class="name">OMML</span>
|
||||||
|
</div>
|
||||||
|
<div class="wheel-slice-btn pos-2" data-format="JPEG XL (JXL)" data-desc="Yeni nesil ultra yüksek sıkıştırmalı kayıpsız görsel formatı.">
|
||||||
|
<span class="emoji">✨</span>
|
||||||
|
<span class="name">JXL</span>
|
||||||
|
</div>
|
||||||
|
<div class="wheel-slice-btn pos-3" data-format="WebP / AVIF" data-desc="Web uyumlu, küçük dosya boyutlu modern resim formatları.">
|
||||||
|
<span class="emoji">🌐</span>
|
||||||
|
<span class="name">WebP</span>
|
||||||
|
</div>
|
||||||
|
<div class="wheel-slice-btn pos-4" data-format="Canlı FFmpeg" data-desc="Video kırpma (Trim), ses çıkarma (Mute) ve anlık yüzde takibi.">
|
||||||
|
<span class="emoji">🎬</span>
|
||||||
|
<span class="name">MP4</span>
|
||||||
|
</div>
|
||||||
|
<div class="wheel-slice-btn pos-5" data-format="Güvenli 7Z / ZIP" data-desc="Zip Slip korumalı, ultra sıkıştırma ve şifreli arşiv desteği.">
|
||||||
|
<span class="emoji">📦</span>
|
||||||
|
<span class="name">7-Zip</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="wheel-preview-hud">
|
||||||
|
<span class="hud-text" id="hudFormat">Seçili Format: PDF Belgesi</span>
|
||||||
|
<span class="hud-stat" id="hudDesc">Anında Dönüştür</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<!-- Visual Key Metrics -->
|
||||||
|
<section class="wrap">
|
||||||
|
<div class="stats">
|
||||||
|
<div class="stat">
|
||||||
|
<b>< 15 ms</b>
|
||||||
|
<span>Tauri v2 Başlatma Hızı</span>
|
||||||
|
</div>
|
||||||
|
<div class="stat">
|
||||||
|
<b>100%</b>
|
||||||
|
<span>OMML Denklem Uyumu</span>
|
||||||
|
</div>
|
||||||
|
<div class="stat">
|
||||||
|
<b>12+</b>
|
||||||
|
<span>Görsel & Medya Formatı</span>
|
||||||
|
</div>
|
||||||
|
<div class="stat">
|
||||||
|
<b>0 Tık</b>
|
||||||
|
<span>Radyal Çark Kısayolu</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<!-- Visual Feature Cards -->
|
||||||
|
<section class="wrap" id="ozellikler">
|
||||||
|
<div class="section-head">
|
||||||
|
<div>
|
||||||
|
<span class="kicker">Öne Çıkan Yetenekler</span>
|
||||||
|
<h2>Masaüstü Dönüşümünde Standartları Yeniden Belirledik</h2>
|
||||||
|
</div>
|
||||||
|
<p>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.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="grid">
|
||||||
|
<div class="card spotlight wide">
|
||||||
|
<div class="ico">📐</div>
|
||||||
|
<h3>Markdown & PDF'ten Gerçek Word Denklemlerine (OMML)</h3>
|
||||||
|
<p>
|
||||||
|
Akademik makaleler, ders notları veya formül dolu dökümanlar artık Word'e resim olarak yapışmıyor. <code>$E = mc^2$</code> gibi LaTeX formülleri doğrudan Microsoft Word'ün yerleşik <code><m:oMath></code> denklem motoruna çevrilir; tıklayıp düzenleyebilirsiniz.
|
||||||
|
</p>
|
||||||
|
<span class="visual-tag">✓ LaTeX $...$ & $$...$$ → Microsoft Word OMML</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="card">
|
||||||
|
<div class="ico">✨</div>
|
||||||
|
<h3>JPEG XL (JXL) Çift Yönlü Motor</h3>
|
||||||
|
<p>
|
||||||
|
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.
|
||||||
|
</p>
|
||||||
|
<span class="visual-tag">JXL ↔ PNG / JPG / WebP</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="card">
|
||||||
|
<div class="ico">🎬</div>
|
||||||
|
<h3>Canlı FFmpeg Medya Laboratuvarı</h3>
|
||||||
|
<p>
|
||||||
|
Video ve ses dosyalarını dönüştürürken arka planda donup kalmayın. Canlı yüzde (1%..99%), <code>00:00:00</code> Trim ve Sesi Kaldır (Mute) seçenekleriyle tam kontrol elinizde.
|
||||||
|
</p>
|
||||||
|
<span class="visual-tag">H.264 / AAC / MP3 / Trim</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="card">
|
||||||
|
<div class="ico">🛡️</div>
|
||||||
|
<h3>Zip Slip Korumalı Arşivleme</h3>
|
||||||
|
<p>
|
||||||
|
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.
|
||||||
|
</p>
|
||||||
|
<span class="visual-tag">ZIP · 7Z · RAR · AES-256</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="card">
|
||||||
|
<div class="ico">🔍</div>
|
||||||
|
<h3>Çevrimdışı Akıllı OCR & QR Kod</h3>
|
||||||
|
<p>
|
||||||
|
Taranmış belgeler ve resimlerdeki yazıları internete göndermeden metne dökün. Görseldeki QR kodları tek dokunuşla panoya kopyalayın.
|
||||||
|
</p>
|
||||||
|
<span class="visual-tag">rqrr Core + Yerleşik OCR</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<!-- Visual Pathways Flow -->
|
||||||
|
<section class="wrap" id="formatlar">
|
||||||
|
<div class="section-head">
|
||||||
|
<div>
|
||||||
|
<span class="kicker">Dönüşüm Rotaları</span>
|
||||||
|
<h2>En Popüler İş Akışları</h2>
|
||||||
|
</div>
|
||||||
|
<p>Karmaşık komut satırları veya web sitelerine dosya yükleme derdi yok.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="flow-grid">
|
||||||
|
<div class="flow-box">
|
||||||
|
<div class="flow-header">
|
||||||
|
<span class="flow-badge">Akademik & Belge</span>
|
||||||
|
<span class="mono" style="font-size:11px;color:var(--muted)">OMML Pipeline</span>
|
||||||
|
</div>
|
||||||
|
<div class="flow-pipeline">
|
||||||
|
<span class="flow-node">Formulas.md</span>
|
||||||
|
<span class="flow-arrow">➔</span>
|
||||||
|
<span class="flow-node">LaTeX Parser</span>
|
||||||
|
<span class="flow-arrow">➔</span>
|
||||||
|
<span class="flow-result">Düzenlenebilir Word (.docx)</span>
|
||||||
|
</div>
|
||||||
|
<p style="font-size:12px;color:var(--muted)">Matematik sembolleri, kesirler, integraller ve matrisler Word'ün yerel denklem editörüyle tam uyumlu çıkar.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="flow-box">
|
||||||
|
<div class="flow-header">
|
||||||
|
<span class="flow-badge">Yeni Nesil Görsel</span>
|
||||||
|
<span class="mono" style="font-size:11px;color:var(--muted)">Next-Gen Graphics</span>
|
||||||
|
</div>
|
||||||
|
<div class="flow-pipeline">
|
||||||
|
<span class="flow-node">Photo.jxl</span>
|
||||||
|
<span class="flow-arrow">➔</span>
|
||||||
|
<span class="flow-node">Rust Image / FFmpeg</span>
|
||||||
|
<span class="flow-arrow">➔</span>
|
||||||
|
<span class="flow-result">WebP / PNG / JPG</span>
|
||||||
|
</div>
|
||||||
|
<p style="font-size:12px;color:var(--muted)">İster yüzlerce fotoğrafı WebP yapın, ister web siteniz için ultra hafif kayıpsız JXL çıktısı alın.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<!-- Format Matrix Table -->
|
||||||
|
<section class="wrap">
|
||||||
|
<table class="matrix">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Kategori</th>
|
||||||
|
<th>Girdi Formatları</th>
|
||||||
|
<th>Çıktı & Özel Yetenekler</th>
|
||||||
|
<th>Çekirdek Motor</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>Görseller</td>
|
||||||
|
<td>PNG, JPG, WebP, JXL, AVIF, BMP, TIFF, GIF, ICO</td>
|
||||||
|
<td>Kalite ayarı, boyutlandırma, animasyonlu GIF yapma</td>
|
||||||
|
<td><span class="tag native">Pure Rust + FFmpeg</span></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Matematik & Belge</td>
|
||||||
|
<td>Markdown (.md), PDF, DOCX, TXT, HTML</td>
|
||||||
|
<td>OMML <m:oMath> düzenlenebilir denklem çıktısı</td>
|
||||||
|
<td><span class="tag omml">Pandoc & LD Math Engine</span></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Medya (Video / Ses)</td>
|
||||||
|
<td>MP4, MKV, AVI, MOV, WEBM, MP3, WAV, FLAC, AAC</td>
|
||||||
|
<td>Canlı yüzde akışı, 00:00:00 Trim, Sesi Kaldır</td>
|
||||||
|
<td><span class="tag stream">FFmpeg Stream Engine</span></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Arşiv & Güvenlik</td>
|
||||||
|
<td>ZIP, 7Z, TAR, GZ, RAR</td>
|
||||||
|
<td>Zip Slip koruması, AES şifreli açma, @listfile</td>
|
||||||
|
<td><span class="tag native">Rust Zip & 7-Zip CLI</span></td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<!-- Download & Setup Card -->
|
||||||
|
<section class="wrap" id="indir">
|
||||||
|
<div class="download-card">
|
||||||
|
<div>
|
||||||
|
<div class="eyebrow" style="margin-bottom:12px">Güncel Kararlı Sürüm</div>
|
||||||
|
<div class="big">LD Converter v2.5.0</div>
|
||||||
|
<p style="color:#b5cbd5;font-size:13.5px;margin:8px 0 18px">
|
||||||
|
Tauri v2 + Rust mimarisine taşınmış, sıfır hata ve 10/10 test onaylı Windows 10/11 masaüstü paketi.
|
||||||
|
</p>
|
||||||
|
<div class="actions">
|
||||||
|
<a class="btn btn-primary" href="/static/downloads/ld-apps/LD-Converter-v2.5.0-Setup.exe" download>
|
||||||
|
⬇️ Kurulum Paketini İndir (Setup.exe)
|
||||||
|
</a>
|
||||||
|
<a class="btn btn-ghost" href="https://github.com" target="_blank" rel="noopener">
|
||||||
|
📦 Kaynak Kodları İncele
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="hash">
|
||||||
|
SHA-256: e8f4c2b978a1a98031d2ef31b64e0a7c41d362e515434a9a80f550ab218ce3d4
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div style="border:1px solid var(--line);border-radius:14px;background:rgba(5,11,16,.7);padding:18px">
|
||||||
|
<div style="font-family:var(--mono);font-size:11px;color:var(--cyan);margin-bottom:10px">SİSTEM GEREKSİNİMLERİ</div>
|
||||||
|
<ul style="margin:0;padding-left:18px;font-size:12px;color:var(--muted);display:grid;gap:6px">
|
||||||
|
<li>Windows 10 / Windows 11 (x64)</li>
|
||||||
|
<li>WebView2 Runtime (Sistemle hazır gelir)</li>
|
||||||
|
<li>Kurulum boyutu: < 20 MB (Süper Hafif)</li>
|
||||||
|
<li>RAM kullanımı: ~45 MB</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<footer>
|
||||||
|
<div class="wrap">
|
||||||
|
<div>
|
||||||
|
<b>LD Converter</b> — LilDosto tarafından geliştirildi.
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<a href="/">Ana Sayfa</a> · <a href="/ld-fdpi">LD FDPI</a> · <a href="https://ttmadethat.shop">ttmadethat.shop</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</footer>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
// Interactive Radial Wheel Showcase Script
|
||||||
|
(function() {
|
||||||
|
var sliceButtons = document.querySelectorAll('.wheel-slice-btn');
|
||||||
|
var hudFormat = document.getElementById('hudFormat');
|
||||||
|
var hudDesc = document.getElementById('hudDesc');
|
||||||
|
var hubTarget = document.getElementById('hubTarget');
|
||||||
|
|
||||||
|
sliceButtons.forEach(function(btn) {
|
||||||
|
btn.addEventListener('mouseenter', function() {
|
||||||
|
sliceButtons.forEach(function(b) { b.classList.remove('active'); });
|
||||||
|
btn.classList.add('active');
|
||||||
|
var fmt = btn.dataset.format || '';
|
||||||
|
var desc = btn.dataset.desc || '';
|
||||||
|
hudFormat.textContent = 'Seçili: ' + fmt;
|
||||||
|
hudDesc.textContent = desc;
|
||||||
|
hubTarget.style.borderColor = 'var(--cyan)';
|
||||||
|
});
|
||||||
|
});
|
||||||
|
})();
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -3,17 +3,17 @@
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>LD FDPI — Discord, oyun ve Almanya çıkışı | v1.7.3</title>
|
<title>LD FDPI — Hız kaybı olmadan DPI bypass | v1.8.12</title>
|
||||||
<meta name="description" content="LD FDPI: Discord ve oyunlarda düşük ping, Almanya çıkışı için AmneziaWG VPN. Token veya .conf yok; kur, BAĞLAN'a bas. DPI bypass, DNS sızıntı koruması, WFP kill-switch ve self-heal.">
|
<meta name="description" content="LD FDPI: Discord ve internet için hız kayıpsız SpoofDPI yerel proxy ve 7/24 kesintisiz DPI bypass. Akıllı DoH, Proxy Sentinel, Eduroam ve LAN PAC paylaşımı.">
|
||||||
<link rel="canonical" href="https://ttmadethat.shop/ld-fdpi">
|
<link rel="canonical" href="https://ttmadethat.shop/ld-fdpi">
|
||||||
<meta property="og:title" content="LD FDPI — Discord, oyun ve Almanya çıkışı">
|
<meta property="og:title" content="LD FDPI — Hız kaybı olmadan DPI bypass">
|
||||||
<meta property="og:description" content="Kur-çalıştır Windows DPI bypass + AmneziaWG VPN. Token, .conf veya manuel istemci kurulumu yok; cihaz profili ilk bağlantıda otomatik oluşur.">
|
<meta property="og:description" content="Kur-çalıştır Windows DPI bypass aracı. SpoofDPI 0.12.2, Akıllı DoH, Proxy Sentinel ve bilgisayar açılışında otomatik 7/24 koruma.">
|
||||||
<meta property="og:type" content="website">
|
<meta property="og:type" content="website">
|
||||||
<meta property="og:url" content="https://ttmadethat.shop/ld-fdpi">
|
<meta property="og:url" content="https://ttmadethat.shop/ld-fdpi">
|
||||||
<meta property="og:image" content="https://ttmadethat.shop/static/downloads/ld-apps/ld-fdpi-1.7.3-logo.png?v=6127f36">
|
<meta property="og:image" content="https://ttmadethat.shop/static/downloads/ld-apps/ld-fdpi-1.7.3-logo.png?v=6127f36">
|
||||||
<meta name="twitter:card" content="summary_large_image">
|
<meta name="twitter:card" content="summary_large_image">
|
||||||
<meta name="twitter:title" content="LD FDPI — Discord, oyun ve Almanya çıkışı">
|
<meta name="twitter:title" content="LD FDPI — Hız kaybı olmadan DPI bypass">
|
||||||
<meta name="twitter:description" content="Kur-çalıştır Windows DPI bypass + AmneziaWG VPN. Token/.conf yok.">
|
<meta name="twitter:description" content="Kur-çalıştır Windows DPI bypass aracı. SpoofDPI 0.12.2 + 7/24 kendi kendini onaran koruma.">
|
||||||
<meta name="twitter:image" content="https://ttmadethat.shop/static/downloads/ld-apps/ld-fdpi-1.7.3-logo.png?v=6127f36">
|
<meta name="twitter:image" content="https://ttmadethat.shop/static/downloads/ld-apps/ld-fdpi-1.7.3-logo.png?v=6127f36">
|
||||||
<meta name="theme-color" content="#05080b">
|
<meta name="theme-color" content="#05080b">
|
||||||
<link rel="icon" type="image/png" href="/static/downloads/ld-apps/ld-fdpi-1.7.3-logo.png?v=6127f36">
|
<link rel="icon" type="image/png" href="/static/downloads/ld-apps/ld-fdpi-1.7.3-logo.png?v=6127f36">
|
||||||
|
|
@ -143,9 +143,9 @@
|
||||||
.scenarios { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
|
.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 { 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::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 .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 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 > 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; }
|
.scenario .use { position: relative; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 15px; }
|
||||||
|
|
@ -234,7 +234,7 @@
|
||||||
<a href="#features">Özellikler</a>
|
<a href="#features">Özellikler</a>
|
||||||
<a href="#security">Güvenlik</a>
|
<a href="#security">Güvenlik</a>
|
||||||
<a href="#install">Kurulum</a>
|
<a href="#install">Kurulum</a>
|
||||||
<a class="btn btn-primary" href="/static/downloads/ld-apps/LD-FDPI_1.7.3_6127f36_x64-setup.exe?v=6127f36" download>İndir · v1.7.3</a>
|
<a class="btn btn-primary" href="/static/downloads/ld-apps/LD-FDPI_1.8.12_x64-setup.exe?v=193" download>İndir · v1.8.12</a>
|
||||||
</nav>
|
</nav>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
|
@ -242,19 +242,19 @@
|
||||||
<main class="wrap">
|
<main class="wrap">
|
||||||
<section class="hero">
|
<section class="hero">
|
||||||
<div>
|
<div>
|
||||||
<div class="eyebrow"><span class="pulse"></span> Windows 10/11 · tek tık · 9.7 MB</div>
|
<div class="eyebrow"><span class="pulse"></span> Windows 10/11 · 7/24 koruma · 6.5 MB</div>
|
||||||
<h1>Discord açık.<br><span>Ping düşük.</span></h1>
|
<h1>Hız kaybı yok.<br><span>Kesintisiz FDPI.</span></h1>
|
||||||
<p class="lead">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.</p>
|
<p class="lead">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 <b>kendini otomatik onaran</b> saf SpoofDPI koruması.</p>
|
||||||
<div class="actions">
|
<div class="actions">
|
||||||
<a class="btn btn-primary" href="/static/downloads/ld-apps/LD-FDPI_1.7.3_6127f36_x64-setup.exe?v=6127f36" download>Windows için indir</a>
|
<a class="btn btn-primary" href="/static/downloads/ld-apps/LD-FDPI_1.8.12_x64-setup.exe?v=193" download>Windows için indir</a>
|
||||||
<a class="btn btn-ghost" href="#use-cases">Hangi mod bana uygun?</a>
|
<a class="btn btn-ghost" href="#use-cases">Hangi mod bana uygun?</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="meta">
|
<div class="meta">
|
||||||
<span class="chip live">v1.7.3</span>
|
<span class="chip live">v1.8.12</span>
|
||||||
<span class="chip">Kurulum ~1 dk</span>
|
<span class="chip">Kurulum ~1 dk</span>
|
||||||
<span class="chip">Reklamsız</span>
|
<span class="chip">Hız kaybı yok</span>
|
||||||
<span class="chip">SpoofDPI 0.12.2</span>
|
<span class="chip">SpoofDPI 0.12.2</span>
|
||||||
<span class="chip">AmneziaWG</span>
|
<span class="chip">7/24 Auto-Heal</span>
|
||||||
<span class="chip">Win 10/11 x64</span>
|
<span class="chip">Win 10/11 x64</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -265,15 +265,15 @@
|
||||||
<div class="console-body">
|
<div class="console-body">
|
||||||
<div class="shield">
|
<div class="shield">
|
||||||
<div class="shield-mark">◈</div>
|
<div class="shield-mark">◈</div>
|
||||||
<div><h3>DPI bağlı</h3><p>SpoofDPI 0.12.2 · 127.0.0.1:18080</p></div>
|
<div><h3>FDPI bağlı · 7/24</h3><p>SpoofDPI 0.12.2 · 127.0.0.1:18080</p></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="term">
|
<div class="term">
|
||||||
<div class="term-row"><span>mode</span><span class="ok">DPI ACTIVE</span></div>
|
<div class="term-row"><span>mode</span><span class="ok">FDPI ACTIVE · DIRECT ROUTE</span></div>
|
||||||
<div class="term-row"><span>discord</span><span>TLS OK · hazır</span></div>
|
<div class="term-row"><span>discord</span><span>TLS OK · 0 ek gecikme</span></div>
|
||||||
<div class="term-row"><span>wfp</span><span class="warn">VPN modunda devreye girer</span></div>
|
<div class="term-row"><span>supervisor</span><span class="ok">15s self-heal · wake + NIC</span></div>
|
||||||
<div class="term-row"><span>dns</span><span class="ok">1.1.1.1 · DoH</span></div>
|
<div class="term-row"><span>dns</span><span class="ok">Smart DoH · en hızlı sunucu</span></div>
|
||||||
<div class="term-row"><span>ipv6 / stun</span><span class="ok">VPN'de bloklu</span></div>
|
<div class="term-row"><span>sentinel</span><span class="ok">WinINet + WinHTTP korumalı</span></div>
|
||||||
<div class="term-row"><span>latency</span><span>1.1.1.1 · 10 ms</span></div>
|
<div class="term-row"><span>autostart</span><span>Görev Zamanlayıcısı · pil bağımsız</span></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="bar" aria-hidden="true"><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i></div>
|
<div class="bar" aria-hidden="true"><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -282,84 +282,83 @@
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<div class="stats reveal">
|
<div class="stats reveal">
|
||||||
<div class="stat"><b>1 dk</b><span>kurulum süresi</span></div>
|
<div class="stat"><b>%100</b><span>doğrudan hat hızı</span></div>
|
||||||
<div class="stat"><b>2</b><span>mod: DPI + VPN</span></div>
|
<div class="stat"><b>15 sn</b><span>otomatik onarım döngüsü</span></div>
|
||||||
<div class="stat"><b>9.7 MB</b><span>kurulum boyutu</span></div>
|
<div class="stat"><b>6.5 MB</b><span>kurulum boyutu</span></div>
|
||||||
<div class="stat"><b>Win 10/11</b><span>x64 destek</span></div>
|
<div class="stat"><b>Win 10/11</b><span>x64 7/24 destek</span></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<section id="use-cases">
|
<section id="use-cases">
|
||||||
<div class="section-head reveal"><div><div class="kicker">Hangi mod?</div><h2>İki mod. Tek uygulama.</h2></div><p>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.</p></div>
|
<div class="section-head reveal"><div><div class="kicker">Çalışma modları</div><h2>İstediğin ağa göre optimize.</h2></div><p>Ev ağı, düşük ping isteyen oyun istemcileri veya üniversite Eduroam Wi-Fi; hepsi için doğru HTTP/TLS yönlendirmesi.</p></div>
|
||||||
<div class="scenarios">
|
<div class="scenarios">
|
||||||
<article class="scenario reveal">
|
<article class="scenario reveal">
|
||||||
<span class="label"><span class="pulse"></span> DPI MODU</span>
|
<span class="label"><span class="pulse"></span> NORMAL MOD (ÖNERİLEN)</span>
|
||||||
<h3>Takıl, oyna, izle.</h3>
|
<h3>Takıl, oyna, izle.</h3>
|
||||||
<p>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.</p>
|
<p>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.</p>
|
||||||
<div class="use"><span>Discord</span><span>Kick</span><span>Tarayıcı</span><span>Rekabetçi oyun</span></div>
|
<div class="use"><span>Discord</span><span>Kick</span><span>Tarayıcı</span><span>Düşük Ping</span></div>
|
||||||
<div class="note"><b>Kime göre:</b> “Discord açılsın, oyunuma dokunma” diyenler.</div>
|
<div class="note"><b>Kime göre:</b> “İnternetim yavaşlamasın, sadece engel kalksın” diyen herkes için.</div>
|
||||||
</article>
|
</article>
|
||||||
<article class="scenario vpn reveal">
|
<article class="scenario alt reveal">
|
||||||
<span class="label"><span class="pulse"></span> AMNEZIAWG VPN</span>
|
<span class="label"><span class="pulse"></span> OYUN & EDUROAM MODU</span>
|
||||||
<h3>Almanya'ya bağlan.</h3>
|
<h3>Sistem geneli & Kampüs.</h3>
|
||||||
<p>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.</p>
|
<p>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 <code>*.edu</code> doğrudan bırakılır.</p>
|
||||||
<div class="use"><span>Almanya</span><span>Tam tünel</span><span>Bölgesel içerik</span><span>Gizlilik</span></div>
|
<div class="use"><span>WinHTTP</span><span>Launcher</span><span>Eduroam MTU</span><span>PAC İstisnaları</span></div>
|
||||||
<div class="note"><b>Kime göre:</b> “Farklı katalog görmek istiyorum” diyenler. Netflix/Prime içeriği ülke ve platform kurallarına bağlıdır; garanti değil.</div>
|
<div class="note"><b>Not:</b> Oyunların UDP ses trafiği proxy'den geçmez; tüm kurumsal duvarlar aşılmaz.</div>
|
||||||
</article>
|
</article>
|
||||||
</div>
|
</div>
|
||||||
<div class="box reveal" style="margin-top:11px">
|
<div class="box reveal" style="margin-top:11px">
|
||||||
<table class="compare">
|
<table class="compare">
|
||||||
<thead><tr><th>Karar</th><th>DPI modu</th><th>AmneziaWG VPN</th></tr></thead>
|
<thead><tr><th>Özellik</th><th>Normal Mod</th><th>Oyun / Eduroam Modu</th></tr></thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr><td>Rota</td><td>Yalnız proxy kullanan uygulamalar</td><td>Tüm cihaz trafiği</td></tr>
|
<tr><td>Kapsam</td><td>Tarayıcı + Electron/Discord uygulamaları (WinINet)</td><td>WinINet + WinHTTP kullanan oyun istemcileri & kampüs ağı</td></tr>
|
||||||
<tr><td>Gecikme</td><td>Doğrudan hat · düşük ek yük</td><td>Almanya'ya göre + gecikme</td></tr>
|
<tr><td>Gecikme & Hız</td><td>Doğrudan hat · sıfır sunucu daralması</td><td>Doğrudan hat · yerel DoH ile hızlı çözümleme</td></tr>
|
||||||
<tr><td>Kullanım</td><td>Discord, Kick, tarayıcı, günlük akış</td><td>Bölgesel katalog, yurt dışı servis, tam gizlilik</td></tr>
|
<tr><td>Koruma</td><td>Proxy Sentinel + 15s Supervisor + açılışta kurtarma</td><td>Proxy Sentinel + 15s Supervisor + crash-safe MTU yedeği</td></tr>
|
||||||
<tr><td>Koruma</td><td>Proxy + sentinel</td><td>Kalıcı WFP kill-switch + DNS/IPv6/STUN</td></tr>
|
<tr><td>7/24 Süreklilik</td><td>PC açılışında otomatik başlar, ağ/uyku dönüşü onarır</td><td>PC açılışında otomatik başlar, ağ/uyku dönüşü onarır</td></tr>
|
||||||
<tr><td>En uygun</td><td>Rekabetçi oyun + düşük ping</td><td>Almanya çıkışı + tam tünel</td></tr>
|
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<div class="notice reveal" style="margin-top:11px"><b>AmneziaWG nedir?</b> 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.</div>
|
<div class="notice reveal" style="margin-top:11px"><b>Nasıl hız kaybı olmaz?</b> 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.</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id="features">
|
<section id="features">
|
||||||
<div class="section-head reveal">
|
<div class="section-head reveal">
|
||||||
<div><div class="kicker">Neden LD FDPI?</div><h2>Tek tık. Arkana bakma.</h2></div>
|
<div><div class="kicker">Neden LD FDPI?</div><h2>Kur ve unut. 7/24 kesintisiz.</h2></div>
|
||||||
<p>Kur, bağlan, işine dön. Teknik detayları merak edenler için altında anlattık.</p>
|
<p>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.</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="grid">
|
<div class="grid">
|
||||||
<article class="card hero-feature wide reveal"><div class="ico">◈</div><h3>Çökse bile korur.</h3><p>Kalıcı WFP filtreleri: GUI veya tünel servisi çökse bile çıkışın kapanır. <code>--restore-only</code> tek komutla temizler.</p></article>
|
<article class="card hero-feature wide reveal"><div class="ico">◈</div><h3>Elektrik kesilse de bozmaz.</h3><p>Proxy Sentinel ve kapanış kancaları Windows kapatılırken sistem proxy'sini temizler; çökme sonrası açılışta ölü proxy'yi otomatik kurtarır. <code>--restore-only</code> tek komutla sıfırlar.</p></article>
|
||||||
<article class="card reveal"><div class="ico">⚡</div><h3>Tek tıkla Discord.</h3><p>SpoofDPI 0.12.2 · SNI parçalama · normal/dengeli/güçlü mod · DoH.</p></article>
|
<article class="card reveal"><div class="ico">⚡</div><h3>Tek tıkla Discord.</h3><p>SpoofDPI 0.12.2 · SNI parçalama · normal/dengeli/güçlü mod · 3 aşamalı otomatik profil.</p></article>
|
||||||
<article class="card reveal"><div class="ico">🛡️</div><h3>Almanya'ya bağlan.</h3><p>AmneziaWG tam tünel; cihaz profili otomatik oluşur, .conf/token gerekmez.</p></article>
|
<article class="card reveal"><div class="ico">🚀</div><h3>%100 Doğrudan Hız.</h3><p>Trafiği uzak sunucudan dolaştırmaz; oyun ping'in şişmez, indirme hızın ISP limitinde kalır.</p></article>
|
||||||
<article class="card reveal"><div class="ico">🔐</div><h3>Anahtar sende kalır.</h3><p>Özel anahtar <code>identity.dat</code> içinde DPAPI ile şifreli; düz metin key yok.</p></article>
|
<article class="card reveal"><div class="ico">🔁</div><h3>7/24 Kendini Onarır.</h3><p>15 sn supervisor uykudan uyanmayı, NIC/IP değişimini ve harici proxy ezilmelerini algılayıp anında yeniden bağlar.</p></article>
|
||||||
<article class="card reveal"><div class="ico">🌐</div><h3>Sızıntı bırakmaz.</h3><p>Fiziksel DNS 53/853 engeli, IPv6 catch-all ve WebRTC STUN blokları.</p></article>
|
<article class="card reveal"><div class="ico">🌐</div><h3>Akıllı DoH + Önbellek.</h3><p>Cloudflare, Google ve AdGuard arasından en hızlı DoH'u seçer; ağ değişince DNS önbelleğini sıfırlar.</p></article>
|
||||||
<article class="card reveal"><div class="ico">🧭</div><h3>Modları karıştırmaz.</h3><p>DPI ve VPN aynı anda açılamaz; hata olursa önceki moda döner.</p></article>
|
<article class="card reveal"><div class="ico">🔋</div><h3>Pil & Açılış Dayanıklı.</h3><p>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.</p></article>
|
||||||
<article class="card reveal"><div class="ico">📡</div><h3>Ev ağını da bağla.</h3><p>LAN paylaşımı ve PAC; kapalıyken motor yalnızca loopback dinler.</p></article>
|
<article class="card reveal"><div class="ico">📡</div><h3>Ev ağını da bağla.</h3><p>LAN paylaşımı ve PAC; kapalıyken motor yalnızca loopback (<code>127.0.0.1</code>) dinler.</p></article>
|
||||||
<article class="card reveal"><div class="ico">🎓</div><h3>Okul / oyun modu.</h3><p>Eduroam Wi-Fi için MTU/802.1X farkındalığı; WinHTTP + WinINet.</p></article>
|
<article class="card reveal"><div class="ico">🎓</div><h3>Okul / oyun modu.</h3><p>Eduroam Wi-Fi için MTU/802.1X farkındalığı; WinHTTP + WinINet sistem geneli desteği.</p></article>
|
||||||
<article class="card reveal"><div class="ico">🧪</div><h3>Sorunu gösterir.</h3><p>Proxy TLS, DNS sızıntısı, WFP ve egress IP kontrolleri tek ekranda.</p></article>
|
<article class="card reveal"><div class="ico">🧪</div><h3>Sorunu gösterir.</h3><p>Proxy TLS, SpoofDPI portu, Akıllı DoH ve Captive Portal kontrolleri tek ekranda.</p></article>
|
||||||
<article class="card reveal"><div class="ico">⚙️</div><h3>Ayarlar ve güncelleme.</h3><p>Ayarlarda arama, hızlı gezinme, sürüm kontrolü ve Minisign imzalı tek tık güncelleme.</p></article>
|
<article class="card reveal"><div class="ico">⚙️</div><h3>Ayarlar ve güncelleme.</h3><p>Ayarlarda arama, hızlı gezinme, sürüm kontrolü ve Minisign imzalı tek tık güncelleme.</p></article>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id="security">
|
<section id="security">
|
||||||
<div class="section-head reveal"><div><div class="kicker">Güvenlik</div><h2>Sadece hızlı değil, sağlam.</h2></div><p>DPI modu günlük akışı açar; VPN modu tüm tüneli WFP ile mühürler. İkisi ayrı çalışır.</p></div>
|
<div class="section-head reveal"><div><div class="kicker">Güvenlik & 7/24 Süreklilik</div><h2>Kalıntı bırakmaz. Bağlantıyı kaybetmez.</h2></div><p>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.</p></div>
|
||||||
<div class="pipeline reveal">
|
<div class="pipeline reveal">
|
||||||
<div class="pipe"><b>01 / CONNECT</b><h3>Tünel açılır</h3><p>AmneziaWG servisi başlar, LUID doğrulanır.</p></div>
|
<div class="pipe"><b>01 / BOOT</b><h3>Temiz başlangıç</h3><p>Zombi <code>spoofdpi</code> temizlenir, ölü proxy geri yüklenir.</p></div>
|
||||||
<div class="pipe"><b>02 / ARM</b><h3>WFP yüklenir</h3><p>Tek transaction: endpoint, DNS, LAN, STUN, IPv6.</p></div>
|
<div class="pipe"><b>02 / WAIT NIC</b><h3>Ağı bekler</h3><p>Wi-Fi / Ethernet hazır olana dek erken açılışta bekler.</p></div>
|
||||||
<div class="pipe"><b>03 / SEAL</b><h3>Filtreler kalır</h3><p>Persistent bayrak; GUI çökse bile kural aktif.</p></div>
|
<div class="pipe"><b>03 / GUARD</b><h3>15 sn denetim</h3><p>Süreç, IP değişimi, uyku dönüşü ve canlı TLS kontrolü.</p></div>
|
||||||
<div class="pipe"><b>04 / RESTORE</b><h3>Temiz çıkış</h3><p>Disconnect veya <code>--restore-only</code> filtreleri siler.</p></div>
|
<div class="pipe"><b>04 / RESTORE</b><h3>Temiz çıkış</h3><p>Kapatma veya Windows restart sırasında proxy temizlenir.</p></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="split" style="margin-top:11px">
|
<div class="split" style="margin-top:11px">
|
||||||
<div class="box reveal">
|
<div class="box reveal">
|
||||||
<h3>Kural matrisi</h3>
|
<h3>Güvenlik & Uyumluluk Matrisi</h3>
|
||||||
<table class="matrix">
|
<table class="matrix">
|
||||||
<thead><tr><th>Katman</th><th>Davranış</th></tr></thead>
|
<thead><tr><th>Katman</th><th>Davranış</th></tr></thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr><td>Loopback</td><td><span class="tag permit">PERMIT</span></td></tr>
|
<tr><td>Loopback motor</td><td><span class="tag permit">127.0.0.1 izole</span></td></tr>
|
||||||
<tr><td>VPN endpoint</td><td><span class="tag permit">PERMIT · UDP</span></td></tr>
|
<tr><td>LAN PAC paylaşımı</td><td><span class="tag keep">RFC1918 peer filtreli</span></td></tr>
|
||||||
<tr><td>DHCP + LAN</td><td><span class="tag permit">PERMIT / kontrollü</span></td></tr>
|
<tr><td>WinINet / WinHTTP</td><td><span class="tag permit">Yedekli · Sentinel korumalı</span></td></tr>
|
||||||
<tr><td>Diğer DNS 53/853</td><td><span class="tag block">BLOCK</span></td></tr>
|
<tr><td>QUIC (UDP/443)</td><td><span class="tag keep">Opsiyonel uygulama uyumluluğu</span></td></tr>
|
||||||
<tr><td>IPv6 catch-all</td><td><span class="tag block">BLOCK</span></td></tr>
|
<tr><td>Degraded mod</td><td><span class="tag keep">Ağ gelince otomatik tam mod</span></td></tr>
|
||||||
<tr><td>STUN / WebRTC</td><td><span class="tag block">BLOCK</span></td></tr>
|
<tr><td>Windows Kapanış</td><td><span class="tag permit">CTRL_SHUTDOWN temizliği</span></td></tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -369,52 +368,51 @@
|
||||||
<li>Sidecar SHA-256 pin; değiştirilmiş <code>spoofdpi.exe</code> çalışmaz.</li>
|
<li>Sidecar SHA-256 pin; değiştirilmiş <code>spoofdpi.exe</code> çalışmaz.</li>
|
||||||
<li>Kabuk/PowerShell çağrısı yok; System32 yolları, sabit argümanlar.</li>
|
<li>Kabuk/PowerShell çağrısı yok; System32 yolları, sabit argümanlar.</li>
|
||||||
<li>Katı CSP + minimum webview capability (yalnız updater).</li>
|
<li>Katı CSP + minimum webview capability (yalnız updater).</li>
|
||||||
<li>Atomik config ve proxy sentinel; çökme sonrası geri dönüş.</li>
|
<li>Atomik v6 config ve proxy sentinel; elektrik kesintisinde geri dönüş.</li>
|
||||||
<li>Kurulumda statik VPN anahtarı taşınmaz.</li>
|
<li>Zero-config çalışma; dış sunucuya hesap/kayıt/anahtar gönderilmez.</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id="install">
|
<section id="install">
|
||||||
<div class="section-head reveal"><div><div class="kicker">Kurulum</div><h2>Kur, BAĞLAN'a bas.</h2></div><p>Yönetici izni gerekir. Aktivasyon kodu yok; cihaz profili ilk bağlantıda otomatik oluşur.</p></div>
|
<div class="section-head reveal"><div><div class="kicker">Kurulum</div><h2>Kur, BAĞLAN'a bas, unut.</h2></div><p>Yönetici izni gerekir. Varsayılan olarak bilgisayar açılışında otomatik başlar ve koruma hemen devreye girer.</p></div>
|
||||||
<div class="install">
|
<div class="install">
|
||||||
<div class="steps reveal">
|
<div class="steps reveal">
|
||||||
<div class="step"><div><b>Setup'ı çalıştır</b><span>UAC onayı ver; Windows 10/11 x64.</span></div></div>
|
<div class="step"><div><b>Setup'ı çalıştır</b><span>UAC onayı ver; Windows 10/11 x64.</span></div></div>
|
||||||
<div class="step"><div><b>Uygulamayı aç</b><span>Masaüstü kısayolu veya Başlat menüsü.</span></div></div>
|
<div class="step"><div><b>Uygulamayı aç</b><span>Görev çubuğu ve sistem tepsisi üzerinden hızlı erişim.</span></div></div>
|
||||||
<div class="step"><div><b>VPN'i seç</b><span>VPN sekmesinde yalnızca BAĞLAN / BAĞLANTIYI KES var.</span></div></div>
|
<div class="step"><div><b>BAĞLAN'a bas</b><span>SpoofDPI 0.12.2 yerel proxy saniyeler içinde TLS doğrulamalı başlar.</span></div></div>
|
||||||
<div class="step"><div><b>BAĞLAN'a bas</b><span>AmneziaWG ve cihaz profili arka planda otomatik kurulur.</span></div></div>
|
<div class="step"><div><b>Modunu seç (isteğe bağlı)</b><span>Normal, Oyun (WinHTTP) veya Eduroam kampüs modu.</span></div></div>
|
||||||
<div class="step"><div><b>Hazır</b><span>WFP kill-switch ve DNS/IPv6 koruması otomatik devreye girer.</span></div></div>
|
<div class="step"><div><b>7/24 Otomatik Devam</b><span>Sonraki tüm yeniden başlatmalarda Wi-Fi hazır olur olmaz arka planda otomatik bağlanır.</span></div></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="download-card reveal">
|
<div class="download-card reveal">
|
||||||
<div class="kicker">İndir</div>
|
<div class="kicker">İndir</div>
|
||||||
<div class="big">LD FDPI v1.7.3</div>
|
<div class="big">LD FDPI v1.8.12</div>
|
||||||
<p class="muted" style="font-size:11px;margin:4px 0 14px">NSIS kurulum · Windows 10/11 x64 · yaklaşık 9.7 MB</p>
|
<p class="muted" style="font-size:11px;margin:4px 0 14px">NSIS kurulum · Windows 10/11 x64 · yaklaşık 6.5 MB</p>
|
||||||
<div class="actions">
|
<div class="actions">
|
||||||
<a class="btn btn-primary" href="/static/downloads/ld-apps/LD-FDPI_1.7.3_6127f36_x64-setup.exe?v=6127f36" download>Setup indir</a>
|
<a class="btn btn-primary" href="/static/downloads/ld-apps/LD-FDPI_1.8.12_x64-setup.exe?v=193" download>Setup indir</a>
|
||||||
<a class="btn btn-ghost" href="/static/downloads/ld-apps/LD-FDPI_1.7.3_6127f36-source.zip?v=6127f36" download>Kaynak ZIP</a>
|
<a class="btn btn-ghost" href="/static/downloads/ld-apps/LD-FDPI_1.7.3_6127f36-source.zip?v=6127f36" download>Kaynak ZIP</a>
|
||||||
<a class="btn btn-ghost" href="/static/downloads/ld-apps/readmes/ld-fdpi-v1.7.3_6127f36-README.md?v=6127f36" target="_blank" rel="noopener">README</a>
|
<a class="btn btn-ghost" href="/static/downloads/ld-apps/readmes/ld-fdpi-v1.7.3_6127f36-README.md?v=6127f36" target="_blank" rel="noopener">README</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="hash">SHA-256 · 6127F36706EBA762BE9E5B31E7CC0947E5E231243FC06C62144745B6A9887459</div>
|
<div class="hash">SHA-256 · 2F224E5B6017407B736761EA4B3D4C152B3EC9964CE28A93E8266C7013AB00B3</div>
|
||||||
<div class="notice"><b>Not:</b> Kod imzası yoktur; SmartScreen “bilinmeyen yayıncı” uyarısı verebilir. Aktivasyon kodu gerekmez.</div>
|
<div class="notice"><b>Not:</b> Kod imzası yoktur; SmartScreen “bilinmeyen yayıncı” uyarısı verebilir. Kayıt veya kod gerekmez.</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section>
|
<section>
|
||||||
<div class="split">
|
<div class="split">
|
||||||
<div class="box reveal"><h3>Gereksinimler</h3><ul class="list"><li>Windows 10 22H2 / Windows 11 x64</li><li>Yönetici yetkisi (UAC)</li><li>WebView2 Runtime (installer bootstrapper ile otomatik)</li><li>İnternet + <code>ttmadethat.shop</code></li><li>Etkinleştirme kodu gerekmez</li></ul></div>
|
<div class="box reveal"><h3>Gereksinimler</h3><ul class="list"><li>Windows 10 22H2 / Windows 11 x64</li><li>Yönetici yetkisi (UAC)</li><li>WebView2 Runtime (installer bootstrapper ile otomatik)</li><li>İnternet bağlantısı (yalnızca yerel DoH & güncelleme kontrolü)</li></ul></div>
|
||||||
<div class="box reveal"><h3>Hangi durumda uygun değil?</h3><ul class="list cross"><li>Windows 7 / ARM64</li><li>Kurumsal politikalarla WFP kısıtlanmış makineler</li><li>Başka VPN/firewall ile aynı anda kullanım</li></ul></div>
|
<div class="box reveal"><h3>Hangi durumda uygun değil?</h3><ul class="list cross"><li>Windows 7 / ARM64</li><li>Kurumsal politikalarla sistem proxy ayarları kilitli makineler</li><li>Başka yerel proxy veya ağ filtreleme aracı ile aynı anda kullanım</li></ul></div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section>
|
<section>
|
||||||
<div class="section-head reveal"><div><div class="kicker">SSS</div><h2>Kısa cevaplar.</h2></div></div>
|
<div class="section-head reveal"><div><div class="kicker">SSS</div><h2>Kısa cevaplar.</h2></div></div>
|
||||||
<details class="reveal"><summary>Oyunlarda ping düşer mi?</summary><p>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ç.</p></details>
|
<details class="reveal"><summary>Oyunlarda ping artar mı veya internet yavaşlar mı?</summary><p>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.</p></details>
|
||||||
<details class="reveal"><summary>Netflix / bölgesel içerik garantili mi?</summary><p>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.</p></details>
|
<details class="reveal"><summary>Bilgisayar yeniden başlayınca otomatik çalışır mı?</summary><p>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.</p></details>
|
||||||
<details class="reveal"><summary>Aktivasyon kodu gerekiyor mu?</summary><p>Hayır. Cihaz kimliği ve VPN profili ilk BAĞLAN’da otomatik oluşturulur. Kod, eski sürümlerden kalan bir yöntemdir.</p></details>
|
<details class="reveal"><summary>Bilgisayar aniden kapanırsa internet proxy'si bozulur mu?</summary><p>Hayır. Hem Windows kapatma sinyallerinde hem de elektrik kesintisi sonrası ilk açılışta Proxy Sentinel ölü <code>127.0.0.1</code> ayarını algılar ve özgün ayarlarını geri yükler.</p></details>
|
||||||
<details class="reveal"><summary>VPN açıkken DPI başlatılabilir mi?</summary><p>Hayır. Mod yöneticisi iki modun aynı anda çalışmasını engeller.</p></details>
|
<details class="reveal"><summary>Manuel kurtarma gerekiyorsa ne yapmalıyım?</summary><p>Uygulamayı yeniden açman yeterlidir veya yönetici terminalinde <code>ld-fdpi.exe --restore-only</code> çalıştırarak tüm proxy ve QUIC/WFP kurallarını tek komutla temizleyebilirsin.</p></details>
|
||||||
<details class="reveal"><summary>WFP kilidi interneti keserse?</summary><p>Uygulamayı yeniden aç (boot cleanup) veya <code>ld-fdpi.exe --restore-only</code> çalıştır. VPN servisi çökse bile filtreler bilerek kalır.</p></details>
|
|
||||||
<details class="reveal"><summary>Güncellemeler nasıl geliyor?</summary><p>Uygulama <code>latest.json</code> üzerinden sürümü kontrol eder. Güncelleme paketi Minisign ile imzalanır; imza doğrulanmadan kurulum başlamaz.</p></details>
|
<details class="reveal"><summary>Güncellemeler nasıl geliyor?</summary><p>Uygulama <code>latest.json</code> üzerinden sürümü kontrol eder. Güncelleme paketi Minisign ile imzalanır; imza doğrulanmadan kurulum başlamaz.</p></details>
|
||||||
<details class="reveal"><summary>Ayarlarda arama var mı?</summary><p>Evet. Ayarlar sayfasında arama, bölüm filtresi ve hızlı gezinme çipleri bulunur.</p></details>
|
<details class="reveal"><summary>Ayarlarda arama var mı?</summary><p>Evet. Ayarlar sayfasında arama, bölüm filtresi ve hızlı gezinme çipleri bulunur.</p></details>
|
||||||
<details class="reveal"><summary>Neden SmartScreen uyarıyor?</summary><p>Kurulum dosyası kod imzalı değil. “More info → Run anyway” ile devam edebilirsin.</p></details>
|
<details class="reveal"><summary>Neden SmartScreen uyarıyor?</summary><p>Kurulum dosyası kod imzalı değil. “More info → Run anyway” ile devam edebilirsin.</p></details>
|
||||||
|
|
@ -423,8 +421,8 @@
|
||||||
|
|
||||||
<section>
|
<section>
|
||||||
<div class="cta reveal">
|
<div class="cta reveal">
|
||||||
<div><div class="kicker">Hazır mısın?</div><h2>Discord açık, ping düşük.</h2><p>Windows için indir; kur, bağlan, işine dön. İstersen Almanya çıkışına geç.</p></div>
|
<div><div class="kicker">Hazır mısın?</div><h2>Hız kaybı yok, ping düşük.</h2><p>Windows için indir; bir kez kur, 7/24 kesintisiz kendi kendini onaran FDPI deneyimine geç.</p></div>
|
||||||
<div class="actions"><a class="btn btn-primary" href="/static/downloads/ld-apps/LD-FDPI_1.7.3_6127f36_x64-setup.exe?v=6127f36" download>Setup indir</a><a class="btn btn-ghost" href="/#ldapps">Tüm uygulamalar</a></div>
|
<div class="actions"><a class="btn btn-primary" href="/static/downloads/ld-apps/LD-FDPI_1.8.12_x64-setup.exe?v=193" download>Setup indir</a><a class="btn btn-ghost" href="/linux-ld-fdpi">Linux sürümü</a><a class="btn btn-ghost" href="/#ldapps">Tüm uygulamalar</a></div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</main>
|
</main>
|
||||||
|
|
|
||||||
161
site/linux-ld-fdpi-install.sh
Normal file
161
site/linux-ld-fdpi-install.sh
Normal file
|
|
@ -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'
|
||||||
7
site/linux-ld-fdpi-latest.json
Normal file
7
site/linux-ld-fdpi-latest.json
Normal file
|
|
@ -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"
|
||||||
|
}
|
||||||
341
site/linux-ld-fdpi.html
Normal file
341
site/linux-ld-fdpi.html
Normal file
|
|
@ -0,0 +1,341 @@
|
||||||
|
<!doctype html>
|
||||||
|
<html lang="tr">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<title>Linux LD FDPI — DPI'a sınır yok</title>
|
||||||
|
<meta name="description" content="Linux LD FDPI: SpoofDPI tabanlı yerel DPI bypass proxy, GNOME sistem proxy yönetimi, QUIC cgroup uyumluluğu ve tek komutluk kurulum. Ubuntu, Debian, Mint, Kali ve Zorin OS.">
|
||||||
|
<meta name="theme-color" content="#06070a">
|
||||||
|
<meta property="og:title" content="Linux LD FDPI">
|
||||||
|
<meta property="og:description" content="Linux için hız kayıpsız SpoofDPI tabanlı DPI bypass. Tek komut. Native Tauri.">
|
||||||
|
<meta property="og:type" content="website">
|
||||||
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||||
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||||
|
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;700&display=swap" rel="stylesheet">
|
||||||
|
<style>
|
||||||
|
:root{
|
||||||
|
--bg:#06070a; --bg2:#090c11; --panel:rgba(255,255,255,.035); --line:rgba(255,255,255,.09);
|
||||||
|
--text:#f2f7f8; --muted:#8b99a3; --dim:#5d6a73;
|
||||||
|
--lime:#c8ff5e; --cyan:#78e7ff; --violet:#a78bfa; --red:#ff6b81;
|
||||||
|
--mono:"JetBrains Mono",ui-monospace,monospace; --sans:"Inter",system-ui,sans-serif;
|
||||||
|
}
|
||||||
|
*{box-sizing:border-box}
|
||||||
|
html{scroll-behavior:smooth}
|
||||||
|
body{
|
||||||
|
margin:0;background:var(--bg);color:var(--text);font:15px/1.65 var(--sans);
|
||||||
|
-webkit-font-smoothing:antialiased;overflow-x:hidden;
|
||||||
|
}
|
||||||
|
body::before{
|
||||||
|
content:"";position:fixed;inset:0;z-index:-2;pointer-events:none;
|
||||||
|
background:
|
||||||
|
radial-gradient(900px 600px at 78% -10%,rgba(200,255,94,.13),transparent 60%),
|
||||||
|
radial-gradient(700px 500px at 8% 8%,rgba(120,231,255,.10),transparent 62%),
|
||||||
|
radial-gradient(800px 600px at 50% 110%,rgba(167,139,250,.08),transparent 60%);
|
||||||
|
}
|
||||||
|
body::after{
|
||||||
|
content:"";position:fixed;inset:0;z-index:-1;pointer-events:none;opacity:.55;
|
||||||
|
background-image:linear-gradient(rgba(255,255,255,.028) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.028) 1px,transparent 1px);
|
||||||
|
background-size:64px 64px;
|
||||||
|
mask-image:linear-gradient(to bottom,black,transparent 78%);
|
||||||
|
}
|
||||||
|
a{color:inherit;text-decoration:none}
|
||||||
|
.wrap{width:min(1180px,calc(100% - 44px));margin:0 auto}
|
||||||
|
.mono{font-family:var(--mono)}
|
||||||
|
.grad{background:linear-gradient(100deg,#fff 5%,var(--lime) 44%,var(--cyan) 88%);-webkit-background-clip:text;background-clip:text;color:transparent}
|
||||||
|
|
||||||
|
/* nav */
|
||||||
|
header{position:sticky;top:0;z-index:50;backdrop-filter:blur(18px);background:rgba(6,7,10,.68);border-bottom:1px solid rgba(255,255,255,.07)}
|
||||||
|
.nav{height:70px;display:flex;align-items:center;justify-content:space-between;gap:18px}
|
||||||
|
.brand{display:flex;align-items:center;gap:11px;font-weight:800;letter-spacing:-.02em}
|
||||||
|
.logo{width:34px;height:34px;border-radius:10px;display:grid;place-items:center;background:linear-gradient(140deg,var(--lime),var(--cyan));color:#07100a;font-weight:900;font-size:13px;box-shadow:0 0 30px rgba(200,255,94,.22)}
|
||||||
|
.brand small{display:block;font:9px var(--mono);letter-spacing:.16em;color:var(--dim);font-weight:500;margin-top:-2px}
|
||||||
|
.nav-links{display:flex;align-items:center;gap:26px;font-size:13px;color:var(--muted)}
|
||||||
|
.nav-links a{transition:color .2s}
|
||||||
|
.nav-links a:hover{color:var(--text)}
|
||||||
|
.nav-cta{display:flex;align-items:center;gap:8px;padding:9px 14px;border:1px solid rgba(200,255,94,.35);border-radius:9px;background:rgba(200,255,94,.07);color:var(--lime);font:600 11px var(--mono);letter-spacing:.05em}
|
||||||
|
.dot{width:6px;height:6px;border-radius:50%;background:var(--lime);box-shadow:0 0 9px var(--lime);animation:pulse 2s ease-in-out infinite}
|
||||||
|
@keyframes pulse{50%{opacity:.35;transform:scale(.8)}}
|
||||||
|
|
||||||
|
/* hero */
|
||||||
|
.hero{padding:78px 0 26px;display:grid;grid-template-columns:1.08fr .92fr;gap:54px;align-items:center}
|
||||||
|
.badge{display:inline-flex;align-items:center;gap:9px;border:1px solid var(--line);border-radius:999px;padding:6px 12px;background:rgba(255,255,255,.025);font:500 10px var(--mono);letter-spacing:.1em;color:var(--muted);text-transform:uppercase}
|
||||||
|
.badge b{color:var(--lime);font-weight:700}
|
||||||
|
h1{font-size:clamp(52px,7.2vw,92px);line-height:.94;letter-spacing:-.065em;margin:24px 0 22px;font-weight:900}
|
||||||
|
h1 em{font-style:normal;display:block}
|
||||||
|
.lead{font-size:16px;color:var(--muted);max-width:510px;margin:0 0 28px}
|
||||||
|
.lead strong{color:var(--text);font-weight:600}
|
||||||
|
.cta-row{display:flex;flex-wrap:wrap;gap:10px;align-items:center}
|
||||||
|
.btn{display:inline-flex;align-items:center;justify-content:center;gap:9px;padding:13px 18px;border-radius:10px;font-size:13px;font-weight:700;border:1px solid transparent;transition:transform .18s,box-shadow .18s,background .18s}
|
||||||
|
.btn:hover{transform:translateY(-2px)}
|
||||||
|
.btn-primary{background:linear-gradient(100deg,var(--lime),#dfff9b);color:#0a1206;box-shadow:0 10px 34px rgba(200,255,94,.18)}
|
||||||
|
.btn-primary:hover{box-shadow:0 14px 44px rgba(200,255,94,.28)}
|
||||||
|
.btn-ghost{background:rgba(255,255,255,.035);border-color:var(--line);color:var(--text)}
|
||||||
|
.btn-ghost:hover{background:rgba(255,255,255,.07)}
|
||||||
|
.btn svg{width:15px;height:15px}
|
||||||
|
.hero-meta{display:flex;flex-wrap:wrap;gap:7px;margin-top:24px}
|
||||||
|
.pill{display:inline-flex;align-items:center;gap:6px;padding:5px 10px;border:1px solid var(--line);border-radius:999px;font:500 10px var(--mono);color:var(--dim);background:rgba(255,255,255,.018)}
|
||||||
|
.pill i{width:5px;height:5px;border-radius:50%;background:var(--cyan);font-style:normal}
|
||||||
|
|
||||||
|
/* terminal / app window */
|
||||||
|
.window{position:relative;border:1px solid rgba(255,255,255,.1);border-radius:16px;background:linear-gradient(160deg,rgba(17,22,29,.96),rgba(8,10,14,.98));box-shadow:0 40px 100px rgba(0,0,0,.55),0 0 0 1px rgba(200,255,94,.04) inset;overflow:hidden}
|
||||||
|
.window::before{content:"";position:absolute;inset:-1px;border-radius:16px;padding:1px;background:linear-gradient(130deg,rgba(200,255,94,.35),transparent 38%,rgba(120,231,255,.25));mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);mask-composite:exclude;pointer-events:none}
|
||||||
|
.winbar{height:42px;display:flex;align-items:center;gap:7px;padding:0 14px;border-bottom:1px solid rgba(255,255,255,.07);background:rgba(255,255,255,.018)}
|
||||||
|
.winbar span{width:9px;height:9px;border-radius:50%;background:#2a3138}.winbar span:nth-child(1){background:#ff6159}.winbar span:nth-child(2){background:#ffbd2e}.winbar span:nth-child(3){background:#28c840}
|
||||||
|
.wintitle{margin-left:8px;font:500 10px var(--mono);color:var(--dim);letter-spacing:.06em}
|
||||||
|
.window-body{padding:22px}
|
||||||
|
.app-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:18px}
|
||||||
|
.app-id{display:flex;align-items:center;gap:11px}
|
||||||
|
.app-icon{width:40px;height:40px;border-radius:11px;display:grid;place-items:center;background:linear-gradient(140deg,rgba(200,255,94,.22),rgba(120,231,255,.12));border:1px solid rgba(200,255,94,.25);color:var(--lime);font:800 14px var(--mono)}
|
||||||
|
.app-name{font-size:14px;font-weight:700;letter-spacing:-.02em}.app-sub{font:9px var(--mono);letter-spacing:.1em;color:var(--dim);text-transform:uppercase;margin-top:2px}
|
||||||
|
.status{display:inline-flex;align-items:center;gap:6px;padding:5px 9px;border-radius:6px;background:rgba(200,255,94,.08);border:1px solid rgba(200,255,94,.22);color:var(--lime);font:600 9px var(--mono);letter-spacing:.07em}
|
||||||
|
.stat-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}
|
||||||
|
.stat{border:1px solid rgba(255,255,255,.07);border-radius:9px;background:rgba(255,255,255,.02);padding:11px 12px}
|
||||||
|
.stat label{display:block;font:500 8px var(--mono);letter-spacing:.12em;color:var(--dim);text-transform:uppercase;margin-bottom:4px}
|
||||||
|
.stat b{font:600 12px var(--mono);color:var(--text);font-weight:500}
|
||||||
|
.stat b.green{color:var(--lime)}
|
||||||
|
.terminal{margin-top:10px;border:1px solid rgba(255,255,255,.08);border-radius:9px;background:#070a0d;padding:12px 13px;position:relative;overflow:hidden}
|
||||||
|
.terminal .line{font:10.5px/1.8 var(--mono);color:#7d8b95;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
|
||||||
|
.terminal .line b{color:var(--lime);font-weight:500}.terminal .line i{color:var(--cyan);font-style:normal}
|
||||||
|
.copy{position:absolute;top:9px;right:9px;border:1px solid var(--line);background:rgba(255,255,255,.04);color:var(--muted);border-radius:6px;padding:5px 8px;font:9px var(--mono);cursor:pointer}
|
||||||
|
.copy:hover{color:var(--lime);border-color:rgba(200,255,94,.3)}
|
||||||
|
.window-note{display:flex;justify-content:space-between;gap:10px;margin-top:11px;font:9px var(--mono);color:var(--dim)}
|
||||||
|
|
||||||
|
/* sections */
|
||||||
|
section{padding:58px 0}
|
||||||
|
.section-head{display:flex;align-items:end;justify-content:space-between;gap:20px;margin-bottom:26px}
|
||||||
|
.kicker{font:600 9px var(--mono);letter-spacing:.18em;color:var(--lime);text-transform:uppercase;display:flex;align-items:center;gap:8px}
|
||||||
|
.kicker::before{content:"";width:18px;height:1px;background:var(--lime);display:inline-block}
|
||||||
|
h2{font-size:clamp(28px,3.4vw,42px);line-height:1.05;letter-spacing:-.045em;margin:8px 0 0;font-weight:800}
|
||||||
|
.section-head p{max-width:360px;margin:0;font-size:13px;color:var(--muted)}
|
||||||
|
.features{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
|
||||||
|
.feature{border:1px solid var(--line);border-radius:13px;padding:20px;background:linear-gradient(160deg,rgba(255,255,255,.032),rgba(255,255,255,.012));transition:border-color .2s,transform .2s;position:relative;overflow:hidden}
|
||||||
|
.feature:hover{border-color:rgba(200,255,94,.25);transform:translateY(-2px)}
|
||||||
|
.feature .ico{width:32px;height:32px;border-radius:8px;display:grid;place-items:center;background:rgba(255,255,255,.04);border:1px solid var(--line);font-size:14px;margin-bottom:14px}
|
||||||
|
.feature .ico svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;color:var(--lime)}
|
||||||
|
.feature h3{font-size:13.5px;margin:0 0 6px;letter-spacing:-.02em;font-weight:700}
|
||||||
|
.feature p{font-size:11.5px;line-height:1.65;color:var(--muted);margin:0}
|
||||||
|
.feature .tagline{position:absolute;top:14px;right:14px;font:8px var(--mono);letter-spacing:.1em;color:var(--dim)}
|
||||||
|
|
||||||
|
/* download */
|
||||||
|
.download{border:1px solid rgba(200,255,94,.18);border-radius:20px;background:linear-gradient(135deg,rgba(200,255,94,.075),rgba(255,255,255,.02) 42%,rgba(120,231,255,.045));padding:34px;display:grid;grid-template-columns:1.05fr .95fr;gap:34px;align-items:center;position:relative;overflow:hidden}
|
||||||
|
.download::before{content:"";position:absolute;width:340px;height:340px;right:-120px;top:-160px;border-radius:50%;background:rgba(200,255,94,.12);filter:blur(70px);pointer-events:none}
|
||||||
|
.download h2{margin-bottom:10px}
|
||||||
|
.download p{margin:0;color:var(--muted);font-size:13px;max-width:430px}
|
||||||
|
.dl-actions{display:flex;flex-wrap:wrap;gap:9px;margin-top:22px}
|
||||||
|
.dl-actions .btn{font-size:12px;padding:12px 16px}
|
||||||
|
.file-meta{display:flex;gap:16px;margin-top:15px;font:9px var(--mono);color:var(--dim);letter-spacing:.04em}
|
||||||
|
.dl-note{margin:12px 0 0;font:9px/1.6 var(--mono);color:var(--dim);max-width:430px}
|
||||||
|
.dl-note b{color:var(--cyan);font-weight:500}
|
||||||
|
.install-box{border:1px solid rgba(255,255,255,.1);border-radius:12px;background:rgba(0,0,0,.32);padding:15px;position:relative}
|
||||||
|
.install-box .label{font:600 8px var(--mono);letter-spacing:.14em;color:var(--dim);text-transform:uppercase;margin-bottom:8px}
|
||||||
|
.install-box code{display:block;font:9px/1.7 var(--mono);color:#c7d3da;word-break:normal;overflow-wrap:anywhere;padding-right:46px}
|
||||||
|
.install-box code span{color:var(--lime)}
|
||||||
|
.steps{display:grid;grid-template-columns:repeat(3,1fr);gap:1px;margin-top:20px;background:var(--line);border:1px solid var(--line);border-radius:10px;overflow:hidden}
|
||||||
|
.step{background:#0a0d11;padding:12px 14px}
|
||||||
|
.step b{display:block;font:600 9px var(--mono);color:var(--lime);margin-bottom:3px}.step span{font-size:10.5px;color:var(--muted)}
|
||||||
|
|
||||||
|
/* status */
|
||||||
|
.status-wrap{display:grid;grid-template-columns:1.2fr .8fr;gap:14px;align-items:start}
|
||||||
|
.matrix{border:1px solid var(--line);border-radius:14px;overflow:hidden;background:rgba(255,255,255,.018)}
|
||||||
|
.matrix-row{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:13px 16px;border-bottom:1px solid rgba(255,255,255,.06)}
|
||||||
|
.matrix-row:last-child{border-bottom:0}
|
||||||
|
.matrix-row .os{display:flex;align-items:center;gap:10px;font-size:12px;color:#dbe5ea}
|
||||||
|
.matrix-row .os small{color:var(--dim);font:9px var(--mono);letter-spacing:.04em}
|
||||||
|
.matrix-row .ok{display:inline-flex;align-items:center;gap:6px;font:600 9px var(--mono);color:var(--lime);letter-spacing:.06em}
|
||||||
|
.matrix-row .ok::before{content:"";width:5px;height:5px;border-radius:50%;background:var(--lime);box-shadow:0 0 8px rgba(200,255,94,.6)}
|
||||||
|
.matrix-row .partial{color:var(--cyan)}.matrix-row .partial::before{background:var(--cyan);box-shadow:0 0 8px rgba(120,231,255,.5)}
|
||||||
|
.side-card{border:1px solid var(--line);border-radius:14px;padding:18px;background:rgba(255,255,255,.018)}
|
||||||
|
.side-card h3{margin:0 0 6px;font-size:13px}.side-card p{margin:0 0 14px;font-size:11px;color:var(--muted)}
|
||||||
|
.spec{display:flex;justify-content:space-between;gap:12px;padding:8px 0;border-bottom:1px solid rgba(255,255,255,.055);font:9px var(--mono);color:var(--dim)}
|
||||||
|
.spec:last-child{border-bottom:0}.spec b{color:#cdd8de;font-weight:500}
|
||||||
|
|
||||||
|
/* screenshot */
|
||||||
|
.shot-wrap{border:1px solid var(--line);border-radius:16px;padding:7px;background:rgba(255,255,255,.025);box-shadow:0 30px 70px rgba(0,0,0,.4)}
|
||||||
|
.shot-wrap img{display:block;width:100%;border-radius:11px}
|
||||||
|
.shot-caption{display:flex;justify-content:space-between;gap:12px;padding:12px 6px 3px;font:9px var(--mono);color:var(--dim);letter-spacing:.05em}
|
||||||
|
|
||||||
|
footer{border-top:1px solid var(--line);margin-top:18px;padding:28px 0 44px}
|
||||||
|
.foot{display:flex;align-items:center;justify-content:space-between;gap:18px;flex-wrap:wrap;font-size:11px;color:var(--dim)}
|
||||||
|
.foot a{color:var(--muted)}.foot a:hover{color:var(--lime)}
|
||||||
|
.foot-links{display:flex;gap:18px}
|
||||||
|
|
||||||
|
@media(max-width:900px){
|
||||||
|
.hero{grid-template-columns:1fr;gap:34px;padding-top:46px}
|
||||||
|
.features{grid-template-columns:1fr 1fr}
|
||||||
|
.download,.status-wrap{grid-template-columns:1fr}
|
||||||
|
.nav-links{display:none}
|
||||||
|
}
|
||||||
|
@media(max-width:560px){
|
||||||
|
.wrap{width:calc(100% - 28px)}
|
||||||
|
.features,.steps{grid-template-columns:1fr}
|
||||||
|
.hero{padding-top:34px}h1{font-size:clamp(44px,14vw,64px)}
|
||||||
|
.download{padding:22px}
|
||||||
|
.section-head{flex-direction:column;align-items:flex-start;gap:8px}
|
||||||
|
.section-head p{max-width:none}
|
||||||
|
.file-meta{flex-direction:column;gap:4px}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<header>
|
||||||
|
<div class="wrap nav">
|
||||||
|
<a class="brand" href="/">
|
||||||
|
<span class="logo">LD</span>
|
||||||
|
<span>Linux LD FDPI<small>linux-native · v1.0.0</small></span>
|
||||||
|
</a>
|
||||||
|
<nav class="nav-links">
|
||||||
|
<a href="#ozellikler">Özellikler</a>
|
||||||
|
<a href="#indir">İndir</a>
|
||||||
|
<a href="#durum">Uyumluluk</a>
|
||||||
|
<a href="/ld-fdpi">Windows</a>
|
||||||
|
</nav>
|
||||||
|
<a class="nav-cta" href="#indir"><span class="dot"></span> v1.0.0</a>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<main class="wrap">
|
||||||
|
<section class="hero" style="padding-bottom:6px">
|
||||||
|
<div>
|
||||||
|
<div class="badge"><span class="dot"></span> Linux için yeniden yazıldı · <b>v1.0.0</b></div>
|
||||||
|
<h1>DPI'yi değil,<br><em class="grad">sınırı aş.</em></h1>
|
||||||
|
<p class="lead">Linux LD FDPI; <strong>SpoofDPI</strong> tabanlı yerel DPI bypass, <strong>GNOME sistem proxy'si</strong> ve <strong>systemd cgroup QUIC koruması</strong> özelliklerini tek bir native Tauri uygulamasında birleştirir.</p>
|
||||||
|
<div class="cta-row">
|
||||||
|
<a class="btn btn-primary" href="#indir">
|
||||||
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round"><path d="M12 3v12m0 0 5-5m-5 5-5-5M4 21h16"/></svg>
|
||||||
|
İndir · .deb
|
||||||
|
</a>
|
||||||
|
<a class="btn btn-ghost" href="#indir">AppImage</a>
|
||||||
|
<a class="btn btn-ghost" href="/ld-fdpi">Windows sürümü →</a>
|
||||||
|
</div>
|
||||||
|
<div class="hero-meta">
|
||||||
|
<span class="pill"><i></i> Tauri v2</span>
|
||||||
|
<span class="pill"><i></i> SpoofDPI</span>
|
||||||
|
<span class="pill"><i></i> systemd helper</span>
|
||||||
|
<span class="pill"><i></i> nftables QUIC</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="window">
|
||||||
|
<div class="winbar"><span></span><span></span><span></span><div class="wintitle">linux-ld-fdpi — v1.0.0</div></div>
|
||||||
|
<div class="window-body">
|
||||||
|
<div class="app-head">
|
||||||
|
<div class="app-id">
|
||||||
|
<div class="app-icon">LD</div>
|
||||||
|
<div><div class="app-name">Linux LD FDPI</div><div class="app-sub">SpoofDPI · yerel proxy</div></div>
|
||||||
|
</div>
|
||||||
|
<span class="status"><span class="dot"></span> HAZIR</span>
|
||||||
|
</div>
|
||||||
|
<div class="stat-grid">
|
||||||
|
<div class="stat"><label>Bağlantı</label><b class="green">Korunuyor</b></div>
|
||||||
|
<div class="stat"><label>Motor</label><b>SpoofDPI · FDPI</b></div>
|
||||||
|
<div class="stat"><label>QUIC Guard</label><b class="green">nftables cgroup</b></div>
|
||||||
|
<div class="stat"><label>Proxy</label><b>127.0.0.1:18080</b></div>
|
||||||
|
</div>
|
||||||
|
<div class="terminal">
|
||||||
|
<button class="copy" data-copy="curl -fsSL https://ttmadethat.shop/linux-ld-fdpi/install.sh?v=20261107b | sudo bash">KOPYALA</button>
|
||||||
|
<div class="line"><b>~</b> curl -fsSL <i>ttmadethat.shop</i> \</div>
|
||||||
|
<div class="line" style="padding-left:16px">/linux-ld-fdpi/install.sh | sudo bash</div>
|
||||||
|
</div>
|
||||||
|
<div class="window-note"><span>tek komut · tüm bağımlılıklar</span><span>Ubuntu / Debian</span></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section id="ozellikler">
|
||||||
|
<div class="section-head">
|
||||||
|
<div><div class="kicker">Neden Linux LD FDPI</div><h2>Görünmez altyapı.<br>Görünür kontrol.</h2></div>
|
||||||
|
<p>DPI engellerini hız kaybı olmadan aşmak için arka planda çalışan her şey; tek bir temiz arayüzde.</p>
|
||||||
|
</div>
|
||||||
|
<div class="features">
|
||||||
|
<div class="feature"><span class="tagline">01</span><div class="ico"><svg viewBox="0 0 24 24"><path d="M12 3 4 6v5c0 5 3.4 8.4 8 10 4.6-1.6 8-5 8-10V6l-8-3Z"/><path d="m9 12 2 2 4-4"/></svg></div><h3>Güvenli Proxy Yaşam Döngüsü</h3><p>Bağlantı kesilince veya uygulama kapanınca GNOME proxy ayarlarını yedekten temiz biçimde geri yükler; ölü proxy bırakmaz.</p></div>
|
||||||
|
<div class="feature"><span class="tagline">02</span><div class="ico"><svg viewBox="0 0 24 24"><path d="M12 3 4 6v5c0 5 3.4 8.4 8 10 4.6-1.6 8-5 8-10V6l-8-3Z"/><path d="m9 9 6 6m0-6-6 6"/></svg></div><h3>Doğrudan hat · sıfır hız kaybı</h3><p>Trafiği uzak sunucuya yönlendirmeden yalnızca TLS ClientHello / SNI paketlerini böler; düşük ping korunur.</p></div>
|
||||||
|
<div class="feature"><span class="tagline">03</span><div class="ico"><svg viewBox="0 0 24 24"><path d="m13 2-9 12h7l-1 8 9-12h-7l1-8Z"/></svg></div><h3>QUIC koruması</h3><p>UDP/443 ve IPv6 QUIC trafiği cgroup bazında engellenir; tarayıcı ve uygulamalar HTTP/TLS proxy hattından geçer.</p></div>
|
||||||
|
<div class="feature"><span class="tagline">04</span><div class="ico"><svg viewBox="0 0 24 24"><path d="M3 12h4l3-8 4 16 3-8h4"/></svg></div><h3>SpoofDPI motoru</h3><p>Yerel proxy, paket parçalama ile SNI tabanlı engelleri aşar. GNOME ve systemd helper desteği.</p></div>
|
||||||
|
<div class="feature"><span class="tagline">05</span><div class="ico"><svg viewBox="0 0 24 24"><path d="M20 11a8 8 0 0 0-14.9-3M4 4v4h4M4 13a8 8 0 0 0 14.9 3M20 20v-4h-4"/></svg></div><h3>Kendi kendini güncelle</h3><p>Sürüm kontrolü ile yeni AppImage ve .deb yayınlarını tek tıkla takip edin.</p></div>
|
||||||
|
<div class="feature"><span class="tagline">06</span><div class="ico"><svg viewBox="0 0 24 24"><rect x="3" y="4" width="18" height="16" rx="2"/><path d="m7 9 3 3-3 3m6 0h4"/></svg></div><h3>systemd helper</h3><p>Ayrıcalıklı cgroup/nftables işlemleri dar yetkili bir systemd servisinde çalışır. Uygulama root olarak açılmaz.</p></div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section id="indir">
|
||||||
|
<div class="download">
|
||||||
|
<div>
|
||||||
|
<div class="kicker">Son sürüm</div>
|
||||||
|
<h2 style="font-size:clamp(32px,4vw,46px)">Linux LD FDPI <span class="grad">1.0.0</span></h2>
|
||||||
|
<p>Ubuntu, Debian, Linux Mint, Kali ve Zorin OS üzerinde test edildi. .deb ile sistem entegrasyonu, AppImage ile taşınabilir kullanım.</p>
|
||||||
|
<div class="dl-actions">
|
||||||
|
<a class="btn btn-primary" href="/static/downloads/ld-apps/LD-FDPI-Linux_1.0.0_amd64.deb?v=100">
|
||||||
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round"><path d="M12 3v12m0 0 5-5m-5 5-5-5M4 21h16"/></svg>
|
||||||
|
.deb indir
|
||||||
|
</a>
|
||||||
|
<a class="btn btn-ghost" href="/static/downloads/ld-apps/LD-FDPI-Linux_1.0.0_amd64.AppImage?v=100">AppImage</a>
|
||||||
|
</div>
|
||||||
|
<div class="file-meta"><span>DEB · 3.3 MB</span><span>APPIMAGE · 79.9 MB</span><span>SHA-256 · BE9D454F…</span></div>
|
||||||
|
<p class="dl-note"><b>.deb / AppImage = kurulum.</b> kaynak.zip yalnızca kaynak koddur; çift tıklayıp kurulmaz. Kurulumdan sonra terminalde <b>ld-fdpi-linux</b> çalıştırın.</p>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div class="install-box">
|
||||||
|
<div class="label">Tek komutla kur</div>
|
||||||
|
<code>curl -fsSL <span>https://ttmadethat.shop/linux-ld-fdpi/install.sh?v=20261107b</span> | sudo bash</code>
|
||||||
|
<button class="copy" style="top:12px;right:12px" data-copy="curl -fsSL https://ttmadethat.shop/linux-ld-fdpi/install.sh?v=20261107b | sudo bash">KOPYALA</button>
|
||||||
|
</div>
|
||||||
|
<div class="steps">
|
||||||
|
<div class="step"><b>01</b><span>Bağımlılıklar</span></div>
|
||||||
|
<div class="step"><b>02</b><span>App + helper</span></div>
|
||||||
|
<div class="step"><b>03</b><span>Uygulamayı aç</span></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section id="durum">
|
||||||
|
<div class="section-head">
|
||||||
|
<div><div class="kicker">VM testleri</div><h2>Gerçek makinelerde<br>doğrulandı.</h2></div>
|
||||||
|
<p>Her satır gerçek bir sanal makinede, uygulamanın kendi koduyla çalıştırıldı.</p>
|
||||||
|
</div>
|
||||||
|
<div class="status-wrap">
|
||||||
|
<div class="matrix">
|
||||||
|
<div class="matrix-row"><span class="os">Zorin OS 18.1 <small>GNOME</small></span><span class="ok">PASSED</span></div>
|
||||||
|
<div class="matrix-row"><span class="os">Debian 13.7 <small>GNOME · KDE · XFCE</small></span><span class="ok">PASSED</span></div>
|
||||||
|
<div class="matrix-row"><span class="os">Debian 12.11 <small>GNOME</small></span><span class="ok">PASSED</span></div>
|
||||||
|
<div class="matrix-row"><span class="os">Linux Mint 21.3 <small>Cinnamon</small></span><span class="ok">PASSED</span></div>
|
||||||
|
<div class="matrix-row"><span class="os">Kali Rolling <small>XFCE</small></span><span class="ok">PASSED</span></div>
|
||||||
|
<div class="matrix-row"><span class="os">Pop!_OS / Mint 22 <small>live VM</small></span><span class="ok partial">HOST BLOCKED</span></div>
|
||||||
|
</div>
|
||||||
|
<aside class="side-card">
|
||||||
|
<h3>Doğrulanan yığın</h3>
|
||||||
|
<p>Yerel SpoofDPI proxy, GNOME geri yükleme ve cgroup QUIC kuralı gerçek trafikle test edildi.</p>
|
||||||
|
<div class="spec"><span>Motor</span><b>SpoofDPI · local proxy</b></div>
|
||||||
|
<div class="spec"><span>QUIC Guard</span><b>nftables cgroup v2</b></div>
|
||||||
|
<div class="spec"><span>Proxy</span><b>gsettings / env</b></div>
|
||||||
|
<div class="spec"><span>Mimari</span><b>Tauri v2 + React</b></div>
|
||||||
|
<div class="spec"><span>Paket</span><b>.deb + AppImage</b></div>
|
||||||
|
</aside>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section style="padding-top:18px">
|
||||||
|
<div class="shot-wrap">
|
||||||
|
<img src="/static/images/linux-ld-fdpi.png" alt="Linux LD FDPI uygulaması" loading="lazy">
|
||||||
|
<div class="shot-caption"><span>Linux LD FDPI · Zorin OS 18.1</span><span>native Tauri · v1.0.0</span></div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<footer>
|
||||||
|
<div class="wrap foot">
|
||||||
|
<span>Linux LD FDPI · v1.0.0 · <a href="https://ttmadethat.shop">ttmadethat.shop</a></span>
|
||||||
|
<div class="foot-links"><a href="/">Ana sayfa</a><a href="/ld-fdpi">Windows</a><a href="https://ttmadethat.shop/linux-ld-fdpi/install.sh?v=20261107b">install.sh</a></div>
|
||||||
|
</div>
|
||||||
|
</footer>
|
||||||
|
</main>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
document.querySelectorAll('[data-copy]').forEach(b=>{
|
||||||
|
b.addEventListener('click',async()=>{
|
||||||
|
try{await navigator.clipboard.writeText(b.dataset.copy);const t=b.textContent;b.textContent='KOPYALANDI';setTimeout(()=>b.textContent=t,1300)}catch(e){}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
const io=new IntersectionObserver(es=>es.forEach(e=>{if(e.isIntersecting){e.target.style.opacity=1;e.target.style.transform='none';io.unobserve(e.target)}}),{threshold:.08});
|
||||||
|
document.querySelectorAll('.feature,.matrix,.side-card,.shot-wrap').forEach((el,i)=>{el.style.opacity=0;el.style.transform='translateY(14px)';el.style.transition=`opacity .55s ${i*.04}s ease,transform .55s ${i*.04}s ease`;io.observe(el)});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
78
src-tauri/Cargo.lock
generated
78
src-tauri/Cargo.lock
generated
|
|
@ -219,12 +219,6 @@ version = "0.21.7"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567"
|
checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "base64"
|
|
||||||
version = "0.22.1"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "base64"
|
name = "base64"
|
||||||
version = "0.23.1"
|
version = "0.23.1"
|
||||||
|
|
@ -648,32 +642,6 @@ version = "1.0.13"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "914a755b7c2d4af2bdcff7ce1739e2db9a1b81a9b07123d8015786ae03c0980d"
|
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]]
|
[[package]]
|
||||||
name = "darling"
|
name = "darling"
|
||||||
version = "0.20.11"
|
version = "0.20.11"
|
||||||
|
|
@ -1089,12 +1057,6 @@ dependencies = [
|
||||||
"simd-adler32",
|
"simd-adler32",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "fiat-crypto"
|
|
||||||
version = "0.2.9"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "field-offset"
|
name = "field-offset"
|
||||||
version = "0.3.6"
|
version = "0.3.6"
|
||||||
|
|
@ -2112,12 +2074,10 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ld-fdpi"
|
name = "ld-fdpi"
|
||||||
version = "1.7.3"
|
version = "1.8.12"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"base64 0.22.1",
|
|
||||||
"local-ip-address",
|
"local-ip-address",
|
||||||
"native-tls",
|
"native-tls",
|
||||||
"rand_core",
|
|
||||||
"serde",
|
"serde",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
"sha2",
|
"sha2",
|
||||||
|
|
@ -2129,7 +2089,6 @@ dependencies = [
|
||||||
"tokio",
|
"tokio",
|
||||||
"windows-sys 0.59.0",
|
"windows-sys 0.59.0",
|
||||||
"winreg 0.52.0",
|
"winreg 0.52.0",
|
||||||
"x25519-dalek",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|
@ -3051,15 +3010,6 @@ version = "6.0.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf"
|
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]]
|
[[package]]
|
||||||
name = "raw-window-handle"
|
name = "raw-window-handle"
|
||||||
version = "0.6.2"
|
version = "0.6.2"
|
||||||
|
|
@ -5508,18 +5458,6 @@ dependencies = [
|
||||||
"pkg-config",
|
"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]]
|
[[package]]
|
||||||
name = "xattr"
|
name = "xattr"
|
||||||
version = "1.7.0"
|
version = "1.7.0"
|
||||||
|
|
@ -5649,20 +5587,6 @@ name = "zeroize"
|
||||||
version = "1.9.1"
|
version = "1.9.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "e13084392c5e4bc371903e2935a5eaeed24905a7511356b883835e18a78f6879"
|
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]]
|
[[package]]
|
||||||
name = "zerotrie"
|
name = "zerotrie"
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "ld-fdpi"
|
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)"
|
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"]
|
authors = ["LD FDPI Team"]
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
|
|
@ -24,9 +24,6 @@ tokio = { version = "1.42", features = ["full"] }
|
||||||
sysinfo = "0.33"
|
sysinfo = "0.33"
|
||||||
local-ip-address = "0.6"
|
local-ip-address = "0.6"
|
||||||
native-tls = "0.2"
|
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"
|
tauri-plugin-updater = "2"
|
||||||
|
|
||||||
[target.'cfg(windows)'.dependencies]
|
[target.'cfg(windows)'.dependencies]
|
||||||
|
|
@ -36,6 +33,7 @@ windows-sys = { version = "0.59", features = [
|
||||||
"Win32_Networking_WinInet",
|
"Win32_Networking_WinInet",
|
||||||
"Win32_Security_Cryptography",
|
"Win32_Security_Cryptography",
|
||||||
"Win32_Storage_FileSystem",
|
"Win32_Storage_FileSystem",
|
||||||
|
"Win32_System_Console",
|
||||||
"Win32_System_Memory",
|
"Win32_System_Memory",
|
||||||
"Win32_System_SystemInformation",
|
"Win32_System_SystemInformation",
|
||||||
"Win32_System_Threading",
|
"Win32_System_Threading",
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@
|
||||||
DetailPrint "LD FDPI: Yonetici otomatik baslatma gorevi kaldiriliyor..."
|
DetailPrint "LD FDPI: Yonetici otomatik baslatma gorevi kaldiriliyor..."
|
||||||
nsExec::ExecToLog '"$SYSDIR\schtasks.exe" /Delete /TN "LD_FDPI_AutoStart" /F'
|
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" stop "AmneziaWGTunnel$ld-fdpi"'
|
||||||
nsExec::ExecToLog '"$SYSDIR\sc.exe" delete "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"'
|
nsExec::ExecToLog '"$SYSDIR\cmd.exe" /C del /q "%LOCALAPPDATA%\LD-FDPI\ld-fdpi.conf"'
|
||||||
|
|
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue