mirror of
https://github.com/NLnetLabs/domain.git
synced 2026-09-30 13:44:59 +02:00
- Re-enable the cookies Stelline test and fix `CookiesMiddlewareProcessor` to allow requests with invalid cookies to proceed if they are authenticated or not required to authenticate. - Add support for net blocks in the deny list of the cookie middleware processor, ala Unbound, otherwise the deny list is difficult to use beyond a few simple specific IP addresses. - Improvements to the Stelline server test support needed by the Stelline cookies test: - Advance mock system time in the Stelline server tests. - Move Stelline server tests under src/ to permit #cfg(test) based swap out of real system time for mock system time. - Use the thread_local version of mock_instant to ensure parallel mock time dependent tests don't interfere with each other (such tests also use tokio::time which only works if they run in a single thread). - Set mock system time to start at zero for each Stelline server test (as expected by the cookies .rpl test script). - Pass the IP address of the test client to the server so that the cookies middleware can match it against its deny list.
139 lines
5.5 KiB
TOML
139 lines
5.5 KiB
TOML
[package]
|
|
name = "domain"
|
|
version = "0.10.1"
|
|
|
|
# This is the mimimal Rust version with minimal dependencies as specified
|
|
# below. With latest dependency versions 1.76.0 is currently required.
|
|
rust-version = "1.68.2"
|
|
|
|
edition = "2021"
|
|
authors = ["NLnet Labs <dns-team@nlnetlabs.nl>"]
|
|
description = "A DNS library for Rust."
|
|
documentation = "https://docs.rs/domain"
|
|
homepage = "https://github.com/nlnetlabs/domain/"
|
|
repository = "https://github.com/nlnetlabs/domain/"
|
|
readme = "README.md"
|
|
keywords = ["DNS", "domain"]
|
|
license = "BSD-3-Clause"
|
|
|
|
[lib]
|
|
name = "domain"
|
|
path = "src/lib.rs"
|
|
|
|
[dependencies]
|
|
octseq = { version = "0.5.2-dev", git = "https://github.com/NLnetLabs/octseq.git", rev ="3f7797f4274af0a52e66105250ee1186ff2ab6ac", default-features = false }
|
|
time = { version = "0.3.1", default-features = false }
|
|
|
|
rand = { version = "0.8", optional = true }
|
|
arc-swap = { version = "1.7.0", optional = true }
|
|
bytes = { version = "1.0", optional = true, default-features = false }
|
|
chrono = { version = "0.4.35", optional = true, default-features = false } # 0.4.35 deprecates Duration::seconds()
|
|
futures = { version = "0.3.22", optional = true } # Force futures to at least 0.3.22 for minimal-version build
|
|
futures-util = { version = "0.3", optional = true }
|
|
heapless = { version = "0.8", optional = true }
|
|
libc = { version = "0.2.153", default-features = false, optional = true } # 0.2.79 is the first version that has IP_PMTUDISC_OMIT
|
|
parking_lot = { version = "0.12", optional = true }
|
|
moka = { version = "0.12.3", optional = true, features = ["future"] }
|
|
proc-macro2 = { version = "1.0.69", optional = true } # Force proc-macro2 to at least 1.0.69 for minimal-version build
|
|
ring = { version = "0.17", optional = true }
|
|
serde = { version = "1.0.130", optional = true, features = ["derive"] }
|
|
siphasher = { version = "1", optional = true }
|
|
smallvec = { version = "1.3", optional = true }
|
|
tokio = { version = "1.33", optional = true, features = ["io-util", "macros", "net", "time", "sync", "rt-multi-thread" ] }
|
|
tokio-rustls = { version = "0.26", optional = true, default-features = false }
|
|
tracing = { version = "0.1.40", optional = true }
|
|
tracing-subscriber = { version = "0.3.18", optional = true, features = ["env-filter"] }
|
|
|
|
[features]
|
|
default = ["std", "rand"]
|
|
bytes = ["dep:bytes", "octseq/bytes"]
|
|
heapless = ["dep:heapless", "octseq/heapless"]
|
|
resolv = ["net", "smallvec", "unstable-client-transport"]
|
|
resolv-sync = ["resolv", "tokio/rt"]
|
|
serde = ["dep:serde", "octseq/serde"]
|
|
sign = ["std"]
|
|
smallvec = ["dep:smallvec", "octseq/smallvec"]
|
|
std = ["bytes?/std", "octseq/std", "time/std"]
|
|
net = ["bytes", "futures-util", "rand", "std", "tokio"]
|
|
tsig = ["bytes", "ring", "smallvec"]
|
|
validate = ["bytes", "std", "ring"]
|
|
zonefile = ["bytes", "serde", "std"]
|
|
|
|
# Unstable features
|
|
unstable-client-transport = ["moka", "net", "tracing"]
|
|
unstable-server-transport = ["arc-swap", "chrono/clock", "libc", "net", "siphasher", "tracing"]
|
|
unstable-stelline = ["tokio/test-util", "tracing", "tracing-subscriber", "unstable-server-transport", "zonefile"]
|
|
unstable-validator = ["validate", "zonefile", "unstable-client-transport"]
|
|
unstable-zonetree = ["futures", "parking_lot", "serde", "tokio", "tracing"]
|
|
|
|
[dev-dependencies]
|
|
lazy_static = { version = "1.4.0" }
|
|
rstest = "0.19.0"
|
|
rustls-pemfile = { version = "2.1.2" }
|
|
serde_test = "1.0.130"
|
|
serde_json = "1.0.113"
|
|
serde_yaml = "0.9"
|
|
socket2 = { version = "0.5.5" }
|
|
tokio = { version = "1.37", features = ["rt-multi-thread", "io-util", "net", "test-util"] }
|
|
tokio-rustls = { version = "0.26", default-features = false, features = [ "ring", "logging", "tls12" ] }
|
|
tokio-test = "0.4"
|
|
tokio-tfo = { version = "0.2.0" }
|
|
webpki-roots = { version = "0.26" }
|
|
|
|
# For the "mysql-zone" example
|
|
#sqlx = { version = "0.6", features = [ "runtime-tokio-native-tls", "mysql" ] }
|
|
|
|
# For testing in integration tests:
|
|
mock_instant = { version = "0.5.1" }
|
|
|
|
[package.metadata.docs.rs]
|
|
all-features = true
|
|
rustdoc-args = ["--cfg", "docsrs"]
|
|
|
|
[[example]]
|
|
name = "download-rust-lang"
|
|
required-features = ["resolv"]
|
|
|
|
[[example]]
|
|
name = "lookup"
|
|
required-features = ["resolv"]
|
|
|
|
[[example]]
|
|
name = "resolv-sync"
|
|
required-features = ["resolv-sync"]
|
|
|
|
[[example]]
|
|
name = "client"
|
|
required-features = ["std", "rand"]
|
|
|
|
[[example]]
|
|
name = "client-transports"
|
|
required-features = ["net", "unstable-client-transport"]
|
|
|
|
[[example]]
|
|
name = "server-transports"
|
|
required-features = ["net", "unstable-server-transport"]
|
|
|
|
[[example]]
|
|
name = "read-zone"
|
|
required-features = ["zonefile"]
|
|
|
|
[[example]]
|
|
name = "query-zone"
|
|
required-features = ["zonefile", "unstable-zonetree"]
|
|
|
|
[[example]]
|
|
name = "serve-zone"
|
|
required-features = ["zonefile", "net", "unstable-server-transport", "unstable-zonetree"]
|
|
|
|
# This example is commented out because it is difficult, if not impossible,
|
|
# when including the sqlx dependency, to make the dependency tree compatible
|
|
# with both `cargo +nightly update -Z minimal versions` and the crate minimum
|
|
# supported Rust version (1.67 at the time of writing), both of which are
|
|
# tested by our CI setup. To try this example, uncomment the lines below and
|
|
# the sqlx dependency above, then run `cargo run --example mysql-zone`.
|
|
#[[example]]
|
|
#name = "mysql-zone"
|
|
#path = "examples/other/mysql-zone.rs"
|
|
#required-features = ["zonefile", "net", "unstable-server-transport", "unstable-zonetree"]
|