[package]
edition = "2024"
name = "trojan-server"
version = "0.1.3"
authors = ["0x72757374 <257538187+0x72757374@users.noreply.github.com>"]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "High-performance Trojan protocol server"
homepage = "https://github.com/trojan-rs/trojan-rs"
documentation = "https://docs.rs/trojan"
readme = false
keywords = [
"trojan",
"proxy",
"tls",
"server",
]
categories = ["network-programming"]
license = "GPL-3.0-only"
repository = "https://github.com/trojan-rs/trojan-rs"
resolver = "2"
[features]
analytics = ["trojan-analytics"]
default = ["ws"]
ws = [
"tokio-tungstenite",
"trojan-core/ws",
]
[lib]
name = "trojan_server"
path = "src/lib.rs"
[[bin]]
name = "trojan-server"
path = "src/main.rs"
[[test]]
name = "integration_test"
path = "tests/integration_test.rs"
[[test]]
name = "trojan_client_test"
path = "tests/trojan_client_test.rs"
[[bench]]
name = "server"
path = "benches/server.rs"
harness = false
[dependencies.async-trait]
version = "0.1"
[dependencies.bytes]
version = "1"
[dependencies.clap]
version = "4"
features = ["derive"]
[dependencies.futures-util]
version = "0.3"
[dependencies.hex]
version = "0.4"
[dependencies.metrics]
version = "0.24"
[dependencies.metrics-exporter-prometheus]
version = "0.18"
[dependencies.parking_lot]
version = "0.12"
[dependencies.rustls]
version = "0.23"
[dependencies.rustls-pemfile]
version = "2"
[dependencies.rustls-pki-types]
version = "1"
[dependencies.serde]
version = "1"
features = ["derive"]
[dependencies.serde_json]
version = "1"
[dependencies.serde_yaml]
version = "0.9"
[dependencies.sha2]
version = "0.10"
[dependencies.socket2]
version = "0.6"
[dependencies.thiserror]
version = "2"
[dependencies.tokio]
version = "1"
features = [
"rt-multi-thread",
"macros",
"net",
"io-util",
"time",
"signal",
"sync",
]
[dependencies.tokio-rustls]
version = "0.26"
[dependencies.tokio-tungstenite]
version = "0.24"
optional = true
[dependencies.tokio-util]
version = "0.7"
[dependencies.toml]
version = "0.9"
[dependencies.tracing]
version = "0.1"
features = ["attributes"]
[dependencies.tracing-appender]
version = "0.2"
[dependencies.tracing-subscriber]
version = "0.3"
features = [
"env-filter",
"fmt",
"json",
]
[dependencies.trojan-analytics]
version = "0.1.3"
optional = true
[dependencies.trojan-auth]
version = "0.1.3"
[dependencies.trojan-config]
version = "0.1.3"
[dependencies.trojan-core]
version = "0.1.3"
[dependencies.trojan-metrics]
version = "0.1.3"
[dependencies.trojan-proto]
version = "0.1.3"
[dev-dependencies.criterion]
version = "0.5"
features = ["async_tokio"]
[dev-dependencies.rcgen]
version = "0.14"
features = [
"aws_lc_rs",
"pem",
]
default-features = false
[dev-dependencies.serde_json]
version = "1"
[dev-dependencies.tempfile]
version = "3"
[dev-dependencies.tracing-subscriber]
version = "0.3"
features = [
"env-filter",
"fmt",
]