Commit Graph

468 Commits

Author SHA1 Message Date
ospab 1bc63c4094 feat: add X-Ostp-Server validation to UoT handshake 2026-05-21 13:15:49 +03:00
ospab e7ad24bb13 CI/CD: release version v0.2.14 2026-05-21 13:06:19 +03:00
ospab 92fc73756f fix: use POST and Content-Length in UoT to prevent nginx chunked encoding 2026-05-21 13:06:06 +03:00
ospab 3eb547db9d CI/CD: release version v0.2.13 2026-05-21 12:44:06 +03:00
ospab a81625d721 fix: correctly handle payload buffering during http handshake in uot 2026-05-21 12:43:47 +03:00
ospab 1c98bf9a51 CI/CD: release version v0.2.12 2026-05-21 03:00:51 +03:00
ospab 921533f560 fix: pass mtu to tun2socks 2026-05-21 03:00:44 +03:00
ospab c957a3a395 CI/CD: release version v0.2.11 2026-05-21 03:00:24 +03:00
ospab 5fa110d962 fix: make uot check case-insensitive 2026-05-21 03:00:07 +03:00
ospab a5a0a17cfd feat: add transport and mtu fields to gui 2026-05-21 02:59:01 +03:00
ospab f55769bae0 CI/CD: release version v0.2.10 2026-05-21 02:33:24 +03:00
ospab b87e87a7bd fix: correctly parse transport config section from json in CLI and GUI 2026-05-21 02:33:14 +03:00
ospab aa3fb70933 CI/CD: release version v0.2.9 2026-05-21 02:28:33 +03:00
ospab d9c3ba875c fix: disable aws-lc-rs backend in rustls for 32-bit musl compatibility 2026-05-21 02:28:28 +03:00
ospab 8bc8a3ce51 CI/CD: release version v0.2.8 2026-05-21 02:24:59 +03:00
ospab 81293a9071 feat: indicate protocol in connection log 2026-05-21 02:24:53 +03:00
ospab 30dea79197 CI/CD: release version v0.2.7 2026-05-21 02:24:02 +03:00
ospab ceb760e4ce feat: implement server-side UoT and MTU tuning 2026-05-21 02:23:49 +03:00
ospab 112ddfee59 CI/CD: release version v0.2.6 2026-05-21 02:11:45 +03:00
ospab 83f7ff2119 feat: UoT and xHTTP stealth 2026-05-21 02:11:02 +03:00
ospab 9329bcef45 feat: WSS transport mode selector in Flutter UI + TransportConfig in Rust 2026-05-21 00:39:12 +03:00
ospab 0cc5cf47ef feat: NetworkChanged command for instant mobile reconnect, lower stall threshold 25s->8s 2026-05-21 00:29:49 +03:00
ospab baff58c7fb CI/CD: release version v0.2.5 2026-05-18 22:05:26 +03:00
ospab a0e38c462e fix: clamp padding size to prevent UDP fragmentation on LTE/cellular and dynamically report connection status 2026-05-18 22:03:33 +03:00
ospab 4384125bf8 CI/CD: release version v0.2.4 2026-05-18 21:05:15 +03:00
ospab 8a2af5d73d feat: implement robust multiplexing, high-latency timeouts, and dynamic background reconnects for mobile network stability 2026-05-18 21:04:51 +03:00
ospab 3a4b5a8c63 chore: fix cargo clippy warnings
- Boxed HandshakeState in NoiseSession to reduce enum variant sizes
- Used is_ok() instead of let Ok(_) pattern
- Applied automatic clippy fixes for minor warnings
2026-05-17 22:22:39 +03:00
ospab 990af12fbe CI/CD: release version v0.2.3 2026-05-17 22:13:37 +03:00
ospab ee14a60348 feat: GUI v2 redesign + CI/CD speedup
GUI (ostp-gui):
- Complete HTML rewrite: orbit rings, server badge, metrics bar, peek-key
- CSS design system v2: ambient blobs, glassmorphism card, richer token set
  orbit animation (connected/connecting states), breathing power button,
  modern toggle component with thumb, toast variants (ok/error/default)
- main.js: clean state machine, server badge, TUN/SOCKS5 mode label,
  peek-key toggle, toast variants, import link, uptime counter

