Cargo.toml 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. [package]
  2. name = "rathole"
  3. version = "0.5.0"
  4. edition = "2021"
  5. authors = ["Yujia Qiao <code@rapiz.me>"]
  6. description = "A reverse proxy for NAT traversal"
  7. license = "Apache-2.0"
  8. repository = "https://github.com/rapiz1/rathole"
  9. readme = "README.md"
  10. build = "build.rs"
  11. include = ["src/**/*", "LICENSE", "README.md", "build.rs"]
  12. [features]
  13. default = ["server", "client", "tls", "noise", "websocket", "hot-reload"]
  14. # Run as a server
  15. server = []
  16. # Run as a client
  17. client = []
  18. # TLS support
  19. tls = ["tokio-native-tls"]
  20. # Noise support
  21. noise = ["snowstorm", "base64"]
  22. # Websocket support
  23. websocket = ["tokio-tungstenite", "tokio-util", "futures-core", "futures-sink", "tls"]
  24. # Configuration hot-reload support
  25. hot-reload = ["notify"]
  26. # Default feature releasing embedded devices
  27. # Cross-compiling with tls is hard. So we don't :(
  28. embedded = ["server", "client", "hot-reload", "noise"]
  29. # Feature to enable tokio-console. Disabled by default.
  30. # Don't enable it unless for debugging purposes.
  31. console = ["console-subscriber", "tokio/tracing"]
  32. # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
  33. [profile.dev]
  34. panic = "abort"
  35. [profile.release]
  36. panic = "abort"
  37. lto = true
  38. codegen-units = 1
  39. strip = true
  40. [profile.bench]
  41. debug = 1
  42. [profile.minimal]
  43. inherits = "release"
  44. opt-level = "z"
  45. lto = true
  46. codegen-units = 1
  47. [dependencies]
  48. tokio = { version = "1", features = ["full"] }
  49. bytes = { version = "1", features = ["serde"] }
  50. clap = { version = "3.0", features = ["derive"] }
  51. toml = "0.5"
  52. serde = { version = "1.0", features = ["derive"] }
  53. anyhow = "1.0"
  54. sha2 = "0.10"
  55. bincode = "1"
  56. lazy_static = "1.4"
  57. hex = "0.4"
  58. rand = "0.8"
  59. backoff = { version = "0.4", features = ["tokio"] }
  60. tracing = "0.1"
  61. tracing-subscriber = { version="0.3", features=["env-filter"] }
  62. socket2 = { version = "0.4", features = ["all"] }
  63. fdlimit = "0.2"
  64. tokio-native-tls = { version = "0.3", optional = true }
  65. async-trait = "0.1"
  66. snowstorm = { version = "0.4", optional = true, features = ["stream"], default-features = false }
  67. base64 = { version = "0.13", optional = true }
  68. notify = { version = "5.0.0-pre.13", optional = true }
  69. console-subscriber = { version = "0.1", optional = true, features = ["parking_lot"] }
  70. atty = "0.2"
  71. async-http-proxy = { version = "1.2", features = ["runtime-tokio", "basic-auth"] }
  72. async-socks5 = "0.5"
  73. url = { version = "2.2", features = ["serde"] }
  74. tokio-tungstenite = { version="0.20.1", optional = true}
  75. tokio-util = { version="0.7.9", optional = true, features = ["io"] }
  76. futures-core = { version="0.3.28", optional = true }
  77. futures-sink = { version="0.3.28", optional = true }
  78. [target.'cfg(target_env = "musl")'.dependencies]
  79. openssl = { version = "0.10", features = ["vendored"] }
  80. [build-dependencies]
  81. vergen = { version = "7.4.2", default-features = false, features = ["build", "git", "cargo"] }
  82. anyhow = "1.0"