Doki v0.9.2
Doki v0.9.2 — DNS Overhaul, LD_PRELOAD Fix, Android Native Support, 12 Isolation Levels
Breaking Changes
- DNS default port on Android: Changed from
:53to127.0.0.11:8053— port 53 is blocked on non-rooted Android. SetDOKI_DNS_LISTENto override.
What's New
12 Isolation Levels
- New runner registry with auto-selection from 12 modes: WASM, pKVM/Microdroid, MicroVM, Sysbox, Namespaces, gVisor, FEX-Emu, QEMU User, Proot, Legacy32, Chroot, and Native
- Each mode has a specific use case: WASM for untrusted sandboxes, pKVM for Android protected VMs, FEX/QEMU for cross-architecture emulation, Sysbox for Docker-in-Docker, gVisor for defense-in-depth, Legacy32 for ARMv7 compat, Chroot for lightweight isolation
doki run --runtime <mode>for explicit selection; auto-detection picks the best available
Android Native Mode
- Android detection via
/system/bin/andro.build.version.release— proot is forced automatically LD_PRELOADandLD_LIBRARY_PATHstripped from proot environment viacommon.StripHostEnv()— fixes Termux'slibtermux-exec-ld-preload.sohookingexecveand breaking proot's ptrace- Android DNS auto-discovery via
getprop net.dns1throughnet.dns4 - proot forced when available (
detectMode()), with--link2symlinkfor better compat - 16KB page size alignment for Android 15+ (
-Wl,-z,max-page-size=16384)
DNS System Rewrite (18 Bugs Fixed)
- Port stripping:
ParseResolvConfnow stores clean IPs (no port);NameserverList()appends:53for dialling;GenerateResolvConfstrips port withnet.SplitHostPort() - DNS registration in SetupNetwork: creates endpoint + registers DNS if missing (no prior
Connect()call needed) - DNS recovery on restart:
recoverContainerscallsnetMgr.ReRegisterDNS(st.ID)for each recovered container - Dynamic DNS Well-Known Address: generated per-container instead of hardcoded
- Default port 8053 on Android: set via
init()incmd/dokid/main.go - iptables DNAT for root mode: redirects DNS traffic on privileged setups
- AAAA + PTR local resolution: handles IPv6 and reverse DNS locally
- ndots:0:
GenerateResolvConfaddsoptions ndots:0by default - TCP retry upstream: DNS queries that fail over UDP are retried over TCP
- No busy-wait polling: fixed
resolv.confwatching to use inotify instead
Cross-Platform Releases
- Makefile rewritten: all targets output to
releases/(notbin/) - Supported platforms:
android-arm64,android-armv7,linux-arm64,linux-armv7,darwin-arm64 - SHA256 checksums generated for all binaries
make releasebuilds everything + checksums in one command
Other
- Dead parameter removed:
NewServer()no longer accepts unused*network.DNSServervariadic - Readme updated with v0.9.2 changelog and
DOKI_DNS_LISTENenv var documentation .golangci.ymllinting configuration added
Installation
Download the appropriate binary for your platform from the release assets, or build from source:
git clone https://github.com/OpceanAI/Doki
cd Doki
make release