CI/CD (.github/workflows/release.yml):
- Replaced swatinem/rust-cache with actions/cache@v4 (per-target key)
- Cache cross binary: skip reinstall on cache hit (~3 min saved per job)
- Cache tauri-cli binary: skip reinstall on cache hit (~2 min saved per GUI job)
- Added npm cache (cache-dependency-path: ostp-gui/package-lock.json)
- Removed redundant pre-flight cargo check step (duplicates build step)
- Cleaned up packaging scripts (inline vars, smaller surface area)
2026-05-17 22:13:03 +03:00
ospab 3a16373a31 CI/CD: release version v0.2.2 2026-05-17 21:58:53 +03:00
ospab 9b01466953 test: integration tests for ProtocolMachine (handshake, data, close, wrong-psk, CC, multi-frame)
8 new integration tests in ostp-core::protocol::tests:
- test_full_handshake: Noise handshake -> Established state
- test_data_exchange_client_to_server: encrypt/decrypt data frame C->S
- test_data_exchange_server_to_client: encrypt/decrypt data frame S->C
- test_close_sequence: Close frame -> Closed state
- test_wrong_psk_handshake_fails: bad PSK rejected, never reaches Established
- test_congestion_controller_after_handshake: CC budget >= 2 in SlowStart
- test_multiple_data_frames: 10 sequential frames, payload integrity verified
- test_tick_no_crash: Tick event stable on both sides

Total: 43 tests, 0 failures
2026-05-17 21:58:01 +03:00
ospab bd3def32bb CI/CD: release version v0.2.1 2026-05-17 21:42:27 +03:00
ospab 73f84a951a feat: wire-level 0-RTT Resume frame, subscription API, adaptive pacing integration
Wire protocol:
- FrameKind::Resume (7) for 0-RTT session resumption
- Protocol handles Resume as early data delivery (zero round-trip)

Management API:
- GET /api/subscribe/{key} — returns client config JSON (sub-store compatible)
- Accept: text/plain returns ostp:// share link
- No Bearer token required — key itself is authentication
- ApiState extended with server_host/server_port for link generation

Graceful shutdown:
- Already implemented via wait_for_shutdown_signal() + tokio::select!
- Server drains in-flight frames before exit

35 tests pass, 0 failures, 0 warnings.
2026-05-17 21:42:01 +03:00
ospab ec8aab22f7 feat: install script v2 — global PATH symlink, /etc/ostp config, legacy path migration
- Binary at /opt/ostp/ostp, symlink at /usr/local/bin/ostp
- Config moved to /etc/ostp/config.json (standard Linux layout)
- Auto-migration from legacy paths: ~/ostp, /root/ostp, old /opt/ostp/config.json
- Systemd service updated with RUST_LOG=info
- Test script updated to discover binary via PATH first
2026-05-17 21:22:01 +03:00
ospab 3e6baf5a06 fix: use portable-atomic for AtomicU64 on 32-bit targets (MIPS, ARM32) 2026-05-17 21:14:07 +03:00
ospab 05583e189e feat: v0.2.0 — BBR congestion control, 0-RTT session resumption, management REST API, fallback server, multi-listener
Architecture:
- BBR-inspired congestion controller (SlowStart/ProbeBandwidth/ProbeRTT phases)
- 0-RTT session resumption with anti-replay ticket validation
- Management REST API (axum): /api/users CRUD, /api/server/status, Bearer auth
- TCP fallback proxy for anti-DPI camouflage (nginx/caddy passthrough)
- Multi-listener: bind to multiple UDP addresses simultaneously
- Per-user traffic stats with atomic counters and limit enforcement

Code quality:
- Structured logging: 0 eprintln in server/core/client, all tracing::{info,debug,warn,error}
- 35 unit tests across congestion, resumption, relay, outbound, obfuscation
- Removed dead code: kex.rs, unused dependencies (async-trait, x25519-dalek, rand_distr)
- Modular server: api.rs, fallback.rs, outbound.rs, relay.rs extracted from monolithic lib.rs

CLI:
- --check: config validation
- --generate-key: secure key generation (hex/base64, batch)
- --links: share link generation from server config
- --init: fallback section in server template

