A Mac could install PF rules and advertise itself while IPv4 forwarding was still off. Check and enable forwarding when applying the offer and refresh the physical route when the uplink changes. Try the agent's existing privileges first. When an existing utun needs additional permission, the foreground tray or CLI can obtain an administrator grant scoped to the local UID and overlay subnet. Reconcile the current offer after the dialog so a withdrawal during authorization stays effective. A user agent denied a host utun can serve peers over bounded TCP, UDP and ICMP echo sockets bound to the physical interface. Keep host routes and ordinary local application traffic on the system-utun path. Preserve the saved choice for intentionally off-host setups and report readiness separately. Report exit selection directly to the selected peer over its authenticated session. Older peers appear for one minute following forwarded traffic. The optional announcement trailer remains compatible with control v8. Local IPC v29 carries the new status and authorization results. Keep the exit user count, left-aligned names and one-row scroll controls in a single fixed-height block alongside the network details. Show health and a small traffic trace on folded cards. Open desktop Devices at a usable width and keep the exit action clickable in its compact layout. Replace Android's per-card exit buttons with a fixed thumb-sized control. The chooser and Quick Settings share one list with a single local option, network groups, measured latency and an accessible confirmation sheet. Release the applications and packages as 1.0.9. On macOS, checked formatting, strict workspace Clippy and the workspace all-target test suite, including real encrypted agents and loopback TCP, UDP and ICMP. Ran the opt-in user-mode exit UDP round trip on a physical IPv4 interface. Verified the authorization scripts and syntax of their PF, sudoers and AppleScript components. The privileged two-utun kernel test is reserved for an isolated macOS runner. Rendered phone and desktop layouts in both themes, built the arm64 Android debug APK and cross- checked all workspace targets for Windows GNU.
100 lines
2.2 KiB
Nix
100 lines
2.2 KiB
Nix
{
|
|
withTray ? true,
|
|
lib,
|
|
rustPlatform,
|
|
pkg-config,
|
|
copyDesktopItems,
|
|
wrapGAppsHook3,
|
|
gtk3,
|
|
libayatana-appindicator,
|
|
libglvnd,
|
|
libxkbcommon,
|
|
vulkan-loader,
|
|
wayland,
|
|
libx11,
|
|
libxcursor,
|
|
libxi,
|
|
libxrandr,
|
|
}:
|
|
|
|
let
|
|
# The tray is an egui app that loads graphics, windowing and appindicator
|
|
# libraries at run time, so they have to be put on its library path by hand.
|
|
trayRuntimeLibs = [
|
|
libayatana-appindicator
|
|
libglvnd
|
|
libxkbcommon
|
|
vulkan-loader
|
|
wayland
|
|
libx11
|
|
libxcursor
|
|
libxi
|
|
libxrandr
|
|
];
|
|
in
|
|
rustPlatform.buildRustPackage {
|
|
pname = if withTray then "tsunagi" else "tsunagi-cli";
|
|
version = "1.0.9";
|
|
|
|
src = lib.cleanSource ../.;
|
|
cargoLock.lockFile = ../Cargo.lock;
|
|
|
|
cargoBuildFlags = [
|
|
"--bin"
|
|
"tsng"
|
|
]
|
|
++ lib.optionals withTray [
|
|
"--bin"
|
|
"tsunagi-tray"
|
|
];
|
|
|
|
# The suite opens real sockets and interfaces; it runs in CI instead.
|
|
doCheck = false;
|
|
|
|
nativeBuildInputs = [
|
|
pkg-config
|
|
]
|
|
++ lib.optionals withTray [
|
|
copyDesktopItems
|
|
wrapGAppsHook3
|
|
];
|
|
buildInputs = lib.optionals withTray [
|
|
gtk3
|
|
libayatana-appindicator
|
|
];
|
|
|
|
dontWrapGApps = true;
|
|
|
|
# The development shell runs unwrapped Cargo binaries and needs the same
|
|
# dynamically loaded libraries as the installed tray wrapper.
|
|
passthru = { inherit trayRuntimeLibs; };
|
|
|
|
postInstall = ''
|
|
install -Dm644 dist/linux/50-tsunagi-resolved.rules \
|
|
"$out/share/doc/tsunagi/50-tsunagi-resolved.rules"
|
|
''
|
|
+ lib.optionalString withTray ''
|
|
install -Dm644 dist/linux/tsunagi.svg \
|
|
"$out/share/icons/hicolor/scalable/apps/tsunagi.svg"
|
|
install -Dm644 dist/linux/tsunagi-tray.desktop \
|
|
"$out/share/applications/tsunagi-tray.desktop"
|
|
'';
|
|
|
|
postFixup = lib.optionalString withTray ''
|
|
wrapProgram "$out/bin/tsunagi-tray" \
|
|
"''${gappsWrapperArgs[@]}" \
|
|
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath trayRuntimeLibs}:/run/opengl-driver/lib
|
|
'';
|
|
|
|
meta = {
|
|
description = "Serverless mesh VPN: join a network with a name and a secret";
|
|
homepage = "https://github.com/house-of-vanity/tsunagi";
|
|
license = lib.licenses.wtfpl;
|
|
mainProgram = "tsng";
|
|
platforms = [
|
|
"x86_64-linux"
|
|
"aarch64-linux"
|
|
];
|
|
};
|
|
}
|