dev-updater serves APKs to a phone and ai-app runs model sessions for one. Above the waterline they share nothing. Underneath they are the same program: bound to wg0 so they are not on the LAN, presenting a certificate from a CA the app pins, answering only requests carrying a token enrolled by scanning a QR off the terminal, keeping state in owner-only files outside the repo. Three modules, each extracted only after diffing the two copies and finding nothing between them but a product name and a type parameter. netif fails closed when the tunnel is down. enroll generates, stores and compares the token, and prints the QR, with the URI scheme as the one per-project part. private owns the file modes, taken from ai-app's version because it had already factored out what dev-updater still has inline in two places. Nothing is removed from either project. This is a proposal with a working core, and the README carries the measured evidence -- the enrollment scanner activity differs by its package line and nothing else, the RON format module is byte-identical, and the two copies have each drifted into holding an improvement the other lacks, which is the cost being paid today.
328 lines
8.3 KiB
TOML
328 lines
8.3 KiB
TOML
# This file is automatically @generated by Cargo.
|
|
# It is not intended for manual editing.
|
|
version = 4
|
|
|
|
[[package]]
|
|
name = "anyhow"
|
|
version = "1.0.104"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "330a5ed07fa54e4702c9d6c4174f74427fc0ef6e214bbd677ae50a5099946470"
|
|
|
|
[[package]]
|
|
name = "base64"
|
|
version = "0.23.1"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "ac07cdecf99051d9a5238b80f35af32cdeba5b336e55d957b318b50137e18da5"
|
|
|
|
[[package]]
|
|
name = "bitflags"
|
|
version = "2.13.1"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "b588b76d00fde79687d7646a9b5bdf3cc0f655e0bbd080335a95d7e96f3587da"
|
|
|
|
[[package]]
|
|
name = "block-buffer"
|
|
version = "0.12.1"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "d2f6c7dbe95a6ed67ad9f18e57daf93a2f034c524b99fd2b76d18fdfeb6660aa"
|
|
dependencies = [
|
|
"hybrid-array",
|
|
]
|
|
|
|
[[package]]
|
|
name = "cfg-if"
|
|
version = "1.0.4"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"
|
|
|
|
[[package]]
|
|
name = "chacha20"
|
|
version = "0.10.2"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "65c35e4b699c7e15ccbe7ee35c005e4fc0a278d22238a2857e6ce2dadeda1b06"
|
|
dependencies = [
|
|
"cfg-if",
|
|
"cpufeatures",
|
|
"rand_core",
|
|
]
|
|
|
|
[[package]]
|
|
name = "const-oid"
|
|
version = "0.10.2"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "a6ef517f0926dd24a1582492c791b6a4818a4d94e789a334894aa15b0d12f55c"
|
|
|
|
[[package]]
|
|
name = "cpufeatures"
|
|
version = "0.3.1"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "5ca28b0ae3115b884660db4118d803791fd6756b6e88f39c0f3f7859060d7566"
|
|
dependencies = [
|
|
"libc",
|
|
]
|
|
|
|
[[package]]
|
|
name = "crypto-common"
|
|
version = "0.2.2"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "ce6e4c961d6cd6c9a86db418387425e8bdeaf05b3c8bc1411e6dca4c252f1453"
|
|
dependencies = [
|
|
"hybrid-array",
|
|
]
|
|
|
|
[[package]]
|
|
name = "digest"
|
|
version = "0.11.3"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "f1dd6dbb5841937940781866fa1281a1ff7bd3bf827091440879f9994983d5c2"
|
|
dependencies = [
|
|
"block-buffer",
|
|
"const-oid",
|
|
"crypto-common",
|
|
]
|
|
|
|
[[package]]
|
|
name = "errno"
|
|
version = "0.3.14"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb"
|
|
dependencies = [
|
|
"libc",
|
|
"windows-sys",
|
|
]
|
|
|
|
[[package]]
|
|
name = "fastrand"
|
|
version = "2.5.0"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "da7c62ceae207dd37ea5b845da6a0696c799f85e97da1ab5b7910be3c1c80223"
|
|
|
|
[[package]]
|
|
name = "getrandom"
|
|
version = "0.4.3"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "300e883d756b2e4ec94e02791f39b04b522276138852cfc41d9fb7e904106099"
|
|
dependencies = [
|
|
"cfg-if",
|
|
"libc",
|
|
"r-efi",
|
|
"rand_core",
|
|
]
|
|
|
|
[[package]]
|
|
name = "hybrid-array"
|
|
version = "0.4.14"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "707114b52a152fa7bdb290cd7cd5912d9467273b6d74e21b8d81aca1f8533f6b"
|
|
dependencies = [
|
|
"typenum",
|
|
]
|
|
|
|
[[package]]
|
|
name = "if-addrs"
|
|
version = "0.15.0"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "c0a05c691e1fae256cf7013d99dad472dc52d5543322761f83ec8d47eab40d2b"
|
|
dependencies = [
|
|
"libc",
|
|
"windows-sys",
|
|
]
|
|
|
|
[[package]]
|
|
name = "libc"
|
|
version = "0.2.189"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "3eaf3ede3fee6db1a4c2ee091bf8a8b4dccdc6d17f656fb07896ee72867612f2"
|
|
|
|
[[package]]
|
|
name = "linux-raw-sys"
|
|
version = "0.12.1"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53"
|
|
|
|
[[package]]
|
|
name = "once_cell"
|
|
version = "1.21.4"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"
|
|
|
|
[[package]]
|
|
name = "pin-project-lite"
|
|
version = "0.2.17"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd"
|
|
|
|
[[package]]
|
|
name = "proc-macro2"
|
|
version = "1.0.107"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9"
|
|
dependencies = [
|
|
"unicode-ident",
|
|
]
|
|
|
|
[[package]]
|
|
name = "qrcode"
|
|
version = "0.14.1"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "d68782463e408eb1e668cf6152704bd856c78c5b6417adaee3203d8f4c1fc9ec"
|
|
|
|
[[package]]
|
|
name = "quote"
|
|
version = "1.0.47"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001"
|
|
dependencies = [
|
|
"proc-macro2",
|
|
]
|
|
|
|
[[package]]
|
|
name = "r-efi"
|
|
version = "6.0.0"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf"
|
|
|
|
[[package]]
|
|
name = "rand"
|
|
version = "0.10.2"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "c7f5fa3a058cd35567ef9bfa5e75732bee0f9e4c55fa90477bef2dfcdbc4be80"
|
|
dependencies = [
|
|
"chacha20",
|
|
"getrandom",
|
|
"rand_core",
|
|
]
|
|
|
|
[[package]]
|
|
name = "rand_core"
|
|
version = "0.10.1"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "63b8176103e19a2643978565ca18b50549f6101881c443590420e4dc998a3c69"
|
|
|
|
[[package]]
|
|
name = "rustix"
|
|
version = "1.1.4"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "b6fe4565b9518b83ef4f91bb47ce29620ca828bd32cb7e408f0062e9930ba190"
|
|
dependencies = [
|
|
"bitflags",
|
|
"errno",
|
|
"libc",
|
|
"linux-raw-sys",
|
|
"windows-sys",
|
|
]
|
|
|
|
[[package]]
|
|
name = "sha2"
|
|
version = "0.11.0"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "446ba717509524cb3f22f17ecc096f10f4822d76ab5c0b9822c5f9c284e825f4"
|
|
dependencies = [
|
|
"cfg-if",
|
|
"cpufeatures",
|
|
"digest",
|
|
]
|
|
|
|
[[package]]
|
|
name = "subtle"
|
|
version = "2.6.1"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292"
|
|
|
|
[[package]]
|
|
name = "syn"
|
|
version = "2.0.119"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "872831b642d1a07999a962a351ed35b955ea2cfc8f3862091e2a240a84f17297"
|
|
dependencies = [
|
|
"proc-macro2",
|
|
"quote",
|
|
"unicode-ident",
|
|
]
|
|
|
|
[[package]]
|
|
name = "tempfile"
|
|
version = "3.27.0"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd"
|
|
dependencies = [
|
|
"fastrand",
|
|
"getrandom",
|
|
"once_cell",
|
|
"rustix",
|
|
"windows-sys",
|
|
]
|
|
|
|
[[package]]
|
|
name = "tracing"
|
|
version = "0.1.44"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100"
|
|
dependencies = [
|
|
"pin-project-lite",
|
|
"tracing-attributes",
|
|
"tracing-core",
|
|
]
|
|
|
|
[[package]]
|
|
name = "tracing-attributes"
|
|
version = "0.1.31"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da"
|
|
dependencies = [
|
|
"proc-macro2",
|
|
"quote",
|
|
"syn",
|
|
]
|
|
|
|
[[package]]
|
|
name = "tracing-core"
|
|
version = "0.1.36"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a"
|
|
dependencies = [
|
|
"once_cell",
|
|
]
|
|
|
|
[[package]]
|
|
name = "typenum"
|
|
version = "1.20.1"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "b6f5e870be6c3b371b77fe0ee0bafb859fa4964b4404c27de1d380043c4dda20"
|
|
|
|
[[package]]
|
|
name = "unicode-ident"
|
|
version = "1.0.24"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"
|
|
|
|
[[package]]
|
|
name = "wg-link"
|
|
version = "0.1.0"
|
|
dependencies = [
|
|
"anyhow",
|
|
"base64",
|
|
"if-addrs",
|
|
"qrcode",
|
|
"rand",
|
|
"sha2",
|
|
"subtle",
|
|
"tempfile",
|
|
"tracing",
|
|
]
|
|
|
|
[[package]]
|
|
name = "windows-link"
|
|
version = "0.2.1"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"
|
|
|
|
[[package]]
|
|
name = "windows-sys"
|
|
version = "0.61.2"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc"
|
|
dependencies = [
|
|
"windows-link",
|
|
]
|