Documentation:
- README rewritten with architecture diagram, API examples, CLI reference
- Wiki: Management-API (EN+RU), Configuration (EN+RU), Home (EN+RU) updated
2026-05-17 21:05:44 +03:00
ospab a24d5d75d1 CI/CD: release version v0.1.70 2026-05-17 19:03:47 +03:00
ospab c82ec93ea7 fix: declare and grant custom Tauri v2 command permissions for GUI 2026-05-17 18:59:44 +03:00
ospab a31319a80a CI/CD: release version v0.1.69 2026-05-17 18:34:47 +03:00
ospab b342508932 chore: remove accidental wiki embedded submodule 2026-05-17 18:33:02 +03:00
ospab 0306cbaccd fix: resolve GUI buttons by safe tauri invoke, add validation toasts, build and bundle ostp-tun-helper in CI/CD pipeline 2026-05-17 18:32:55 +03:00
ospab 6ccaf3a303 CI/CD: release version v0.1.68 2026-05-17 16:40:02 +03:00
ospab ad87c80e8d chore: exclude wiki from main repo 2026-05-17 16:39:40 +03:00
ospab e8a92059d2 design: professional GUI redesign — minimal dark theme
Complete visual overhaul:
- Replaced vibrant/gaming aesthetic with enterprise-grade minimal design
- Darker, more muted color palette (bg: #0a0a0f, accent: #7c83ff)
- Reduced border/glow intensity for cleaner look
- Thinner power button border (solid 2px instead of thick radial gradient)
- Subtler ambient background effects (lower opacity, slower animation)
- More compact spacing and typography
- Smooth screen transitions (translateX instead of translateY)
- Refined toggle switches and form elements
- Consistent border-radius and padding system
2026-05-17 16:39:20 +03:00
ospab e20e4f2533 CI/CD: release version v0.1.67 2026-05-17 16:28:11 +03:00
ospab 49d97dbee3 test: add obfuscation round-trip tests, fix i18n module import
- 7 passing tests verify client-server compatibility:
  * Handshake obfuscation round-trip (correct key recovers session_id)
  * Wrong key produces garbage (prevents unauthorized probes)
  * Data packet obfuscation round-trip
  * Deterministic derivation (same key = same secrets)
  * Different keys produce different secrets
  * Legacy API consistency
  * Padding range validation (100 random keys)

- Fixed test module import path to use crate::crypto::obfuscation::*
- Added i18n.js module for GUI localization
2026-05-17 16:27:43 +03:00
ospab 69e4426152 feat: release preparation — TUN fix, i18n, GUI CI/CD, speed improvements
TUN Interface:
- Fixed adapter name to always be 'ostp_tun' by cleaning up stale
  adapters before launch (prevents 'ostp_tun 2', 'ostp_tun 3', etc.)
- Parallelized route setup with tun2socks launch to save ~3 seconds
- Replaced fixed 2-second sleep with adapter readiness polling
- Added -NoProfile to all PowerShell calls for faster execution

Speed:
- Reduced handshake timeout from 10s to 5s
- Reduced tun2socks spawn buffer from 300ms to 0 (removed)

GUI:
- Added i18n support: English and Russian translations
- Language toggle button in header (EN/RU)
- Merged 'IP Ranges' field into 'Bypass IPs / CIDR Ranges'
- Removed separate IP ranges field
- All static text uses data-i18n attributes
- Status messages, labels, toasts all translated
- Replaced alert() calls with toast notifications

CI/CD:
- Added separate GUI build job for Windows x64 and arm64
- Produces ostp-windows-gui-{arch}.zip with: ostp-gui.exe + wintun.dll + tun2socks.exe
- Uses Tauri CLI v2 for build
2026-05-17 16:25:30 +03:00
ospab 074a3f6371 CI/CD: release version v0.1.66 2026-05-17 15:32:44 +03:00
ospab a4d8da2460 security: Kerckhoffs's principle — all secrets derived from access key via HKDF
Applied Kerckhoffs's principle: the protocol's security and obfuscation
now depend SOLELY on the access key. An adversary who reverse-engineers
the binary cannot build a DPI filter without knowing the key.

Changes:
- Replaced hardcoded salt string ('-ostp-psk-salt') with HKDF-SHA256.
  The salt is now derived from the key hash itself — no protocol-specific
  strings remain in the binary.
- Unified all secret derivation into derive_all_secrets() which produces
  PSK, obfuscation key, and handshake padding range from a single HKDF
  invocation.
- Handshake padding range is now key-derived: different access keys
  produce different size distributions (min: 16-79, max: +48..+175).
  A universal size-based filter is impossible without the key.
- HKDF-SHA256 (RFC 5869) implemented inline using existing hmac+sha2
  dependencies — no new crate required.

What remains identifiable in the binary:
- 'Noise_NNpsk0_25519_ChaChaPoly_BLAKE2s' — standard Noise pattern
  string, shared with many other projects, NOT OSTP-specific.
- Generic HMAC/SHA-256/ChaCha20-Poly1305 code — standard crypto
  primitives used by millions of applications.
2026-05-17 15:32:07 +03:00
ospab 0418e5728c CI/CD: release version v0.1.65 2026-05-17 15:23:12 +03:00