Skip to content

Flutter desktop client + userspace boringtun mesh#7

Merged
Geramy merged 7 commits into
mainfrom
flutter-port-clean
Jun 30, 2026
Merged

Flutter desktop client + userspace boringtun mesh#7
Geramy merged 7 commits into
mainfrom
flutter-port-clean

Conversation

@Nathanial96

Copy link
Copy Markdown
Collaborator

Ports the desktop client to Flutter/Dart and migrates the mesh dataplane to a fully userspace boringtun (Noise + smoltcp netstack) transport — no TUN device, no kernel WireGuard. Replaces the macOS Swift app.

History was curated into 5 logical commits; the final tree is byte-identical to the original client-port-flutter working branch (the experimental / add-then-undo history was dropped).

Commits

  1. Backend: userspace boringtun mesh (SDK + server + crates) — dataplane consolidation onto BoringtunMesh, private-API egress over the mesh socket, joined-endpoint ACL + mesh peers/status auth fixes, and the WireGuard→boringtun rename. The wg_pubkey wire key is kept intentionally (it's inside the Ed25519-signed canonical node form + gossip + client/server API — and a deliberate breadcrumb). Adds the Amazon Linux 2023 build target.
  2. Flutter desktop client (macOS + Windows) — FFI bindings, Riverpod state, passkey login + region-aware DNS discovery, dashboard, P2P mesh card, trust/health/servers/relays/certificates views, lemon theme, settings/session persistence, platform integration.
  3. Remove macOS Swift app — superseded; all screens have Flutter equivalents (only macOS menu-bar/shortcut niceties unported).
  4. CI — self-contained SDK shared lib (bundled OpenSSL, no system deps) + Flutter macOS/Windows analyze/test/build workflows.
  5. Docs — boringtun mesh architecture + Flutter desktop build guide.

Verification

  • Server app + SDK dylib build clean; flutter analyze reports 0 errors.
  • Mesh confirmed end-to-end: private API over the boringtun socket, GET /api/mesh/peers → 200.

Suggested merge

Rebase and merge — lands the 5 logical commits on main linearly.

Consolidate the client and server dataplane onto the userspace boringtun Noise + smoltcp netstack (no TUN device); route the private API over the mesh socket; fix the joined-endpoint ACL and mesh peers/status auth. Rename WireGuard -> boringtun across namespaces, directories, and types (keeping the wg_pubkey wire contract). Adds the Amazon Linux 2023 server build target.
Port the desktop client to Flutter/Dart: FFI bindings to the C SDK, Riverpod state, login (passkey + region-aware DNS discovery), dashboard, P2P mesh card, trust/health/servers/relays/certificates views, lemon theme, settings/session persistence, and macOS/Windows platform integration.
Superseded by the Flutter desktop client; all screens have Flutter equivalents.
Build the self-contained SDK shared library (bundled OpenSSL, no system deps) and the Flutter macOS/Windows clients with analyze + tests; release-pipeline wiring.
Update architecture/security/SDK/ports docs to the userspace boringtun mesh, add Flutter desktop build instructions, and include the mesh-transport worklog.
@Nathanial96 Nathanial96 requested a review from Geramy June 30, 2026 03:44
- LemonadeNexusClient.cpp: guard the POSIX net includes (arpa/inet.h, netdb.h)
  behind _WIN32 and use winsock2/ws2tcpip on Windows, so resolve_ipv4() compiles
  under MSVC. (The dataplane sockets were already winsock-guarded; this was the
  only unguarded POSIX include in the SDK build.)
- flutter-clients.yml: the export-count floor was 69, but the public C API is now
  ~64 ln_* functions after Phase 1 dropped the tunnel/pump exports -> lower to a
  60 sanity floor. Reframe the step as 'self-contained': keep the no-Homebrew /
  no /usr/local linkage guarantee, drop the stale Swift-era naming.
…utter in CI

- Add flutter_lints dev dep + restore the analysis_options include (it was dead -
  flutter_lints was never installed); exclude generated *.g.dart from lint.
- Fix all 66 analyzer WARNINGS: add AppNotifier.currentState accessor (drop protected
  .state access from services/views), remove unused imports/fields/locals/elements/params,
  unreachable switch default.
- dart fix --apply: 82 automated fixes (const constructors, dangling library doc
  comments, win32 deprecated_member_use migration, etc.).
- Hand-fix the residual 5: escape angle brackets in a doc comment + 4
  use_build_context_synchronously (guard with context.mounted across async gaps).
- Pin Flutter to 3.44.4 in both CI jobs (stop the stable-channel drift that flapped analyze).
- Result: flutter analyze 'No issues found!'; flutter test passes (FFI smoke loads the SDK).
@Geramy Geramy merged commit 6bed42e into main Jun 30, 2026
9 checks passed
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.

2 participants