content: [package]
  name = "smartdns"
  version = "0.12.2"
  authors = ["YISH <mokeyish@hotmail.com>"]
  edition = "2024"
  rust-version = "1.87.0"
  
  keywords = ["DNS", "BIND", "dig", "SmartDNS", "Dnsmasq"]
  categories = ["network-programming"]
  
  description = """
  A cross platform local DNS server written in rust to obtain the fastest website IP for the best Internet experience, support DoT, DoQ, DoH, DoH3.
  """
  
  homepage = "https://github.com/mokeyish/smartdns-rs"
  repository = "https://github.com/mokeyish/smartdns-rs"
  license = "GPL-3.0-only"
  readme = "README.md"
  
  [lints.rust]
  unexpected_cfgs = { level = "warn", check-cfg = ['cfg(nightly)'] }
  
  [package.metadata.patch]
  # crates = ["hickory-server", "hickory-proto"]
  
  [features]
  
  default = ["common", "self-update" ]
  
  homebrew = [ "common" ]
  
  common = ["resolve-cli", "dns-over-tls", "dns-over-https", "dns-over-quic", "dns-over-h3", "mdns", "dnssec", "service", "nft", "nom-recipes-all", "swagger-ui-cdn", "http_client", "serde" ]
  
  future-diagnostic = [
    "dep:console-subscriber"
  ]
  
  nom-recipes-all =["nom-recipes-ip", "nom-recipes-mac"]
  
  nom-recipes-ip = ["nom-recipes-ipv4", "nom-recipes-ipv6"]
  nom-recipes-ipv4 = []
  nom-recipes-ipv6 = [
    "nom-recipes-ipv4" # support IPv4-mapped IPv6 addresses
  ]
  nom-recipes-mac = []
  
  failed_tests = []
  disable_icmp_ping = []
  self-update = ["dep:self_update"]
  
  resolve-cli = ["dep:console"]
  
  dns-over-tls = [
    "hickory-proto/tls-ring",
    "hickory-resolver/tls-ring",
  ]
  dns-over-https = [
    "hickory-proto/https-ring",
    "hickory-resolver/https-ring"
  ]
  dns-over-quic = [
    "hickory-proto/quic-ring",
    "hickory-resolver/quic-ring",
  ]
  dns-over-h3 = [
    "hickory-proto/h3-ring",
    "hickory-resolver/h3-ring"
  ]
  
  mdns = [
    "hickory-proto/mdns",
    "hickory-resolver/mdns",
  ]
  
  service = [
    "dep:which",
    "dep:self-replace", "dep:same-file" # windows self_delete
  ]
  
  nft = ["dep:which", "dep:either"]
  
  dnssec = [ "hickory-proto/dnssec-ring", "rustls/ring"]
  
  serde = [ "dep:serde", "dep:serde_json" ]
  
  swagger-ui-cdn = []
  
  swagger-ui-embed = [
    "dep:utoipa-swagger-ui"
  ]
  
  
  http_client = [
    "ureq"
  ]
  
  ureq = [
    "dep:ureq",
    "self_update?/ureq", "self_update?/rustls"
  ]
  
  reqwest = ["dep:reqwest", "self_update?/reqwest"]
  
  experimental = ["experimental-trie", "experimental-phf"]
  
  experimental-trie = []
  experimental-phf = [
    "dep:boomphf"
  ]
  
  
  # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
  
  [patch.crates-io]
  # rustls = { git = "https://github.com/mokeyish/rustls.git", branch = "patched_main"}
  # hickory-resolver = { git = "https://github.com/hickory-dns/hickory-dns.git", rev = "41b6e33"}
  # hickory-server = { path = "./target/patch/hickory-server-0.24.0" }
  # hickory-proto = { path = "./target/patch/hickory-proto-0.24.0" }
  # rustls-native-certs = { git = "https://github.com/mokeyish/rustls-native-certs.git" }
  # enum_dispatch = { git = "https://gitlab.com/mokeyish/enum_dispatch.git", branch = "master"}
  # axum = { git = "https://github.com/tokio-rs/axum.git", rev = "8854e66" }
  # boomphf ={ path = "./target/patch/boomphf-0.6.0"}
  rustls-pki-types = { git = "https://github.com/mokeyish/pki-types.git", rev = "1.12.0.smartdns.1" }
  self_update = { git = "https://github.com/mokeyish/self_update.git", rev = "0.42.0.smartdns.1"}
  
  [dependencies]
  cfg-if = "1"
  clap = { version = "4.5", features = ["derive"] }
  clap-verbosity-flag = "3.0.4"
  thiserror = "2.0"
  anyhow = "1.0"
  once_cell = "1.16.0"
  nom = "8.0.0"
  enum_dispatch = "0.3.13"
  bytes = "1.6.0"
  either = { version = "1.12.0", optional = true }
  
  
  # webapi
  axum = { version = "0.8.1" }
  axum-h3 = "0.0.3"
  h3-util = { version = "0.0.3", default-features = false, features = ["quinn"]}
  hyper = { version = "1.1.0", default-features = false }
  hyper-util = { version = "0.1.14", features = ["http2"]}
  tower = { version = "0.5.2", default-features = false }
  tower-http = { version = "0.6.6", default-features = false, features = ["set-header"]}
  utoipa = { git = "https://github.com/mokeyish/utoipa.git", rev = "smartdns.1", package = "utoipa", features = ["axum_extras"] }
  utoipa-axum = { git = "https://github.com/mokeyish/utoipa.git", rev = "smartdns.1", package = "utoipa-axum", features = []}
  utoipa-swagger-ui = { git = "https://github.com/mokeyish/utoipa.git", rev = "smartdns.1", package = "utoipa-swagger-ui", optional = true, default-features = false, features = ["axum"] }
  
  # serde
  serde = { version = "1.0", optional = true, features = ["derive"]}
  serde_json = { version = "1.0", optional = true }
  
  # async/await
  futures = { version = "0.3.5", default-features = false, features = ["std"] }
  futures-intrusive = "0.5"
  futures-util = { version = "0.3.5", default-features = false, features = ["std"] }
  async-trait = "0.1.80"
  tokio = { version = "1.46", features = [
    "time",
    "rt",
    "signal",
    "macros",
    "parking_lot",
  ] }
  tokio-rustls = { version = "0.26.0", default-features = false }
  tokio-util = "0.7.12"
  socket2 = { version = "0.6", features = ["all"] }
  http = "1"
  reqwest = { version = "0.12", optional = true, default-features = false, features = [
    "blocking",
    "rustls-tls",
  ] }
  ureq = { version = "3.0.12", optional = true, default-features = false, features = ["gzip", "json", "socks-proxy", "rustls"]}
  
  # log
  tracing = "0.1"
  tracing-subscriber = { version = "0.3", features = [
    "std",
    "fmt",
    "env-filter",
  ] }
  
  console-subscriber = { version = "0.4.1", optional = true }
  # tracing-appender = "0.2"
  
  # hickory dns
  hickory-proto = { git = "https://github.com/mokeyish/hickory-dns.git", rev = "0.26.0-smartdns.5", features = ["serde"]}
  hickory-resolver = { git = "https://github.com/mokeyish/hickory-dns.git", rev = "0.26.0-smartdns.5", features = [
    "serde",
    "system-config",
  ] }
  quinn = { version = "0.11.2", default-features = false }
  dhcproto = "0.13.0"
  netdev = "0.37.1"
  
  # ssl
  webpki-roots = "1.0"
  rustls = { version = "0.23", default-features = false, features = ["std", "tls12"]  }
  rustls-pemfile = "2"
  rustls-native-certs = "0.8"
  
  lru = { version = "0.14", default-features = false }
  # time = "0.3"
  chrono = { version = "0.4.38", default-features = false, features = ["serde", "clock"]}
  surge-ping = { version = "0.8", git = "https://github.com/mokeyish/surge-ping.git", rev = "4a88f6f"}
  rand = "0.9.1"
  smallvec = "1.13.2"
  csv = "1.1"
  hostname = "0.4"
  byte-unit = { version = "5.0.3", features = ["serde"]}
  ipnet = { version = "2.11", features = ["json"]}
  which = { version = "8.0.0", optional = true }
  glob = "0.3.3"
  wildcard = "0.3.0"
  
  # process
  sysinfo = { version = "0.36", default-features = false, features = ["system"]}
  
  # proxy
  async-socks5 = { version = "0.6.0", git = "https://github.com/mokeyish/async-socks5.git", rev = "f78eec5" }
  async-http-proxy = { version = "1.2.5", features = [
    "runtime-tokio",
    "basic-auth",
  ] }
  
  num-traits = "0.2.19"
  url = "2.5.4"
  # regex = "1"
  # rnp = "0.1"
  boomphf = { version = "0.6.0", optional = true }
  local-ip-address = "0.6.1"
  console = { version = "0.15.8", optional = true }
  rangemap = "1.5.1"
  
  [target.'cfg(target_os = "linux")'.dependencies]
  uzers = { version = "0.12", default-features = false }
  caps = "0.5.5"
  self_update = { version = "0.42.0", default-features = false, features=["archive-tar", "compression-flate2"], optional = true }
  
  [target.'cfg(target_os = "android")'.dependencies]
  self_update = { version = "0.42.0", default-features = false, features=["archive-tar", "compression-flate2"], optional = true }
  
  [target.'cfg(target_os = "macos")'.dependencies]
  self_update = { version = "0.42.0", default-features = false, features=["archive-zip", "compression-zip-deflate"], optional = true }
  
  
  [target.'cfg(windows)'.dependencies]
  windows = { version = "0.60", features = [
    "Win32_System_Console",
    "Win32_Foundation",
    "Win32_Networking", "Win32_Networking_WinSock", "Win32_System_IO", # set UDP_CONNRESET off
  ] }
  windows-service = "0.8.0"
  self_update = { version = "0.42.0", default-features = false, features=["archive-zip", "compression-zip-deflate"], optional = true }
  self-replace = { version = "1.3.7", optional = true }
  same-file = { version = "1", optional = true }
  
  
  
  [build-dependencies]
  reqwest = { version = "0.12", default-features = false, features = [
    "blocking",
    "rustls-tls",
  ] }
  chrono = "0.4.38"
  anyhow = "1.0"
  
  
  [target.'cfg(target_os = "linux")'.build-dependencies]
  cc = "1.2"
  bindgen = "0.72"
  
  
  # Dev-dependencies are not used when compiling a package for building, but are used for compiling tests, examples, and benchmarks.
  [dev-dependencies]
  indoc = "2"
  # reqwest = { version = "0.12", default-features = false, features = [
  #   "blocking",
  #   "rustls-tls",
  # ] }
  
  
  [profile.release]
  # see: https://github.com/johnthagen/min-sized-rust
  strip = true    # Automatically strip symbols from the binary.
  opt-level = "z" # Optimize for size.
  lto = true
  codegen-units = 1
  