1
0

Cargo.toml 3.4 KB

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