[package]
edition = "2021"
rust-version = "1.75.0"
name = "dig-nat"
version = "0.4.0"
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Abstract NAT traversal for DIG Node peer connections — one connect() API over direct, UPnP/IGD, NAT-PMP, PCP, relay-coordinated hole-punch, and relay.dig.net as last-resort fallback; establishes an mTLS peer connection with peer_id = SHA256(TLS SPKI DER)."
readme = "README.md"
keywords = [
"nat",
"traversal",
"p2p",
"stun",
"dig",
]
categories = ["network-programming"]
license = "Apache-2.0 OR MIT"
repository = "https://github.com/DIG-Network/dig-nat"
[lib]
name = "dig_nat"
path = "src/lib.rs"
[[test]]
name = "address_family"
path = "tests/address_family.rs"
[[test]]
name = "connect"
path = "tests/connect.rs"
[[test]]
name = "dial_family"
path = "tests/dial_family.rs"
[[test]]
name = "dialer"
path = "tests/dialer.rs"
[[test]]
name = "identity"
path = "tests/identity.rs"
[[test]]
name = "local_ipv6"
path = "tests/local_ipv6.rs"
[[test]]
name = "methods"
path = "tests/methods.rs"
[[test]]
name = "mtls"
path = "tests/mtls.rs"
[[test]]
name = "mux"
path = "tests/mux.rs"
[[test]]
name = "natpmp"
path = "tests/natpmp.rs"
[[test]]
name = "pcp"
path = "tests/pcp.rs"
[[test]]
name = "peer_passthrough"
path = "tests/peer_passthrough.rs"
[[test]]
name = "relay"
path = "tests/relay.rs"
[[test]]
name = "relayed_transport"
path = "tests/relayed_transport.rs"
[[test]]
name = "socket_io"
path = "tests/socket_io.rs"
[[test]]
name = "strategy"
path = "tests/strategy.rs"
[[test]]
name = "stun"
path = "tests/stun.rs"
[[test]]
name = "wire_conformance"
path = "tests/wire_conformance.rs"
[dependencies.async-trait]
version = "0.1"
[dependencies.dig-constants]
version = ">=0.2, <0.5"
[dependencies.dig-ip]
version = "0.1"
[dependencies.futures]
version = "0.3"
features = [
"std",
"async-await",
]
default-features = false
[dependencies.futures-util]
version = "0.3"
features = [
"sink",
"std",
]
default-features = false
[dependencies.igd-next]
version = "0.17"
features = ["aio_tokio"]
[dependencies.ring]
version = "0.17"
[dependencies.rustls]
version = "0.23"
features = [
"ring",
"std",
]
default-features = false
[dependencies.rustls-pki-types]
version = "1"
[dependencies.serde]
version = "1"
features = ["derive"]
[dependencies.serde_bytes]
version = "0.11"
[dependencies.serde_json]
version = "1"
[dependencies.sha2]
version = "0.10"
[dependencies.thiserror]
version = "2"
[dependencies.tokio]
version = "1"
features = [
"rt",
"rt-multi-thread",
"macros",
"net",
"time",
"sync",
"io-util",
]
[dependencies.tokio-rustls]
version = "0.26"
features = ["ring"]
default-features = false
[dependencies.tokio-tungstenite]
version = "0.24"
features = ["rustls-tls-webpki-roots"]
[dependencies.tokio-util]
version = "0.7"
features = ["compat"]
[dependencies.tracing]
version = "0.1"
[dependencies.x509-parser]
version = "0.16"
[dependencies.yamux]
version = "0.13"
[dependencies.zeroize]
version = "1"
[dev-dependencies.rcgen]
version = "0.13"
[dev-dependencies.tokio]
version = "1"
features = [
"rt-multi-thread",
"macros",
"net",
"time",
"sync",
"test-util",
]
[dev-dependencies.tokio-tungstenite]
version = "0.24"
[profile.release]
overflow-checks = true