Commit Graph

41 Commits

Author SHA1 Message Date
ospab 7b43e1dcf7 ci: prefix rolling-channel release tags with "v" for consistency
Stable releases were already "vX.Y.Z" (from the actual git tag pushed for
that channel), but nightly/beta tags were bare "X.Y.Z-nightly"/"X.Y.Z-beta"
— inconsistent with the v-prefixed convention used everywhere else. Every
channel's tag now starts with v: "vX.Y.Z-nightly", "vX.Y.Z-beta", "vX.Y.Z".
2026-07-08 18:20:45 +03:00
ospab b17e5499eb ci: fix run-name to say "channel" instead of a bare branch name
run-name showed "release version nightly" / "release version pre-release"
for every branch-push run — read exactly like the release TAG was bare
"nightly"/"pre-release" (the bug fixed earlier), when the actual GH Release
tag has been correctly versioned (e.g. "0.4.3-nightly") all along via
resolve-channel. run-name can't reference job outputs (it's evaluated before
any job runs), so it can't show the real computed tag directly — spell out
"channel" instead so the label can't be mistaken for the release tag again.
2026-07-08 18:18:11 +03:00
ospab c330a0abe3 Fix UAC diagnostics parity, gk alias, flutter version, and versioned CI channels
- GUI launch_as_admin now matches the CLI's UAC diagnosis: detects
  ERROR_CANCELLED (1223, user declined the prompt) instead of silently
  treating it as success, and reports GetLastError()+exe path for any other
  ShellExecuteW failure, replacing the old single opaque "denied or missing"
  message that made GUI/TUI failures impossible to tell apart.
- generate-key subcommand renamed to `gk` (kept `generate-key` as an alias).
- Fixed a real short-flag collision: GenerateKey's --count used short='c',
  which collides with the global --config short (propagated into every
  subcommand); clap validates the whole command tree on first parse(), so
  this could break parsing for the entire CLI, not just generate-key/gk.
  --count is now short='n'.
- ostp-flutter/pubspec.yaml version was stuck at 0.2.97+12; bumped to 0.4.1+13.
- release.yml: added a resolve-channel job that computes one release tag per
  run instead of repeating the logic in five upload steps. Rolling channel
  pushes now carry the actual Cargo.toml version instead of a bare channel
  name: `{version}-nightly` for the nightly branch, `{version}-beta` for
  pre-release. workflow_dispatch gained a `channel` input restricted to
  nightly/beta only — a manual run can never accidentally publish a "stable"
  release; that still requires an explicit vX.Y.Z tag push.
2026-07-08 02:52:23 +03:00
ospab b2ee9eb010 Port CLI subcommands + multi-channel release onto the 0.4.0 rebuild
Brings the useful work from the old master/pre-release lineage (5c2b5a0)
onto the clean rebuild, since that lineage never had the multi-server/WSS/
Reality removal or any of the 0.4.0 stability work. This is a manual port,
not a cherry-pick — this file's Args/ClientConfig shape had already
diverged too much for the patch to apply mechanically.

- ostp/src/main.rs: flat Args -> clap subcommands (setup, init, generate-key,
  links, check, connect, uninstall, update, import, proxy-env,
  proxy-env-clear), bridged onto the existing ~500 lines of flag-driven
  dispatch via a LegacyArgs struct so none of that logic had to change.
- Fixed a real bug found while porting: GenerateKey's `count` used
  short='c', colliding with the global `--config` short (also 'c'), which
  clap validates across the whole command tree on first parse() -- a
  duplicate short flag there could break every subcommand's parsing, not
  just generate-key's.
- `update` now takes `-b/--branch` and `-v/--version` explicitly (was a
  bare flag with no way to target a channel or exact version).
