ff91907057
Vanilla's ServerRedirectHandler asks through JNDI's DNS client: the system's name servers in turn, one 1 s UDP try each (retries = 1), TCP when the reply is truncated, the first SRV record of the answer. resolver/dns.rs does that by hand in ~200 lines with wire-format tests and a local stub server, so the game, the dedicated server and the bots no longer pull in tokio, hickory and ~25 other crates (none of them were in the game before). Name servers come from resolv.conf on Unix, as JNDI reads them, and from the network adapters on Windows (ipconfig, Windows only; the crate keeps forbid(unsafe_code)). Each server waits 1 s, as vanilla does, instead of the whole connect timeout. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
31 lines
945 B
TOML
31 lines
945 B
TOML
[package]
|
|
name = "horizon-protocol"
|
|
version = "0.1.0"
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
rust-version.workspace = true
|
|
description = "Horizon's Minecraft Java Edition 26.3 network protocol (version 777)"
|
|
|
|
[dependencies]
|
|
horizon-core = { path = "../horizon-core" }
|
|
horizon-world = { path = "../horizon-world" }
|
|
flate2 = { version = "1.1.10", default-features = false, features = ["zlib-rs", "runtime_detection"] }
|
|
serde_json = "1.0.151"
|
|
# The shared secret and RSA padding (OS randomness) and the server hash.
|
|
getrandom = "0.3"
|
|
sha1 = "0.10"
|
|
# Secure chat: SHA256withRSA message signatures.
|
|
sha2 = "0.10"
|
|
|
|
# The name servers of Windows' network adapters, for Minecraft SRV redirects.
|
|
[target.'cfg(windows)'.dependencies]
|
|
ipconfig = "0.3.4"
|
|
|
|
# Its own name, not `probe`: Cargo copies every crate's examples into one target/<profile>/examples.
|
|
[[example]]
|
|
name = "protocol_probe"
|
|
path = "examples/probe.rs"
|
|
|
|
[lints]
|
|
workspace = true
|