Commit graph

1 commit

Author SHA1 Message Date
trvon
94c8a8f9f1
Privacy: host-namespace tracker relay + install/units/docs (WS2b/WS2c)
Some checks failed
Build and Test / build (debug, clang) (push) Has been cancelled
Build and Test / build (debug, gcc) (push) Has been cancelled
Build and Test / build (release, clang) (push) Has been cancelled
Build and Test / build (release, gcc) (push) Has been cancelled
Build and Test / macos (push) Has been cancelled
Build and Test / docker (push) Has been cancelled
Second half of the sandbox-safe tracker transport. A small relay in the host
network namespace bridges OpenSnitch to the sandboxed daemon, so the daemon keeps
PrivateNetwork=true + RestrictAddressFamilies=AF_UNIX and never sees argv/env.

- `strawberry opensnitch relay` (new CLI verb, Map::flag -> --opensnitch-relay):
  binds the OpenSnitch loopback port via the existing OpenSnitchEventListener
  (root-peer check, argv/env dropped at parse), and forwards each redacted tuple
  (encode_connection) to the daemon's AF_UNIX ingest socket, reconnecting on
  failure. Foreground loop until SIGTERM/SIGINT; drops (not blocks) when the
  socket is down. Linux-only. The listener callback runs on one thread, so the
  sink needs no lock.
- scripts/strawberry-trackerd.service: runs the relay in the host namespace with
  only CAP_NET_BIND_SERVICE, no PrivateNetwork, and /proc/net kept readable for
  the peer check (no ProcSubset=pid); otherwise the same tight sandbox as
  strawberry-update.service. install.sh installs+manifests+starts it when
  OpenSnitch is present and privacy_trackers is not false.
- docs/tracker-attribution.md: replace the "known limitation" with the relay
  architecture (rejected alternatives noted). API_CONTRACT: privacy.listener now
  describes the ingest socket + relay; also documents feed-add max_severity (B1).

Suite 51/51; clang static analyzer and clang-tidy clean on main.cpp and
cli_commands.cpp. Full relay->OpenSnitch end-to-end needs host validation
(sudo + a real OpenSnitch); the socket path is covered by E9.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-10-28 17:56:23 -06:00