Cargo.toml 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. [package]
  2. name = "rathole"
  3. version = "0.6.0-beta.1"
  4. rust-version = "1.92"
  5. edition = "2021"
  6. authors = ["Yujia Qiao <code@rapiz.me>"]
  7. description = "A reverse proxy for NAT traversal"
  8. license = "Apache-2.0"
  9. repository = "https://github.com/rathole-org/rathole"
  10. readme = "README.md"
  11. build = "build.rs"
  12. include = ["src/**/*", "LICENSE", "README.md", "build.rs"]
  13. [features]
  14. default = [
  15. "server",
  16. "client",
  17. "native-tls",
  18. "noise",
  19. "websocket-native-tls",
  20. "hot-reload",
  21. ]
  22. # Run as a server
  23. server = []
  24. # Run as a client
  25. client = []
  26. # TLS support
  27. native-tls = ["tokio-native-tls"]
  28. rustls = [
  29. "tokio-rustls",
  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 = "4.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. async-http-proxy = { version = "1.2", features = [
  100. "runtime-tokio",
  101. "basic-auth",
  102. ] }
  103. async-socks5 = "0.5"
  104. url = { version = "2.2", features = ["serde"] }
  105. tokio-tungstenite = { version = "0.20.1", optional = true }
  106. tokio-util = { version = "0.7.9", optional = true, features = ["io"] }
  107. futures-core = { version = "0.3.28", optional = true }
  108. futures-sink = { version = "0.3.28", optional = true }
  109. tokio-native-tls = { version = "0.3", optional = true }
  110. tokio-rustls = { version = "0.25", optional = true }
  111. rustls-native-certs = { version = "0.8.3", optional = true }
  112. p12 = { version = "0.6.3", optional = true }
  113. [target.'cfg(target_env = "musl")'.dependencies]
  114. openssl = { version = "0.10", features = ["vendored"], optional = true }
  115. [build-dependencies]
  116. vergen-gitcl = { version = "9.1.0", default-features = false, features = [
  117. "build",
  118. "cargo"
  119. ] }
  120. anyhow = "1.0"