Skip to content

bearnet: make it LIVE on Linux + Windows (shared stager + windows netmon) - #96

Merged
mdheller merged 1 commit into
mainfrom
bearnet-live-linux-windows
Jul 28, 2026
Merged

bearnet: make it LIVE on Linux + Windows (shared stager + windows netmon)#96
mdheller merged 1 commit into
mainfrom
bearnet-live-linux-windows

Conversation

@mdheller

Copy link
Copy Markdown
Contributor

Extends the macOS paper-tiger fix to all three platforms.

  • scripts/stage-bearnet.sh — one cross-platform stager (pages loose at <GreD>/browser/bearstart/, sidecar/bridge/policy/geoip at <GreD>/*) so the autoconfig's resource://bearstart/ substitution + Subprocess launcher find everything on every OS. macOS packager refactored onto it (DRY).
  • netmon.rs — Windows connection enumerator (netstat -no + tasklist for PID→name) behind #[cfg(windows)]; unix keeps lsof.
  • autoconfig — launcher tries bearbrowser-capture-sidecar-bin and .exe.
  • nightly-linux — build the sidecar natively → stage → re-tar dist/bearbrowser.
  • build-windows-cross — cross-compile the sidecar to x86_64-pc-windows-gnu (mingw; deps are all clean cross-platform, no MSVC-only C deps) → stage into dist/firefox → re-zip.

Verification: macOS remains screenshot-verified live. Linux (native sidecar) is high-confidence. Windows cross-compile couldn't be checked from the macOS host (mingw linker) — the Linux CI nightly is the real test. Both nightlies triggered.

Extends the paper-tiger fix to all three platforms via a shared stager:
- scripts/stage-bearnet.sh: one cross-platform stager — pages loose at
  <GreD>/browser/bearstart/, sidecar/bridge/policy/geoip at <GreD>/*, so the
  autoconfig's resource://bearstart/ substitution + Subprocess launcher find
  everything. macOS packager refactored onto it (DRY).
- netmon.rs: Windows connection enumerator (netstat -no + tasklist for PID→name)
  behind #[cfg(windows)]; unix keeps lsof. No lsof on Windows.
- autoconfig: launcher tries both bearbrowser-capture-sidecar-bin and .exe.
- nightly-linux: build the sidecar natively → stage → RE-TAR dist/bearbrowser
  (mach's tarball predates staging).
- build-windows-cross: cross-compile the sidecar to x86_64-pc-windows-gnu (mingw
  — far simpler than MSVC cross-linking; deps are all clean cross-platform, no
  MSVC-only C deps) → stage into dist/firefox → re-zip the portable archive.

Host sidecar still builds; windows #[cfg] path compiles for the target on Linux
CI (macOS host can't cross-link mingw — verified deps are windows-clean instead).
macOS remains screenshot-verified; Linux/Windows confirmed by the nightlies.
@mdheller
mdheller merged commit d252f65 into main Jul 28, 2026
@mdheller
mdheller deleted the bearnet-live-linux-windows branch July 28, 2026 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant