feat: add ratchet, streaming, SU3 reseed, and router floodfill
check / check (windows-latest) (push) Failing after 27s
check / check (ubuntu-latest) (push) Failing after 29s
check / check (macos-latest) (push) Failing after 27s

- Add ratchet/ with ECIES-X25519-AEAD-Ratchet (Proposal 144), Garlic cloves, and ECIES DatabaseLookup replies
- Add streaming/ with Ed25519-signed I2P Streaming (SYN/ACK/NACK/CLOSE/RESET, retransmit, window) and Repliable/Raw Datagrams
- Add common/su3.mbt to parse and verify reseed .su3 bundles
- Add Elligator2 encoding in crypto/ and OfflineSignature support in LeaseSet2 (flags bit 0)
- Router: NTCP2 peer pool, floodfill NetDB crawl, transit tunnel relay, and Garlic/Streaming bridge
- cmd/router: add --peer-dir, --su3, --reseed, --floodfill, --no-clock-skew
- cmd/client: add --dest for persistent destination keys
- Mark Phase 6 complete in README and document the transport scope (NTCP2 only, no SSU2)
This commit is contained in:
nandi committed 2026-11-27 22:23:46 -08:00
1 parent 8eafa11b22
commit ae72b00323
54 files changed
+9607 -704

No files matched your search

+66 -6
View File
@@ -44,7 +44,12 @@ fn main {
let mut sam_port = 7656
let mut ntcp2_host = "127.0.0.1"
let mut ntcp2_port = 0
let mut floodfill = false
let mut check_clock_skew = true
let peer_files : Array[String] = []
let peer_dirs : Array[String] = []
let su3_files : Array[String] = []
let reseed_urls : Array[String] = []
let mut i = 1
while i < args.length() {
@@ -86,16 +91,44 @@ fn main {
} else {
i += 1
}
"--peer-dir" =>
if i + 1 < args.length() {
peer_dirs.push(args[i + 1])
i += 2
} else {
i += 1
}
"--su3" =>
if i + 1 < args.length() {
su3_files.push(args[i + 1])
i += 2
} else {
i += 1
}
"--reseed" =>
if i + 1 < args.length() {
reseed_urls.push(args[i + 1])
i += 2
} else {
i += 1
}
"--floodfill" => {
floodfill = true
i += 1
}
"--no-clock-skew" => {
check_clock_skew = false
i += 1
}
_ => i += 1
}
}
let r = @i2p_router.Router::start({
sam_host,
sam_port,
ntcp2_host,
ntcp2_port,
}) catch {
let r = @i2p_router.Router::start(
{ sam_host, sam_port, ntcp2_host, ntcp2_port, },
floodfill~,
check_clock_skew~,
) catch {
_ => {
println("error: failed to start moon-i2p router")
return
@@ -109,6 +142,33 @@ fn main {
}
}
}
for pd in peer_dirs {
let n = r.load_peer_dir(pd) catch {
_ => {
println("warning: failed to load peer dir \{pd}")
continue
}
}
println(" Loaded \{n} peer(s) from \{pd}")
}
for sf in su3_files {
let n = r.load_reseed_su3_file(sf) catch {
_ => {
println("warning: failed to load reseed .su3 from \{sf}")
continue
}
}
println(" Imported \{n} peer(s) from \{sf}")
}
for url in reseed_urls {
let n = r.reseed_from_url(url) catch {
_ => {
println("warning: reseed fetch failed for \{url}")
continue
}
}
println(" Reseeded \{n} peer(s) from \{url}")
}
println("moon-i2p router started (transient identity)")
println(" Router Hash: \{r.router_hash().to_base64()}")
println(" Router B32: \{r.router_hash().to_b32_address()}")