2021-12-11 05:30:42 -07:00
|
|
|
[package]
|
|
|
|
name = "rathole"
|
2023-10-01 03:55:18 -06:00
|
|
|
version = "0.5.0"
|
2021-12-11 05:30:42 -07:00
|
|
|
edition = "2021"
|
|
|
|
authors = ["Yujia Qiao <code@rapiz.me>"]
|
|
|
|
description = "A reverse proxy for NAT traversal"
|
2021-12-18 23:55:58 -07:00
|
|
|
license = "Apache-2.0"
|
2021-12-18 05:20:41 -07:00
|
|
|
repository = "https://github.com/rapiz1/rathole"
|
|
|
|
readme = "README.md"
|
2022-01-01 23:19:14 -07:00
|
|
|
build = "build.rs"
|
2022-01-10 20:45:52 -07:00
|
|
|
include = ["src/**/*", "LICENSE", "README.md", "build.rs"]
|
2021-12-11 05:30:42 -07:00
|
|
|
|
2021-12-19 21:40:02 -07:00
|
|
|
[features]
|
2024-02-18 02:17:17 -07:00
|
|
|
default = [
|
|
|
|
"server",
|
|
|
|
"client",
|
|
|
|
"native-tls",
|
|
|
|
"noise",
|
|
|
|
"websocket-native-tls",
|
|
|
|
"hot-reload",
|
|
|
|
]
|
2022-01-02 01:38:31 -07:00
|
|
|
|
|
|
|
# Run as a server
|
2021-12-19 21:40:02 -07:00
|
|
|
server = []
|
2022-01-02 01:38:31 -07:00
|
|
|
# Run as a client
|
2021-12-19 21:40:02 -07:00
|
|
|
client = []
|
2024-02-18 02:17:17 -07:00
|
|
|
|
2022-01-02 01:38:31 -07:00
|
|
|
# TLS support
|
2024-02-18 02:17:17 -07:00
|
|
|
native-tls = ["tokio-native-tls"]
|
|
|
|
rustls = [
|
|
|
|
"tokio-rustls",
|
|
|
|
"rustls-pemfile",
|
|
|
|
"rustls-native-certs",
|
|
|
|
"p12",
|
|
|
|
]
|
|
|
|
|
2022-01-02 01:38:31 -07:00
|
|
|
# Noise support
|
2021-12-25 04:01:01 -07:00
|
|
|
noise = ["snowstorm", "base64"]
|
2024-02-18 02:17:17 -07:00
|
|
|
|
2023-10-01 00:43:03 -06:00
|
|
|
# Websocket support
|
2024-02-18 02:17:17 -07:00
|
|
|
websocket-native-tls = [
|
|
|
|
"tokio-tungstenite",
|
|
|
|
"tokio-util",
|
|
|
|
"futures-core",
|
|
|
|
"futures-sink",
|
|
|
|
"native-tls",
|
|
|
|
]
|
|
|
|
websocket-rustls = [
|
|
|
|
"tokio-tungstenite",
|
|
|
|
"tokio-util",
|
|
|
|
"futures-core",
|
|
|
|
"futures-sink",
|
|
|
|
"rustls",
|
|
|
|
]
|
|
|
|
|
2022-01-02 01:38:31 -07:00
|
|
|
# Configuration hot-reload support
|
|
|
|
hot-reload = ["notify"]
|
2021-12-19 21:40:02 -07:00
|
|
|
|
2023-10-01 03:13:17 -06:00
|
|
|
# Default feature releasing embedded devices
|
|
|
|
# Cross-compiling with tls is hard. So we don't :(
|
|
|
|
embedded = ["server", "client", "hot-reload", "noise"]
|
|
|
|
|
2021-12-23 06:06:40 -07:00
|
|
|
# Feature to enable tokio-console. Disabled by default.
|
|
|
|
# Don't enable it unless for debugging purposes.
|
|
|
|
console = ["console-subscriber", "tokio/tracing"]
|
|
|
|
|
2021-12-11 05:30:42 -07:00
|
|
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
2022-01-03 02:50:28 -07:00
|
|
|
[profile.dev]
|
|
|
|
panic = "abort"
|
|
|
|
|
2021-12-25 23:47:31 -07:00
|
|
|
[profile.release]
|
2022-01-03 02:50:28 -07:00
|
|
|
panic = "abort"
|
2021-12-25 23:47:31 -07:00
|
|
|
lto = true
|
2022-02-06 07:51:18 -07:00
|
|
|
codegen-units = 1
|
2022-02-24 21:35:04 -07:00
|
|
|
strip = true
|
2021-12-25 23:47:31 -07:00
|
|
|
|
2021-12-11 05:30:42 -07:00
|
|
|
[profile.bench]
|
|
|
|
debug = 1
|
|
|
|
|
2021-12-19 21:40:02 -07:00
|
|
|
[profile.minimal]
|
|
|
|
inherits = "release"
|
2021-12-25 23:47:31 -07:00
|
|
|
opt-level = "z"
|
|
|
|
lto = true
|
|
|
|
codegen-units = 1
|
2021-12-19 21:40:02 -07:00
|
|
|
|
2021-12-11 05:30:42 -07:00
|
|
|
[dependencies]
|
|
|
|
tokio = { version = "1", features = ["full"] }
|
2021-12-21 06:11:46 -07:00
|
|
|
bytes = { version = "1", features = ["serde"] }
|
2022-01-01 20:51:29 -07:00
|
|
|
clap = { version = "3.0", features = ["derive"] }
|
2021-12-11 05:30:42 -07:00
|
|
|
toml = "0.5"
|
2021-12-18 23:45:52 -07:00
|
|
|
serde = { version = "1.0", features = ["derive"] }
|
2021-12-11 05:30:42 -07:00
|
|
|
anyhow = "1.0"
|
2021-12-19 03:11:09 -07:00
|
|
|
sha2 = "0.10"
|
2021-12-11 05:30:42 -07:00
|
|
|
bincode = "1"
|
2022-01-03 03:50:37 -07:00
|
|
|
lazy_static = "1.4"
|
2021-12-11 05:30:42 -07:00
|
|
|
hex = "0.4"
|
2022-01-01 20:51:29 -07:00
|
|
|
rand = "0.8"
|
2022-02-06 07:26:21 -07:00
|
|
|
backoff = { version = "0.4", features = ["tokio"] }
|
2021-12-11 05:30:42 -07:00
|
|
|
tracing = "0.1"
|
2024-02-18 02:17:17 -07:00
|
|
|
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
|
2022-01-14 00:37:09 -07:00
|
|
|
socket2 = { version = "0.4", features = ["all"] }
|
2022-01-03 03:50:37 -07:00
|
|
|
fdlimit = "0.2"
|
|
|
|
async-trait = "0.1"
|
2024-02-18 02:17:17 -07:00
|
|
|
snowstorm = { version = "0.4", optional = true, features = [
|
|
|
|
"stream",
|
|
|
|
], default-features = false }
|
2022-01-03 03:50:37 -07:00
|
|
|
base64 = { version = "0.13", optional = true }
|
2021-12-26 03:35:23 -07:00
|
|
|
notify = { version = "5.0.0-pre.13", optional = true }
|
2024-02-18 02:17:17 -07:00
|
|
|
console-subscriber = { version = "0.1", optional = true, features = [
|
|
|
|
"parking_lot",
|
|
|
|
] }
|
2022-01-11 05:59:56 -07:00
|
|
|
atty = "0.2"
|
2024-02-18 02:17:17 -07:00
|
|
|
async-http-proxy = { version = "1.2", features = [
|
|
|
|
"runtime-tokio",
|
|
|
|
"basic-auth",
|
|
|
|
] }
|
2022-03-08 03:53:25 -07:00
|
|
|
async-socks5 = "0.5"
|
|
|
|
url = { version = "2.2", features = ["serde"] }
|
2024-02-18 02:17:17 -07:00
|
|
|
tokio-tungstenite = { version = "0.20.1", optional = true }
|
|
|
|
tokio-util = { version = "0.7.9", optional = true, features = ["io"] }
|
|
|
|
futures-core = { version = "0.3.28", optional = true }
|
|
|
|
futures-sink = { version = "0.3.28", optional = true }
|
|
|
|
tokio-native-tls = { version = "0.3", optional = true }
|
|
|
|
tokio-rustls = { version = "0.25", optional = true }
|
|
|
|
rustls-native-certs = { version = "0.7", optional = true }
|
|
|
|
rustls-pemfile = { version = "2.0", optional = true }
|
|
|
|
p12 = { version = "0.6.3", optional = true }
|
2022-01-01 23:19:14 -07:00
|
|
|
|
2023-11-04 23:39:16 -06:00
|
|
|
[target.'cfg(target_env = "musl")'.dependencies]
|
|
|
|
openssl = { version = "0.10", features = ["vendored"] }
|
|
|
|
|
2022-01-01 23:19:14 -07:00
|
|
|
[build-dependencies]
|
2024-02-18 02:17:17 -07:00
|
|
|
vergen = { version = "7.4.2", default-features = false, features = [
|
|
|
|
"build",
|
|
|
|
"git",
|
|
|
|
"cargo",
|
|
|
|
] }
|
2022-01-01 23:19:14 -07:00
|
|
|
anyhow = "1.0"
|