[package]
name = "socks5-impl"
version = "0.8.6"
authors = ["ssrlive <ssrlivebox@gmail.com>"]
description = "Fundamental abstractions and async read / write functions for SOCKS5 protocol and Relatively low-level asynchronized SOCKS5 server implementation based on tokio"
categories = ["network-programming", "asynchronous"]
keywords = ["socks5", "socks", "proxy", "async", "network"]
edition = "2024"
readme = "README.md"
license = "GPL-3.0-or-later"
repository = "https://github.com/ssrlive/socks5-impl"

[package.metadata.docs.rs]
all-features = true

[features]
# default = ["serde", "client", "server", "tokio"]
client = ["tokio"]
serde = ["dep:serde"]
server = ["tokio"]
tokio = ["dep:tokio", "async-trait"]

[dependencies]
async-trait = { version = "0.1.89", optional = true }
bytes = "1.11.1"
percent-encoding = "2.3.2"
serde = { version = "1.0.228", features = ["derive"], optional = true }
thiserror = "2.0.18"
tokio = { version = "1.52.3", default-features = false, features = [
    "net",
    "io-util",
    "time",
    "macros",
    "rt",
], optional = true }
url = "2.5.8"

[dev-dependencies]
clap = { version = "4.6.1", features = ["derive", "wrap_help"] }
ctrlc2 = { version = "4.0.0", features = ["async", "termination"] }
dotenvy = "0.15.7"
env_logger = "0.11.10"
hickory-proto = "0.26.1"
log = "0.4.32"
moka = { version = "0.12.15", features = ["future"] }
rand = "0.10.1"
tokio = { version = "1.52.3", features = ["rt-multi-thread"] }
tokio-util = { version = "0.7.18", features = [] }

[[example]]
name = "demo-client"
path = "examples/demo-client.rs"
required-features = ["client"]

[[example]]
name = "demo-server"
path = "examples/demo-server.rs"
required-features = ["tokio"]

[[example]]
name = "dns-query"
path = "examples/dns-query.rs"
required-features = ["client"]

[[example]]
name = "s5-server"
path = "examples/s5-server.rs"
required-features = ["server"]

[[example]]
name = "udp-client"
path = "examples/udp-client.rs"
required-features = ["client"]

[[example]]
name = "echo-server"
path = "examples/echo-server.rs"
required-features = ["tokio"]
