trojan-server 0.9.1

High-performance Trojan protocol server
Documentation
# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
edition = "2024"
name = "trojan-server"
version = "0.9.1"
authors = ["trojan-rust <164051043+trojan-rust@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-rust/trojan-rust"
documentation = "https://docs.rs/trojan"
readme = "README.md"
keywords = [
    "trojan",
    "proxy",
    "tls",
    "server",
]
categories = ["network-programming"]
license = "GPL-3.0-only"
repository = "https://github.com/trojan-rust/trojan-rust"
resolver = "2"

[features]
analytics = ["trojan-analytics"]
ddns = ["trojan-ddns"]
default = [
    "ws",
    "rules",
    "ddns",
]
geoip = [
    "rules",
    "trojan-rules/geoip",
]
rules = [
    "trojan-rules",
    "dep:webpki-roots",
    "dep:arc-swap",
]
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.arc-swap]
version = "1"
optional = true

[dependencies.async-trait]
version = "0.1"

[dependencies.axum]
version = "0.8"

[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"
features = [
    "aws_lc_rs",
    "logging",
    "std",
    "tls12",
]
default-features = false

[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.28"
optional = true

[dependencies.tokio-util]
version = "0.7"

[dependencies.toml]
version = "1"

[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.9.1"
optional = true

[dependencies.trojan-auth]
version = "0.9.1"
features = ["http"]

[dependencies.trojan-config]
version = "0.9.1"

[dependencies.trojan-core]
version = "0.9.1"

[dependencies.trojan-ddns]
version = "0.9.1"
optional = true

[dependencies.trojan-dns]
version = "0.9.1"

[dependencies.trojan-metrics]
version = "0.9.1"

[dependencies.trojan-proto]
version = "0.9.1"

[dependencies.trojan-rules]
version = "0.9.1"
optional = true

[dependencies.webpki-roots]
version = "1"
optional = true

[dev-dependencies.criterion]
version = "0.8"
features = ["async_tokio"]

[dev-dependencies.ctor]
version = "0.6"

[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",
]

[target.'cfg(target_os = "linux")'.dependencies.libc]
version = "0.2"

[lints.clippy]
assertions_on_result_states = "warn"
cast_possible_truncation = "warn"
cast_possible_wrap = "warn"
cast_sign_loss = "warn"
error_impl_error = "warn"
exit = "warn"
or_fun_call = "warn"
ptr_as_ptr = "warn"
tests_outside_test_module = "warn"
undocumented_unsafe_blocks = "warn"

[lints.rust]
missing_debug_implementations = "warn"