[package]
edition = "2024"
name = "trojan-auth"
version = "0.5.2"
authors = ["trojan-rust <164051043+trojan-rust@users.noreply.github.com>"]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Authentication backends for trojan-rs"
homepage = "https://github.com/trojan-rust/trojan-rust"
documentation = "https://docs.rs/trojan"
readme = "README.md"
keywords = [
"trojan",
"proxy",
"authentication",
]
categories = [
"network-programming",
"authentication",
]
license = "GPL-3.0-only"
repository = "https://github.com/trojan-rust/trojan-rust"
resolver = "2"
[features]
cli = [
"sql",
"dep:clap",
"dep:tabled",
"tokio/rt-multi-thread",
]
default = []
sql = [
"dep:sqlx",
"dep:tokio",
]
sql-mysql = [
"sql",
"sqlx/mysql",
]
sql-postgres = [
"sql",
"sqlx/postgres",
]
sql-sqlite = [
"sql",
"sqlx/sqlite",
]
sql-tls-native = ["sqlx/tls-native-tls"]
sql-tls-rustls = ["sqlx/tls-rustls-ring"]
[lib]
name = "trojan_auth"
path = "src/lib.rs"
[[bin]]
name = "trojan-auth"
path = "src/bin/cli.rs"
required-features = ["cli"]
[[bench]]
name = "auth"
path = "benches/auth.rs"
harness = false
[dependencies.async-trait]
version = "0.1"
[dependencies.clap]
version = "4"
features = [
"derive",
"derive",
"env",
]
optional = true
[dependencies.hex]
version = "0.4"
[dependencies.parking_lot]
version = "0.12"
[dependencies.sha2]
version = "0.10"
[dependencies.sqlx]
version = "0.8"
features = [
"runtime-tokio",
"any",
]
optional = true
default-features = false
[dependencies.tabled]
version = "0.20"
optional = true
[dependencies.thiserror]
version = "2"
[dependencies.tokio]
version = "1"
features = [
"sync",
"time",
"macros",
]
optional = true
[dev-dependencies.criterion]
version = "0.8"
features = ["async_tokio"]
[dev-dependencies.tokio]
version = "1"
features = [
"rt-multi-thread",
"macros",
]
[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"