Add http feature flag with axum, hyper, hyper-util, tower, and http-body-util dependencies. Create http module with auth middleware (extracts Bearer token, calls IdentityProvider::resolve_from_token, attaches Identity to extensions) and router scaffold (default 404 fallback, no operational routes yet). Replace send_fake_nginx_404 with axum router handoff when http feature is enabled; fake 404 behavior preserved when http is disabled. Wire HttpInterface with build_router() method and pass IdentityProvider through Server to handle_connection.
56 lines
1.8 KiB
TOML
56 lines
1.8 KiB
TOML
[package]
|
|
name = "alknet-core"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
description = "Core library for Alknet: pluggable SSH tunnel transport, SOCKS5 proxy, port forwarding, and authentication"
|
|
repository.workspace = true
|
|
|
|
[lib]
|
|
name = "alknet_core"
|
|
|
|
[features]
|
|
default = []
|
|
tls = ["dep:tokio-rustls", "dep:rustls", "dep:rustls-pki-types", "dep:webpki-roots"]
|
|
iroh = ["dep:iroh", "dep:url"]
|
|
acme = ["dep:rustls-acme", "dep:futures", "tls"]
|
|
http = ["dep:axum", "dep:hyper", "dep:hyper-util", "dep:tower", "dep:http-body-util"]
|
|
irpc = []
|
|
testutil = []
|
|
transport-traits = []
|
|
|
|
[dependencies]
|
|
russh = "0.49"
|
|
tokio = { version = "1", features = ["full"] }
|
|
tracing = "0.1"
|
|
anyhow = "1"
|
|
thiserror = "2"
|
|
tokio-util = { version = "0.7", features = ["compat"] }
|
|
tokio-rustls = { version = "0.26", optional = true }
|
|
rustls = { version = "0.23", optional = true, features = ["aws_lc_rs"] }
|
|
rustls-pki-types = { version = "1", optional = true }
|
|
rustls-acme = { version = "0.12", optional = true }
|
|
futures = { version = "0.3", optional = true }
|
|
webpki-roots = { version = "0.26", optional = true }
|
|
iroh = { version = "0.34", optional = true }
|
|
url = { version = "2", optional = true }
|
|
async-trait = "0.1"
|
|
ipnetwork = "0.21.1"
|
|
arc-swap = "1"
|
|
serde = { version = "1", features = ["derive"] }
|
|
serde_json = "1"
|
|
sha2 = "0.10"
|
|
hex = "0.4"
|
|
axum = { version = "0.8", optional = true }
|
|
hyper = { version = "1", optional = true }
|
|
hyper-util = { version = "0.1", features = ["tokio", "server", "service"], optional = true }
|
|
tower = { version = "0.5", optional = true }
|
|
http-body-util = { version = "0.1", optional = true }
|
|
|
|
[dev-dependencies]
|
|
alknet-core = { path = ".", features = ["testutil", "tls", "iroh", "http"] }
|
|
tempfile = "3"
|
|
rcgen = "0.14"
|
|
rand_core = "0.6"
|
|
ssh-key = { version = "0.6", features = ["ed25519", "alloc"] }
|
|
rand = "0.10.1" |