1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
[]
= "structured-proxy"
= "Universal gRPC→REST transcoding proxy — config-driven, works with any gRPC service"
= "4.0.0"
= "2021"
= ["Dmitry Prudnikov <mail@polaz.com>"]
= "Apache-2.0"
= "https://github.com/structured-world/structured-proxy"
= "https://github.com/structured-world/structured-proxy"
= "https://docs.rs/structured-proxy"
= "README.md"
= ["grpc", "rest", "proxy", "transcoding", "protobuf"]
= ["network-programming", "web-programming::http-server"]
# docs.rs builds with the `redis` feature on top of the defaults so the
# Redis-backed rate-limit store (and its intra-doc links) are documented.
[]
= ["redis"]
[[]]
= "structured-proxy"
= "src/main.rs"
[]
= "structured_proxy"
= "src/lib.rs"
[]
# HTTP framework
= { = "0.8", = ["macros"] }
= "0.5"
= { = "0.7", = ["cors", "trace"] }
# Foundational HTTP types, used directly by the framework-agnostic embedding
# hooks (src/hooks.rs) so an embedder never names `axum`. Already in the tree
# transitively via both axum and tonic; pinned here to make the public API deps
# explicit.
= "1"
= "1"
# gRPC client (to upstream service)
= "0.14"
= "0.14"
= "0.14"
# Async runtime
= { = "1", = ["full"] }
# Serialization
= { = "1", = ["derive"] }
= "1"
= "0.7"
= "0.9"
# Streaming (server-streaming RPC handler)
= "0.3"
# Protobuf reflection (REST↔gRPC transcoding)
= { = "0.16", = ["serde"] }
# Logging
= "0.1"
= { = "0.3", = ["env-filter", "json"] }
# Error handling
= "2"
= "1"
# Metrics
= "0.14"
# Rate limiting (Shield middleware)
= "6"
= "0.1"
= "2"
# Optional shared rate-limit store for multi-instance deployments.
= { = "1.2", = ["tokio-comp", "connection-manager"], = true }
# Auth (JWT validation, route policies).
# Optional: it backs the BUILT-IN verifier only. A consumer that injects its own
# `hooks::TokenVerifier` builds with `default-features = false` and links no JWT
# crypto at all. Crypto backend is selected via this crate's `rust_crypto` /
# `aws_lc_rs` features (see [features] below); `use_pem` is always required for
# PEM key parsing and is therefore enabled unconditionally.
= { = "11", = false, = [
"use_pem",
], = true }
# reqwest 0.13's `rustls` feature hardwires the aws-lc-rs provider (C FFI, awkward
# for the musl static build). We keep the pure-Rust `ring` provider instead:
# `rustls-no-provider` builds rustls without a bundled provider, and auth/jwks.rs
# hands reqwest a fully preconfigured rustls ClientConfig (ring provider + bundled
# Mozilla roots from webpki-roots). Bundling the roots keeps the binary self-
# contained, so it works on musl / scratch / distroless images with no system CA
# bundle (matching reqwest 0.12's old `rustls-tls` behaviour).
= { = "0.13", = false, = ["rustls-no-provider", "json"] }
= { = "0.23", = false, = ["ring", "std", "tls12"] }
= "1"
= "0.4"
= "0.23"
= "0.11"
= "2"
= "0.4"
# CLI
= { = "4", = ["derive"] }
= "0.7"
[]
= ["rust_crypto"]
# The built-in JWT verifier (config-driven keys: PEM file or JWKS endpoint),
# implemented with `jsonwebtoken`. Implied by both crypto backends below, so it
# is never enabled on its own. With neither backend the crate links no JWT
# crypto: `auth.mode: "jwt"` then requires a verifier injected through
# `ProxyServer::with_token_verifier`.
= ["dep:jsonwebtoken"]
# Crypto backend for the BUILT-IN verifier. Additive, like every Cargo feature:
# with both on, jsonwebtoken cannot infer a provider, so the built-in verifier
# installs `aws_lc_rs` (constant-time, advisory-free) for the process. They no
# longer decide for the whole dependency graph: a consumer that cannot accept
# this crate's choice supplies its own verifier instead (see `builtin_jwt`).
#
# `rust_crypto` (default): pure-Rust RustCrypto backend. Pulls in `rsa`, which
# carries RUSTSEC-2023-0071 (Marvin Attack). Not exploitable on our verify-only
# path (public key, no private-key ops); see deny.toml / issue #48.
= ["builtin_jwt", "jsonwebtoken/rust_crypto"]
# `aws_lc_rs`: constant-time / FIPS-capable backend via aws-lc (C FFI),
# advisory-free. Opt-in for consumers that allow FFI; enable with
# `default-features = false, features = ["aws_lc_rs"]`.
= ["builtin_jwt", "jsonwebtoken/aws_lc_rs"]
# Shared Redis-backed rate-limit store for multi-instance deployments.
= ["dep:redis"]
[]
= { = "1", = ["macros", "rt-multi-thread"] }
= { = "0.5", = ["util"] }
= "0.1"
# The embedding-hooks integration test (tests/hooks.rs) writes hook impls using
# only these (the same crates a real embedder uses — none is an HTTP framework)
# and drives the resulting router via axum + tower for assertions.
= { = "0.8", = ["macros"] }
= "1"
= "1"
= "0.1"
= "3"
= "0.10"
= "0.4"
= "0.1"