Add HTTP server for Synor Hosting with: - server/mod.rs: Gateway server using axum - server/handler.rs: Request routing to storage, content type detection - server/middleware.rs: Token bucket rate limiting, cache control, metrics - server/ssl.rs: Let's Encrypt auto-provisioning (stub) - bin/hosting-gateway.rs: CLI binary with env var config Docker deployment: - docker/hosting-gateway/Dockerfile: Multi-stage build - docker/hosting-gateway/Caddyfile: Wildcard HTTPS for *.synor.cc - docker-compose.hosting.yml: Full hosting stack with Caddy 37 tests passing.
51 lines
1.1 KiB
TOML
51 lines
1.1 KiB
TOML
[package]
|
|
name = "synor-hosting"
|
|
version = "0.1.0"
|
|
edition = "2021"
|
|
description = "Decentralized web hosting for the Synor blockchain"
|
|
license = "MIT"
|
|
authors = ["Synor Team"]
|
|
repository = "https://github.com/synor/synor"
|
|
|
|
[dependencies]
|
|
# Core
|
|
thiserror = "1"
|
|
serde = { version = "1", features = ["derive"] }
|
|
serde_json = "1"
|
|
tokio = { version = "1", features = ["full"] }
|
|
async-trait = "0.1"
|
|
|
|
# Cryptography
|
|
blake3 = "1"
|
|
ed25519-dalek = "2"
|
|
|
|
# Encoding
|
|
bs58 = "0.5"
|
|
hex = "0.4"
|
|
|
|
# DNS verification
|
|
trust-dns-resolver = { version = "0.23", optional = true }
|
|
|
|
# HTTP Server (optional, for gateway server)
|
|
axum = { version = "0.7", optional = true }
|
|
tower = { version = "0.4", optional = true }
|
|
reqwest = { version = "0.12", features = ["json"], optional = true }
|
|
|
|
# Local workspace crates
|
|
synor-types = { path = "../synor-types" }
|
|
synor-crypto = { path = "../synor-crypto" }
|
|
synor-storage = { path = "../synor-storage" }
|
|
|
|
[features]
|
|
default = []
|
|
dns = ["trust-dns-resolver"]
|
|
server = ["axum", "tower", "reqwest"]
|
|
full = ["dns", "server"]
|
|
|
|
[[bin]]
|
|
name = "hosting-gateway"
|
|
path = "src/bin/hosting-gateway.rs"
|
|
required-features = ["server"]
|
|
|
|
[dev-dependencies]
|
|
tempfile = "3"
|