1
0

Cargo.toml 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  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 = [
  14. "server",
  15. "client",
  16. "native-tls",
  17. "noise",
  18. "websocket-native-tls",
  19. "hot-reload",
  20. ]
  21. # Run as a server
  22. server = []
  23. # Run as a client
  24. client = []
  25. # TLS support
  26. native-tls = ["tokio-native-tls"]
  27. rustls = [
  28. "tokio-rustls",
  29. "rustls-pemfile",
  30. "rustls-native-certs",
  31. "p12",
  32. ]
  33. # Noise support
  34. noise = ["snowstorm", "base64"]
  35. # Websocket support
  36. websocket-native-tls = [
  37. "tokio-tungstenite",
  38. "tokio-util",
  39. "futures-core",
  40. "futures-sink",
  41. "native-tls",
  42. ]
  43. websocket-rustls = [
  44. "tokio-tungstenite",
  45. "tokio-util",
  46. "futures-core",
  47. "futures-sink",
  48. "rustls",
  49. ]
  50. # Configuration hot-reload support
  51. hot-reload = ["notify"]
  52. # Default feature releasing embedded devices
  53. # Cross-compiling with tls is hard. So we don't :(
  54. embedded = ["server", "client", "hot-reload", "noise"]
  55. # Feature to enable tokio-console. Disabled by default.
  56. # Don't enable it unless for debugging purposes.
  57. console = ["console-subscriber", "tokio/tracing"]
  58. # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
  59. [profile.dev]
  60. panic = "abort"
  61. [profile.release]
  62. panic = "abort"
  63. lto = true
  64. codegen-units = 1
  65. strip = true
  66. [profile.bench]
  67. debug = 1
  68. [profile.minimal]
  69. inherits = "release"
  70. opt-level = "z"
  71. lto = true
  72. codegen-units = 1
  73. [dependencies]
  74. tokio = { version = "1", features = ["full"] }
  75. bytes = { version = "1", features = ["serde"] }
  76. clap = { version = "3.0", features = ["derive"] }
  77. toml = "0.5"
  78. serde = { version = "1.0", features = ["derive"] }
  79. anyhow = "1.0"
  80. sha2 = "0.10"
  81. bincode = "1"
  82. lazy_static = "1.4"
  83. hex = "0.4"
  84. rand = "0.8"
  85. backoff = { version = "0.4", features = ["tokio"] }
  86. tracing = "0.1"
  87. tracing-subscriber = { version = "0.3", features = ["env-filter"] }
  88. socket2 = { version = "0.4", features = ["all"] }
  89. fdlimit = "0.2"
  90. async-trait = "0.1"
  91. snowstorm = { version = "0.4", optional = true, features = [
  92. "stream",
  93. ], default-features = false }
  94. base64 = { version = "0.13", optional = true }
  95. notify = { version = "5.0.0-pre.13", optional = true }
  96. console-subscriber = { version = "0.1", optional = true, features = [
  97. "parking_lot",
  98. ] }
  99. atty = "0.2"
  100. async-http-proxy = { version = "1.2", features = [
  101. "runtime-tokio",
  102. "basic-auth",
  103. ] }
  104. async-socks5 = "0.5"
  105. url = { version = "2.2", features = ["serde"] }
  106. tokio-tungstenite = { version = "0.20.1", optional = true }
  107. tokio-util = { version = "0.7.9", optional = true, features = ["io"] }
  108. futures-core = { version = "0.3.28", optional = true }
  109. futures-sink = { version = "0.3.28", optional = true }
  110. tokio-native-tls = { version = "0.3", optional = true }
  111. tokio-rustls = { version = "0.25", optional = true }
  112. rustls-native-certs = { version = "0.7", optional = true }
  113. rustls-pemfile = { version = "2.0", optional = true }
  114. p12 = { version = "0.6.3", optional = true }
  115. [target.'cfg(target_env = "musl")'.dependencies]
  116. openssl = { version = "0.10", features = ["vendored"], optional = true }
  117. [build-dependencies]
  118. vergen = { version = "7.4.2", default-features = false, features = [
  119. "build",
  120. "git",
  121. "cargo",
  122. ] }
  123. anyhow = "1.0"