[package]
name = "connlib-shared"
# mark:automatic-version
version = "1.0.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[features]
mock = []

[dependencies]
secrecy = { workspace = true, features = ["serde", "bytes"] }
base64 = { version = "0.21", default-features = false, features = ["std"] }
boringtun = { workspace = true }
chrono = { workspace = true }
futures =  { version = "0.3", default-features = false, features = ["std", "async-await", "executor"] }
futures-util =  { version = "0.3", default-features = false, features = ["std", "async-await", "async-await-macro"] }
# Hickory already depends on `hostname` so this isn't new
hostname = "0.3.1"
ip_network = { version = "0.4", default-features = false, features = ["serde"] }
os_info = { version = "3", default-features = false }
parking_lot = "0.12"
rand = { version = "0.8", default-features = false, features = ["std"] }
rand_core = { version = "0.6.4", default-features = false, features = ["std"] }
serde = { version = "1.0", default-features = false, features = ["derive", "std"] }
serde_json = { version = "1.0", default-features = false, features = ["std"] }
thiserror = { version = "1.0", default-features = false }
tokio = { version = "1.33", default-features = false, features = ["rt", "rt-multi-thread"]}
tokio-stream = { version = "0.1", features = ["time"] }
tokio-tungstenite = { version = "0.20", default-features = false, features = ["connect", "handshake", "rustls-tls-webpki-roots"] }
tracing = { workspace = true }
tracing-appender = "0.2"
url = { version = "2.4.1", default-features = false }
uuid = { version = "1.5", default-features = false, features = ["std", "v4", "serde"] }
webrtc = { workspace = true }
ring = "0.17"
hickory-resolver = { workspace = true }
domain = { workspace = true }
libc = "0.2"

# Needed for Android logging until tracing is working
log = "0.4"

[target.'cfg(any(target_os = "macos", target_os = "ios"))'.dependencies]
swift-bridge = { workspace = true }

[target.'cfg(target_os = "android")'.dependencies]
tracing-android = "0.2"

[target.'cfg(target_os = "linux")'.dependencies]
rtnetlink = { version = "0.13", default-features = false, features = ["tokio_socket"] }

# Windows tunnel dependencies
[target.'cfg(target_os = "windows")'.dependencies]
wintun = "0.3.2"

# Windows Win32 API
[target.'cfg(windows)'.dependencies.windows]
version = "0.52.0"
features = [
  "Win32_Foundation",
]
