A slow first download could make the rate search settle around 60 Mbit/s on a much faster link. A final faster train could also exhaust the byte budget before its feedback reached the sender. Reprobe above the first apparent limit and use unique payload actually delivered over sustained sender and receiver intervals. Count each submitted packet even when the tunnel is backpressured, and keep the unused part of the pacing batch available. The five-second deadline, metered limits and v1 wire format remain compatible with existing peers. Show achieved Mbit/s in the devices list and describe a lower bound in the tooltip. Reserve a font-measured TX/RX width independent of changing byte counts on narrow desktop windows and landscape Android. Support counters through exabytes and retain exact packet counts. Align the application, Android and Nix versions for 1.0.7. On a shaped 300/250 Mbit/s path with a cold download, the regression measured 295/247 Mbit/s after the fix and 59/244 on 1.0.6. The suite also covers trailing feedback, local tunnel pressure and compact layouts at multiple font sizes and display densities. Mixed 1.0.6/1.0.7 speed sessions completed in both roles. Two unmetered runs over real WireGuard on loopback measured 251 and 250 Mbit/s down and completed both directions in 3.0 and 3.1 seconds. On macOS arm64, workspace formatting and strict Clippy passed, and the locked all-targets suite passed 646 tests with six opt-in tests ignored. Cargo also reported the existing directories manifest warning. The GNU Windows workspace cross-check and Android arm64 debug APK build passed.
122 lines
5.0 KiB
TOML
122 lines
5.0 KiB
TOML
[package]
|
|
name = "tsunagi-core"
|
|
version = "1.0.7"
|
|
description = "Small private mesh networks: persistent agent identity, deterministic network spaces, an iroh control plane, signed state and a local DNS view."
|
|
readme = "../../README.md"
|
|
keywords = ["mesh", "p2p", "iroh", "networking"]
|
|
categories = ["network-programming"]
|
|
edition.workspace = true
|
|
rust-version.workspace = true
|
|
license.workspace = true
|
|
repository.workspace = true
|
|
|
|
[lib]
|
|
name = "tsunagi"
|
|
|
|
[features]
|
|
default = []
|
|
# A real TUN device, so a plugin can carry actual IP traffic. On Linux it
|
|
# needs CAP_NET_ADMIN; on Windows the process must run elevated and
|
|
# `wintun.dll` must be reachable. Without either the in-memory device serves
|
|
# tests. The platform-specific dependencies are declared per target, so
|
|
# enabling this only pulls what the target it is built for actually uses.
|
|
tun-device = [
|
|
"dep:tun",
|
|
"dep:rtnetlink",
|
|
"dep:caps",
|
|
"dep:futures-util",
|
|
]
|
|
# Telling the operating system where to send its DNS questions. systemd-resolved
|
|
# on Linux, the Name Resolution Policy Table on Windows; the zone and the
|
|
# server work without it either way.
|
|
dns-publish = ["dep:zbus"]
|
|
# The test harness in `testing`, for this crate's own tests and for a
|
|
# protocol crate's. Not on by default: it is only of use to a test.
|
|
testing = ["dep:tempfile", "dep:tracing-subscriber"]
|
|
|
|
[dependencies]
|
|
tsunagi-speedtest = { path = "../tsunagi-speedtest", version = "0.1.0" }
|
|
arc-swap = "1.9"
|
|
iroh.workspace = true
|
|
# `net` for the local control interface: a Unix socket on Unix, a named pipe
|
|
# on Windows. Both live behind the same `net` feature.
|
|
tokio = { workspace = true, features = ["net"] }
|
|
tokio-stream = "0.1"
|
|
serde.workspace = true
|
|
postcard.workspace = true
|
|
bytes.workspace = true
|
|
thiserror.workspace = true
|
|
tracing.workspace = true
|
|
hex.workspace = true
|
|
data-encoding.workspace = true
|
|
rusqlite = { version = "0.40", features = ["bundled"] }
|
|
hkdf = "0.13"
|
|
hmac = "0.13"
|
|
sha2 = "0.11"
|
|
subtle = "2.6"
|
|
zeroize = { version = "1.9", features = ["derive"] }
|
|
rand = "0.10"
|
|
# Already in the tree through iroh. A packet codec, not a DNS server: the
|
|
# zone logic is ours and a full server framework would be a large dependency
|
|
# for answering A records from memory.
|
|
simple-dns = "0.12"
|
|
# IPv4 packet and checksum codecs shared by the Android VPN and Wintun.
|
|
smoltcp = { version = "0.12", default-features = false, features = ["std", "proto-ipv4"] }
|
|
# The IANA top-level domain list, compiled in: one function, no
|
|
# dependencies, no network. Used only to warn that a zone name shadows a
|
|
# real public domain, never to refuse one.
|
|
tld = "2.40"
|
|
fs4 = { version = "1.1", features = ["sync"] }
|
|
directories = "6.0"
|
|
# The real system hostname, without a libc call of our own: this crate is
|
|
# forbidden `unsafe` and will not make one.
|
|
gethostname = "1.1"
|
|
netwatch = "0.19.3"
|
|
netdev = "0.46"
|
|
mainline = "8.0"
|
|
futures-lite = "2.6"
|
|
tun = { version = "0.8", features = ["async"], optional = true }
|
|
# Only for the `testing` harness, which a protocol crate's tests use too.
|
|
tempfile = { version = "3.24", optional = true }
|
|
tracing-subscriber = { version = "0.3", features = ["env-filter"], optional = true }
|
|
|
|
# Linux-only interface provisioning. `rtnetlink` configures the interface in
|
|
# process, so no `ip` invocation is ever needed; `caps` keeps CAP_NET_ADMIN
|
|
# out of the effective set except during the moments it is used.
|
|
[target.'cfg(target_os = "linux")'.dependencies]
|
|
rtnetlink = { version = "0.23", optional = true }
|
|
# Pure Rust D-Bus, no libdbus to link against. `tokio` rather than the
|
|
# default reactor, because the agent brings its own.
|
|
zbus = { version = "5.19", default-features = false, features = ["tokio"], optional = true }
|
|
caps = { version = "0.5", optional = true }
|
|
futures-util = { version = "0.3", default-features = false, optional = true }
|
|
|
|
# Windows-only interface provisioning. The Wintun adapter itself is created
|
|
# and driven through the `tun` dependency, whose safe wrapper is the only way
|
|
# in — loading `wintun.dll` is an `unsafe` call this crate forbids. `netdev`
|
|
# (already in the tree through `netwatch`) reads the interface table through a
|
|
# safe wrapper, which is how the provisioner observes an adapter by name
|
|
# before deciding what to change. Creating an adapter needs the process to be
|
|
# elevated and `wintun.dll` to be reachable at run time.
|
|
[target.'cfg(target_os = "windows")'.dependencies]
|
|
smoltcp = { version = "0.12", default-features = false, features = ["medium-ip", "socket-tcp"] }
|
|
socket2 = { version = "0.6", features = ["all"] }
|
|
windows-sys = { version = "0.61", features = [
|
|
"Win32_Networking_WinSock",
|
|
"Win32_Security",
|
|
"Win32_Security_Authorization",
|
|
"Win32_Foundation",
|
|
] }
|
|
|
|
[dev-dependencies]
|
|
smoltcp = { version = "0.12", default-features = false, features = ["medium-ip", "socket-tcp"] }
|
|
socket2 = { version = "0.6", features = ["all"] }
|
|
# Its own tests use the harness it publishes.
|
|
tsunagi-core = { path = ".", features = ["testing"] }
|
|
tokio = { version = "1.53", features = ["rt", "rt-multi-thread", "sync", "time", "macros", "process", "test-util"] }
|
|
tempfile.workspace = true
|
|
tracing-subscriber.workspace = true
|
|
|
|
[lints]
|
|
workspace = true
|