22 Commits
Author SHA1 Message Date
e2ace95369 UI, Linux & docs: volume/network usage, log sort toggle, fontconfig stall recovery, and docs fixes (#1099)
- Volumes & Networks `Used by` column (`#1062`): show container consumer counts, per-state badges, and escaped container-name tooltips on Volumes and Networks across macOS, Windows, and Linux, with `Used by` column sorting on Volumes.
- Window script type-check fixes (`#1033`): pass `String(!on)` to `aria-pressed` in `setRail`, check `Number.isNaN(d.getTime())` in `dgTime`, and sequence `closeMenu()` / `showMenu()` in a block in `[data-smore]`.
- Log sort order toggle (`#1081`): add `Oldest first` (default) / `Newest first` sorting across Container detail Logs, Compose project Logs, and Pod Logs across macOS, Windows, and Linux, preserving live streaming, scroll pinning, search/level filtering, and translations across all 41 locale files.
- Linux `fontconfig` WebKit stall recovery & doctor warning (`#1078`): add a 5-second startup watchdog in `gtk.rs` that detects a `WebKitWebProcess` startup stall with a populated user `~/.cache/fontconfig`, logs the cause to `ui.log`, records a cache fingerprint bypass stamp, and re-launches cleanly with `XDG_CACHE_HOME=~/.kiri/cache/ui`, restoring user `XDG_CACHE_HOME` for spawned terminals and surfacing an actionable `fc-cache -rf` warning in `kiri doctor`.
- Docs & fix registry (`#1080`): fix the relative link to `testing-windows-arm.md` in `docs/development.md` and record recent unreleased bug fixes in `docs/fix-registry.md`.

Fixes #1081
Fixes #1078
Closes #1062
Closes #1033
Closes #1080

Co-authored-by: shihh <shihao1016@qq.com>
Co-authored-by: AnuchitO <3372362+AnuchitO@users.noreply.github.com>
Co-authored-by: Bryan Lundberg <119996547+bryanlundberg@users.noreply.github.com>
2026-12-01 11:38:12 +01:00
Precious Okwu 66f0c41ef0 Setup: Kiri's compose and buildx no longer replace other engines' plugins (#1054)
kiri setup on macOS no longer adds Kiri's plugin folder to cliPluginsExtraDirs in ~/.docker/config.json, which put Kiri's docker-compose and docker-buildx ahead of other engines' plugins for every Docker context.

Setup now removes Kiri's entry from an earlier setup and links each plugin into ~/.docker/cli-plugins only when the Docker CLI would find none. A plugin that is someone else's is kept and named in one line. A Kiri link that hides a plugin installed later is removed. kiri setup --uninstall removes the links that point into Kiri.

Fixes #1042
2026-11-30 05:34:28 +01:00
Precious Okwu b66d3e3ad9 Kiri Forge: Kiri's own build engine, on by default (#1039) 2026-11-29 20:51:21 +01:00
Precious Okwu 67808ef8b0 Harden image diff_ids, mounts/volumes, caller/WSL gates, networking/DNS, AppArmor, Kubernetes, UI, and updaters (#1013)
* security: harden mount/volume confinement, WSL roots, caller gates, labels & domain routing

* net: isolate --internal bridges/DNS, support gateway_mode_ipv4 & host_binding_ipv4

- GHSA-gp5c-4g58-vr24 & #1010: enforce nftables isolation for --internal
  bridges across prerouting (early accept before HOST_ADDR/WSL_HOST_ADDR/
  EGRESS_ROUTES redirects), forward (iifname/oifname cross-bridge drops in
  both ip and ip6 tables even when non-internal subnets are empty), input
  (allow only bridge gw4 or NDP+gw6 on plain internal bridges; drop all
  on gateway_mode_ipv4=isolated / inhibit_ipv4=true), and postrouting
  (never masquerade internal subnets; disable IPv6 on IPv4-only internal
  bridges).
- GHSA-7x2g-c7pw-mpc6: refuse external UDP and TCP DNS forwarding on
  internal-only containers before custom --dns and AAAA handling, track
  all container bridges including kiri0 across spawn/NetAttach/NetDetach
  with vacuous internal_only when disconnected from all networks, and
  bind per-bridge UDP and TCP gateway DNS listeners with SO_BINDTODEVICE
  when bridge != kiri0.
- GHSA-vmx6-3c4p-cjr2 (#985): honor com.docker.network.bridge.host_binding_ipv4
  for TCP and UDP published ports with empty HostIp while keeping empty
  value as unset, validating Ipv4Addr at network create and use, and
  preserving #1011 names_sync lock ordering around container start gate.
- #1000: honor com.docker.network.bridge.enable_icc=false via IFLA_BRPORT_ISOLATED.
- #1008: support KIRI_HOST_LOOPBACK=off to block host loopback via host.docker.internal.
- #992: refuse 'default' network name and network/broadcast IPAM gateway or
  auxiliary addresses for prefix < 31 without /31 or /32 shift overflow.

* Verify image rootfs.diff_ids, pin managed BuildKit, and bound rmtree FDs

* security: fix AppArmor profile, WebView URL/CSP/i18n, k3s kubeconfig/pinning, elevation TOCTOU & MSI verification, and diag redaction

- GHSA-xx5v-42pc-2x72: enforce Linux AppArmor kiri-default profile with
  PROC_SUPER_MAGIC verification on /proc/thread-self/attr/apparmor/{exec,current}
  and Host::Absent no-op on SELinux/VM/WSL2 hosts.
- GHSA-hmxq-c9pq-2fm2: add strict weburl allowlist (preserving all 13 exact
  URLs and non-empty docs.docker.com/go/ subpath check), localUrl plainHost
  validation (preserving rports running/serving guard), strict WebView CSP and
  navigation blocking on macOS/Linux/Windows, typed numeric coercions in
  hubrows/sharing, and strict i18n tag+attribute parity enforcement.
- GHSA-9mjv-25f8-p9p9: replace raw k3s kubeconfig line pass-through with a
  strict line-by-line allowlist parser rejecting exec/auth-provider/file-path
  credentials and YAML anchors/flow collections, and pin default
  rancher/k3s:v1.37.1-k3s1 multi-arch index and per-arch config digests.
- GHSA-vc32-9whf-m39j / GHSA-wjfx-gjxf-6h52 / GHSA-hx2c-xfr4-jqm2: fix
  AppleScript backslash-before-quote escaping in setup::as_admin, eliminate
  all TMPDIR staging before root elevation in setup.rs and usb/helper.rs
  (verifying SHA-256 on {bin}.new as root before codesign and atomic mv), and
  enforce private staging + SHA-256 + WinVerifyTrust Authenticode / optional
  Ed25519 signature verification in kiri-win/update.rs and kiri.ps1.
- #994: redact truncated secret JSON string values at end-of-input in
  kiri diag.

* Keep rmtree deep-readonly test setup at O(1) open FDs and parse URL host in domain-label test
2026-11-28 14:12:38 +01:00
Precious Okwu f04583af8e Engine & CLI: restore missing unpacked layers, fix macOS k8s idle CPU (#989), and add kiri engine (#983) (#996)
* Start: evict stale VmLink::layers cache and re-send missing unpacked layers

* Engine & CLI: fix macOS k8s idle CPU (#989) and add kiri engine commands (#983)
2026-11-27 08:23:21 +01:00
Karthik P 0e05258455 Engine: docker container prune and system prune keep stopped machines (#975)
A `kiri machine` keeps its work in its container's writable layer, so a
routine `docker system prune` with the machine stopped deleted it and
everything in it. container_prune now leaves containers labelled
dev.kiri.machine out, as OrbStack's prunes leave its machines alone;
`kiri machine delete` and `docker rm machine-NAME` still remove one.
The window's prune goes through the same endpoint.

Unit test in daemon/ops.rs, e2e check machine-prune-keeps, listed in
tests/regressions.tsv; docs/features.md says prunes keep machines.
2026-11-26 14:00:17 +01:00
700badcf85 Guest kernel: enable NFSv3/v4 client for type=nfs volumes and dm-crypt/LUKS (#494) (#961)
Co-authored-by: meutex <meutex@users.noreply.github.com>
Co-authored-by: Marcin Uliasz <marcin.uliasz@hotmail.com>
2026-11-25 19:53:30 +01:00
Precious OkwuandMasih Moloodian ca443cb582 VM: swap on the data disk, 1 GiB by default, set in Settings -> Resources (#326) (#958)
Co-authored-by: Masih Moloodian <masihmoloodian@gmail.com>
2026-11-25 19:14:20 +01:00
Precious OkwuandBrad Hallett 2232b037f6 TLS: trust the host operating system's CA certificate store (#303) (#894)
Co-authored-by: Brad Hallett <53977268+bradhallett@users.noreply.github.com>
2026-11-24 16:21:03 +01:00
Precious Okwu 68b1e93be4 Settings: add launch at login and stop engine on quit (#368) (#827) 2026-11-24 02:49:51 +01:00
818196f7b2 UI: add Linux StatusNotifierItem tray and option to free WebView memory on close (#405, #168) (#826)
Co-authored-by: Kotenkuu <hieu356xz@gmail.com>
Co-authored-by: Urdemonlord <hasrinata@gmail.com>
2026-11-24 02:28:11 +01:00
Precious Okwu a13f382931 Windows: add opt-in WSL 2 distro socket and bind-mount integration (#269) (#825) 2026-11-24 02:11:09 +01:00
Precious OkwuandShuvro Roy 96dded8233 Mac: support configuring and growing the VM data disk online (#384) (#824)
Co-authored-by: Shuvro Roy <shuvro.nsu.cse@gmail.com>
2026-11-24 01:50:23 +01:00
Precious OkwuandChukwuebuka f1225b517d CLI: add kiri scan <image> vulnerability scanner subcommand (#472) (#818)
Co-authored-by: Chukwuebuka (Gaus Octavio) <56232734+Chukwuebuka-2003@users.noreply.github.com>
2026-11-24 00:46:34 +01:00
Precious OkwuandAlex Alvord 1b554366d3 Docs: list healthchecks, Compose build/wait/conditions, bind volumes, and two build notes (#361)
Co-authored-by: Alex Alvord <325058966+cloudlabworks@users.noreply.github.com>
2026-11-23 17:03:46 +01:00
Kitsune2077 4172e6a535 Images: registry mirrors for Docker Hub, in Settings and the CLI (#119)
## What this changes and why

Fixes #118.

Docker Hub pulls try the configured mirrors first, in order, then Docker Hub itself. The image keeps the name it was asked for (`docker images` still shows `alpine:latest`), a mirror is asked — and its layers fetched — with no credentials so a Hub sign-in never leaves for a third party, and a mirror that has no image or does not answer says why in the pull output and falls back. Other registries are pulled directly, and pushes never go through a mirror. That is Docker's `registry-mirrors` semantic: the list is Hub-only.

- `~/.kiri/registry-mirrors.json` (`GET`/`POST /kiri/registry-mirrors`), the daemon's, so macOS, Windows and Linux share one implementation.
- Settings → Registry mirrors: add, remove, save, on all three systems.
- `kiri registry-mirror list | add ADDRESS | remove ADDRESS`; on Windows `kiri.exe` forwards it into WSL.
- `docker build`: the mirrors are merged into the generated `buildkitd.toml` after Kiri's own build mirror, and an idle builder is stopped so the next build reads the new file.
- First run survives a blocked Hub: the setup wizard's test container is best-effort, and the ready screen points at Settings → Registry mirrors if it could not run.

No new dependencies and no background process. The field's example is a neutral `https://mirror.example.com`, and the words are in all language files.

## How you tested it

```text
$ cargo test -p kiri-image          # in the fork's GitHub Actions, run 42787435140
$ cargo test -p kiri registry_mirrors
$ cargo test -p kiri --no-run
all passing

$ python3 scripts/i18n-check.py
PASS 1631 keys, 15 language file(s), 0 problem(s)

$ python3 scripts/ui-test.py
PASS, including tests/ui/mirrors.js and the macOS/Windows/Linux parity pass
```

On Windows 10 22H2 (19045), x86-64: built the MSI from this branch through the fork's CI, installed it, added a mirror in Settings; `docker pull alpine` went through it and kept the name, `kiri registry-mirror list` showed it, and `docker build` with `FROM alpine` used it.

`cargo fmt` and `cargo clippy` were not run: this machine has no Rust toolchain, so the Rust tests run in GitHub Actions. The daemon, image client and page are shared code, but I only ran Kiri on Windows; the page tests cover the macOS and Linux layouts.

Tested on: Windows 10 22H2, x86-64

## How you found it

- [x] I use Kiri and ran into this myself
- [ ] I found it by reading the code or comparing with Docker
- [ ] Someone else reported it (link the issue above)

AI tools used to write this change: yes — the Rust, page and test code was drafted with ZCode (an AI coding assistant) and reviewed and tested by the author.

## Checklist

- [x] I have at most 3 pull requests open on Kiri, this one included
- [ ] `cargo fmt`, `cargo clippy` and the tests pass — tests pass in CI; fmt and clippy were not available here
- [ ] It works on macOS, Windows and Linux, or the change only touches one of them — shared code, Windows tested on a real machine, page parity covers the other two

Co-authored-by: MY Li <lmy3520@live.com>
2026-11-22 17:10:20 +01:00
Precious Okwu 9e981f75bf CLI: kiri domains shows, sets and resets the domain routers' ports (#626) 2026-11-20 15:43:42 +01:00
Precious Okwu 1acf6c99ef Networks: a container can leave its first network, as with Docker (#418) (#584) 2026-11-19 17:00:34 +01:00
Precious Okwu 23226f8254 USB: a device that drops off the Mac's bus is attached again when it comes back (#212) 2026-11-14 12:42:31 +01:00
Precious Okwu a705eb16a6 Docs: Linux engine start, the docker.sock link and IPv6 networks (#87) 2026-11-09 04:45:50 +01:00
Precious Okwu 2af64d8868 Builds: amd64 steps run through Rosetta on Apple silicon, not QEMU (#70) 2026-11-08 12:43:31 +01:00
Precious Okwu 15c6bd7a48 Kiri 0.1.14 2026-11-02 18:32:31 +01:00