[package]
edition = "2024"
name = "trojan-auth"
version = "0.2.3"
authors = ["0x72757374 <257538187+0x72757374@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-rs/trojan-rs"
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-rs/trojan-rs"
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",
"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.17"
optional = true
[dependencies.thiserror]
version = "2"
[dependencies.tokio]
version = "1"
features = [
"sync",
"time",
"macros",
]
optional = true
[dev-dependencies.criterion]
version = "0.5"
features = ["async_tokio"]
[dev-dependencies.tokio]
version = "1"
features = [
"rt-multi-thread",
"macros",
]