- Added the UAC elevation step for TUN mode that this lineage's CLI was
  completely missing (`run_client_directly` went straight to creating the
  TUN adapter unelevated). Also fixed the elevation check itself: it only
  tested `ret <= 32`, but ShellExecuteW returns ERROR_CANCELLED (1223) when
  the user clicks "No" on the UAC prompt -- > 32, so a denied prompt was
  read as success and the process exited silently without starting the
  tunnel. Now ret==1223 is reported explicitly, and a genuine failure logs
  GetLastError() so the real Win32 cause is visible next time.
- scripts/install.sh: added -b/--branch alongside the existing -v/--version,
  and channel-aware release resolution (nightly/pre-release use their own
  rolling tag; stable resolves via the GitHub API's "latest").
- release.yml: added nightly/pre-release branch-push triggers for rolling
  prereleases. Fixed the tag_name logic from 5c2b5a0, which mapped
  `master` pushes to a release tagged "nightly" -- backwards from master
  being the most stable channel. github.ref_name already equals the
  branch or tag name that triggered the run, so no per-branch remapping is
  needed at all; master is intentionally left off the branch-push list --
  it only ever gets real version tags.

Verified: `cargo build -p ostp` succeeds, and `ostp update --help` /
`ostp generate-key --help` / `ostp --help` show the expected flags with no
clap panic.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-08 01:38:44 +03:00
ospab 8ca411a64b Fix github actions: remove working-directory for ostp-control to avoid failure when absent 2026-07-07 18:04:21 +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 7704e0bdb1 §A.3: remove dead tun2socks code (native OSTP TUN is the only path)
The "system" TUN stack that shelled out to a bundled tun2socks binary is
long-dead — Flutter already hardcodes the native OSTP stack — and only
bloats the build.

- ostp-jni: drop the tun2socks spawn branch and the tun_child handle;
  the native TUN (run_native_tunnel_from_fd) is now unconditional. The
  JNI signature is kept ABI-stable (t2sBinPath/localProxy retained but
  ignored) to avoid breaking the Kotlin linkage without an Android build.
- Delete the committed 10 MB tun2socks-arm64 asset; drop the tun2socks
  download steps from the Android build scripts.
- Remove the dead tun2socks.exe entry from the desktop build_dist.js
  (it required a file nothing downloads, breaking the GUI dist build).
- Reword stale tun2socks references in proxy.rs, the GUI config comment,
  install.ps1, the release workflow matrix, and CONTRIBUTING.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-27 16:29:55 +03:00
ospab 6dee7613a5 CI: Add step to create dummy dist directory for rust-embed during check-and-test 2026-06-13 02:44:01 +03:00
ospab ee6768dee1 CI: restore run-name format, add check-and-test gate before all builds 2026-06-13 02:04:03 +03:00
ospab dfbaff2c21 ci: add linux and macos gui build matrices 2026-06-02 23:01:22 +03:00
ospab a82c664e5b Fix UDP IPv4-mapped IPv6 address matching bug and completely remove tun2socks 2026-05-30 21:14:29 +03:00
ospab aeba340405 Upgrade Flutter to 3.41.6 in CI to support Kotlin DSL 2026-05-28 15:19:06 +03:00
ospab 360f84e5bd Fix Android rust_target matrix variable 2026-05-28 15:06:22 +03:00
ospab 33145febbb Fix Tauri build args, split Android into matrix, track flutter/gui, update docs and contacts 2026-05-28 15:01:41 +03:00
ospab 532bdc7e76 Update GUI builds to output dual architectures 2026-05-28 14:51:58 +03:00
ospab 25fa74eab6 Merge GUI jobs into release.yml and remove bare Android build 2026-05-28 14:48:26 +03:00
ospab 19f2c36400 Fix STUN bug, improve DNS in TUN, fix config gen, add GHA for clients 2026-05-28 14:39:42 +03:00
ospab 7f499d6263 feat: embed web panel via rust-embed with login page and custom webpath 2026-05-26 21:30:49 +03:00
ospab d482369ced ci: remove gui build from release matrix 2026-05-25 22:34:42 +03:00
ospab cd154d4418 ci(gha): fix missing dependencies in release archives 2026-05-21 22:29:02 +03:00
ospab cc3b0b689d fix: UoT server logs warn level, fix duplicate mux config, fix i686 CI with cross 2026-05-21 14:45:29 +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 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 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 e36d743ad5 refactor: professionalize all scripts and CI workflow
build.ps1:
- Added mandatory cargo check pre-flight that blocks releases on errors
- Added --Check flag for check-only mode (no build, no release)
- Reverts version bump if check fails
- Professionalized all output (removed informal language)
- Cleaner output structure with consistent [ok], [warn], [error] tags

install.ps1 / install.sh:
- Professionalized all prompts and messages
- Removed informal phrasing
- Consistent formatting

test_linux.sh:
- Updated all log string matchers to match professionalized output:
  'Connection established' (was 'Bridge connection established')
  'Starting server' (was 'Starting in SERVER mode')
  'Starting client' (was 'Starting in CLIENT mode')
  RTT regex updated for new format

release.yml:
- Added cargo check pre-flight step before native compilation
2026-05-17 03:41:40 +03:00
ospab 514bae94cd fix: resolve build errors and remove GUI from main release; docs: improve READMEs 2026-05-16 19:15:04 +03:00
ospab 4970b661db chore: implement keep-alive, config comments, validation and CI/CD improvements 2026-05-16 18:20:53 +03:00
ospab a3c8b3a750 fix: address final analysis issues including Nonce exhaustion, TUN pre-flight checks, dead code, and proper TURN channel framing. Also fix CI packaging of tun2socks 2026-05-15 19:23:50 +03:00
ospab 01277b5108 ci: fix macOS toolchain error and use linux-arm64 tun2socks for android builds 2026-05-15 18:39:26 +03:00
ospab 89fd886639 fix: use universal .zip for all tun2socks downloads in release CI workflow 2026-05-15 17:10:01 +03:00
ospab 6ae43a8f41 refactor: pre-package Wintun and tun2socks into archives via CI/CD and purge runtime downloader 2026-05-15 17:07:18 +03:00
ospab 578dcf6f9b fix: explicitly execute cargo through rustup run to bypass broken macOS runner shims 2026-05-15 16:46:19 +03:00
ospab e83d81b0a7 fix: resolve macOS ARM64 build fail by eliminating redundant shell env sourcing 2026-05-15 16:15:40 +03:00
ospab 403405c791 CI/CD: Complete system alignment by introducing Nightly toolchain exclusively for MIPS builds and applying macOS path-prioritization patches 2026-05-15 00:01:22 +03:00
ospab ed7054be7d CI/CD: Streamline triggers by removing redundant master branch push hook, enforcing tag-only execution 2026-05-14 23:53:12 +03:00
ospab de4e168162 CI/CD: Secure reliable cross-compilation via explicit Cross.toml registry and container isolation safeguards to solve MIPS, FreeBSD, and GLIBC failures 2026-05-14 23:51:37 +03:00
ospab 565023070a CI/CD: Safeguard GitHub Release asset upload step to only execute on Tag pushes, enabling clean verification builds on master branch 2026-05-14 23:20:33 +03:00
ospab e5980df243 CI/CD: Skip host-runner rustup target addition for Cross-Docker targets to prevent Tier-3 architecture compilation crashes 2026-05-14 23:19:42 +03:00
ospab d7f34505ec CI/CD: Fully bulletproof GHA YAML syntax & broaden triggers to master branch for immediate real-time execution 2026-05-14 23:18:21 +03:00
ospab 882ef6f337 CI/CD: Fix GHA YAML negation syntax & Introduce -TriggerOnly parameter in build.ps1 2026-05-14 23:10:03 +03:00
ospab c58ca91ed5 CI/CD: Introduce Enterprise GitHub Actions release matrix & enrich local build with FreeBSD 2026-05-14 23:02:39 +03:00