Commit Graph

161 Commits

Author SHA1 Message Date
ospab f01ed4ec25 fix(server): constant-time comparison for Management API secrets
check_token() and handle_login() compared bearer tokens, session tokens,
and the password hash with plain ==, which short-circuits on the first
differing byte - a textbook remote timing side-channel against exactly
the long-lived secrets these gates exist to protect. Added subtle (already
in the dependency tree transitively via chacha20poly1305) as a direct
dependency and route every secret comparison through a small secure_eq()
wrapper over ConstantTimeEq. Username comparison in handle_login is left
as-is: it isn't treated as a secret in this threat model (one fixed admin
username), matching standard practice of only constant-timing the
password/token side of an auth check.

Added tests for secure_eq() itself (equal, different, different-length,
empty) alongside the existing check_token coverage.
2026-07-18 17:38:09 +03:00
ospab 66a1e97840 chore: release v0.4.2-beta.1 on beta 2026-07-12 02:18:47 +03:00
ospab 4fd4f7d435 build: drop stale [patch.crates-io] for removed vendored netstack-smoltcp
The vendored netstack-smoltcp directory was removed, but the workspace
[patch.crates-io] entry still pointed at the now-missing path, breaking the
whole build. ostp-client already declares netstack-smoltcp = "0.2.2", so
dropping the patch simply builds against the published crate (0.2.4).
2026-07-12 01:21:58 +03:00
ospab 10ec253fa0 chore: release v0.4.1-.0 on master 2026-07-10 03:17:41 +03:00
ospab 61091b6d56 chore(release): 0.4.7 + fix resolve-channel prerelease labelling
resolve-channel treated EVERY v* tag as stable, so v0.4.6-beta got published
as a non-prerelease "Latest" release, sitting on top of the release line. Now
a pushed tag is used as-is and its suffix decides the channel: v*-alpha / v*-beta
are prereleases, only a bare vX.Y.Z is stable. (A tag is never recomputed from
Cargo.toml, so the release can't upload to a different tag than the one pushed.)

Version bumped 0.4.5 -> 0.4.7 (0.4.6 is already taken by the mislabelled beta).
This commit's tip is what gets tagged v0.4.7-beta to cut the beta build.
2026-07-09 14:58:40 +03:00
ospab d065f6ceca chore: release 0.4.4-nightly on nightly 2026-07-08 19:13:55 +03:00
ospab ec947ec9d1 chore: release 0.4.3-nightly on nightly 2026-07-08 18:13:37 +03:00
ospab f81610f939 chore: bump version to 0.4.2 2026-07-08 17:28:14 +03:00
ospab acab38c551 0.4.1: per-key junk marker, GUI polish, pre-release pipeline
security / protocol:
- Derive a PER-KEY junk marker (obfuscation.rs, info byte 0x04) instead of the
  global constant [0x88,0x1A,0x93,0x5D]. A fixed marker was a universal DPI
  signature identifying ALL OSTP users at once — exactly what the HKDF version
  gate avoids for the handshake. Server drops junk via a new DispatchOutcome::Junk
  inside the existing key-trial loop (secrets already derived → zero extra cost);
  client stamps its own key's marker.
- §E: configurable junk/fragmentation params (junk_pc / junk_ps / frag_chunk / frag_sleep).

GUI (desktop):
- Light theme + toggle, GUI version footer in Settings.
- Fix mouse-wheel scroll on Settings (flex child needed min-height: 0).
- Drop the false "process exclusions unsupported in TUN mode" warning — they DO
  work (native_handler maps port->process via GetExtendedTcpTable).

release / infra:
- build.ps1: add -PreRelease (tag CURRENT version as v<ver>-beta.N, no bump, no
  master commit); guard the panel build when ostp-control ships no source; bump
  the real ostp-gui/package.json instead of the nonexistent ostp-control one.
- release.yml: mark hyphenated tags as GitHub pre-releases; don't hard-fail the
  web-panel step when there is no source (use committed dist/).
- Versions aligned to 0.4.1; README license badge BSL 1.1 -> AGPL v3.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-07 16:33:57 +03:00
ospab 38f2d9e659 §B: port stability fixes from 0.3.x onto the clean base
Ported only the fixes that actually apply to the pre-refactor base
(the handshake fixes 6eb7b36/d65af35 fix bugs the 0.3.1 multi-server
refactor introduced into the new outbounds/ostp.rs; the base bridge.rs
already waits for the handshake response with retransmit + NAT64
fallback, so they are intentionally skipped).

- EMFILE (922cf0b): rlimit::increase_nofile_limit at CLI startup.
- Logs (1151726): UoT connect/disconnect → debug; rate-limit the
  unauthorized-probe log to one line / ~30s so a junk/probe flood can't
  spam the log (and a client running junk-over-UDP can't self-ban).
- Helper lifecycle + bypass routes (b6e78c1):
  * ostp-tun-helper forces std::process::exit(0) after run_server so the
    WinTun adapter and its metric-0 default route are reclaimed instead
    of lingering as a zombie that breaks the next connect.
  * windows_route: delete_routes_for_dest() purges stale /32s, dedupe
    bypass IPs, and log add failures at warn!.
  * windows: retry tun::create through the transient ERROR_INVALID_
    PARAMETER window and widen the adapter-index lookup to ~15s.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-27 16:30:42 +03:00
ospab 92d6b06d75 §A: remove WSS + Reality (TLS-mimicry); bump to 0.4.0 / AGPL-3.0
Clean-rebuild on the stably-working v0.2.98 base. The project's stealth
path is zapret-like (packet obfuscation / junk / fragmentation), NOT
TLS-mimicry, so WSS and Reality are dropped entirely.

- Delete dead orphan files: ostp-client/src/transport/xhttp.rs and
  ostp-core/src/crypto/reality.rs (never declared as modules → not even
  compiled), plus ostp-core/src/framing/wss.rs.
- Scrub the `wss` transport field from client config/bridge, the unified
  CLI (ostp/src/main.rs), the Tauri GUI backend, the GUI frontend
  (index.html/main.js), and the Flutter UI; also drop the Reality
  pbk/sid plumbing and XTLS auto-search modes from both frontends.
- Drop now-unused client deps (x25519-dalek, chacha20poly1305, hex).
- Bump workspace to version 0.4.0 and license AGPL-3.0; make ostp's
  ostp-core dep path-only so the version bump resolves.
- gitignore ostp-control/ (panel assets built separately; a dummy dist
  is created for the rust-embed build).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-27 16:29:42 +03:00
ospab 31d0020483 CI/CD: release version v0.2.98 2026-06-16 14:21:02 +03:00
ospab feaac0c713 CI/CD: release version v0.2.97 2026-06-14 01:49:53 +03:00
ospab cf92089005 CI/CD: release version v0.2.96 2026-06-14 01:46:14 +03:00
ospab 533466b63a CI/CD: release version v0.2.95 2026-06-13 02:45:40 +03:00
ospab 4c0263f7f7 CI/CD: release version v0.2.94 2026-06-13 02:34:06 +03:00
ospab 4d228cf1e1 CI/CD: release version v0.2.93 2026-06-13 02:32:23 +03:00
ospab ab8d2c2185 CI/CD: release version v0.2.92 2026-06-13 02:28:22 +03:00
ospab 875177f779 CI/CD: release version v0.2.91 2026-06-13 02:23:24 +03:00
ospab 8fc61f986f CI/CD: release version v0.2.90 2026-06-13 02:12:51 +03:00
ospab 091bb2c707 CI/CD: release version v0.2.89 2026-06-13 02:00:26 +03:00
ospab 2d05fb282d CI/CD: release version v0.2.88 2026-06-13 01:58:32 +03:00
ospab 430ab8a743 CI/CD: release version v0.2.87 2026-06-09 01:02:11 +03:00
ospab 04c31c7f53 feat: implement wintun dynamic downloading, add missing driver frontend modal, fix background logging and UAC helper issues 2026-06-09 01:01:36 +03:00
ospab 60282d730f CI/CD: release version v0.2.86 2026-06-07 21:05:23 +03:00
ospab 85f0cb19cf CI/CD: release version v0.2.85 2026-06-07 20:44:28 +03:00
ospab c95720f3da CI/CD: release version v0.2.84 2026-06-07 20:10:39 +03:00
ospab 4d0249e8ef CI/CD: release version v0.2.83 2026-06-06 20:57:46 +03:00
ospab 4cd7321cc2 CI/CD: release version v0.2.82 2026-06-03 19:52:21 +03:00
ospab fe1333621b CI/CD: release version v0.2.81 2026-06-03 02:59:35 +03:00
ospab 8dbf52cba3 CI/CD: release version v0.2.80 2026-06-03 02:08:55 +03:00
ospab 84797f55ab CI/CD: release version v0.2.79 2026-06-03 01:19:25 +03:00
ospab 53ce4f21a0 CI/CD: release version v0.2.78 2026-06-03 01:02:10 +03:00
ospab 95a36e2bdf Patch netstack-smoltcp locally to fix catastrophic UDP tunnel stream crash on invalid packets 2026-05-30 21:34:31 +03:00
ospab 9095f0dacd CI/CD: release version v0.2.77 2026-05-30 21:15:20 +03:00
ospab f20618400e CI/CD: release version v0.2.76 2026-05-30 02:13:29 +03:00
ospab 5ce4ed559a CI/CD: release version v0.2.75 2026-05-30 01:40:52 +03:00
ospab f7cc555567 fix(build): remove ignored ostp-brain from Cargo.toml members to fix Github Actions 2026-05-30 01:33:34 +03:00
ospab e27378574c CI/CD: release version v0.2.74 2026-05-30 01:14:33 +03:00
ospab 7257da174a fix(client/mobile): resolve fdsan crash and mobile network proxy issues, add auto config UI 2026-05-30 00:54:46 +03:00
ospab 585c74556e CI/CD: release version v0.2.73 2026-05-29 17:37:33 +03:00
ospab f88de11d98 CI/CD: release version v0.2.72 2026-05-29 17:29:06 +03:00
ospab 6d8e5dd68d CI/CD: release version v0.2.71 2026-05-29 16:42:05 +03:00
ospab 2f15a90f15 CI/CD: release version v0.2.70 2026-05-29 16:23:12 +03:00
ospab 7986b1ca5b fix(reality): fix TLS 1.3 handshake causing 1KB DPI cutoff on mobile
The core bug: server sent 5 TLS records in server_hello but client only
read the first one (ServerHello), then passed remaining bytes (CCS + fake
records) into RealityStream. RealityStream saw 0x14 (CCS) != 0x17 and
immediately returned an error, killing the connection.

Changes:
- reality.rs: append ChangeCipherSpec after ClientHello (RFC 8446 D.4)
  export REALITY_SERVER_HANDSHAKE_RECORDS=5 constant
- xhttp.rs: drain all 5 server handshake records before creating RealityStream
- uot.rs: rebuild server_hello as proper 5-record TLS 1.3 flight:
  ServerHello + CCS + fake EE (108B) + fake Cert (812B) + fake Fin (52B)
  drain client CCS from raw stream before wrapping in RealityStream
2026-05-29 16:21:59 +03:00
ospab cd218c9cf8 CI/CD: release version v0.2.69 2026-05-29 15:19:51 +03:00
ospab 7656f3a3ce feat: implement custom Reality protocol with ChaCha20Poly1305 and X25519 2026-05-29 15:00:17 +03:00
ospab f4830f043f feat: implement optional WSS framing for DPI bypass & extract framing logic 2026-05-29 13:59:59 +03:00
ospab 0ef43bb823 CI/CD: release version v0.2.68 2026-05-29 00:18:47 +03:00
ospab 6a685f8226 CI/CD: release version v0.2.67 2026-05-28 23:18:21 +03:00