Skip to content

Commit

Permalink
fix broken links + align doc(inline)
Browse files Browse the repository at this point in the history
  • Loading branch information
GlenDC committed Sep 5, 2024
1 parent 9631c79 commit 9093db3
Show file tree
Hide file tree
Showing 20 changed files with 63 additions and 15 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ This framework comes with 🔋 batteries included, giving you the full freedome
|[transports](https://ramaproxy.org/docs/rama/net/stream/index.html) |[tcp](https://ramaproxy.org/docs/rama/tcp/index.html) ⸱ 🏗️ udp <sup>(2)</sup> ⸱ ✅ [middleware](https://ramaproxy.org/docs/rama/net/stream/layer/index.html) |
|[http](https://ramaproxy.org/docs/rama/http/index.html) |[auto](https://ramaproxy.org/docs/rama/http/server/service/struct.HttpServer.html#method.auto) ⸱ ✅ [http/1.1](https://ramaproxy.org/docs/rama/http/server/service/struct.HttpServer.html#method.http1) ⸱ ✅ [h2](https://ramaproxy.org/docs/rama/http/server/service/struct.HttpServer.html#method.h2) ⸱ 🏗️ h3 <sup>(2)</sup> ⸱ ✅ [middleware](https://ramaproxy.org/docs/rama/http/layer/index.html) |
| ✅ web server |[fs](https://ramaproxy.org/docs/rama/http/service/fs/index.html) ⸱ ✅ [redirect](https://ramaproxy.org/docs/rama/http/service/redirect/struct.Redirect.html) ⸱ ✅ [dyn router](https://ramaproxy.org/docs/rama/http/service/web/struct.WebService.html) ⸱ ✅ [static router](https://ramaproxy.org/docs/rama/http/service/web/macro.match_service.html) ⸱ ✅ [handler extractors](https://ramaproxy.org/docs/rama/http/service/web/extract/index.html) ⸱ ✅ [k8s healthcheck](https://ramaproxy.org/docs/rama/http/service/web/k8s/index.html) |
| ✅ http [client](https://ramaproxy.org/docs/rama/http/client/index.html) |[client](https://ramaproxy.org/docs/rama/http/client/struct.HttpClient.html) ⸱ ✅ [high level API](https://ramaproxy.org/docs/rama/http/service/client/trait.HttpClientExt.html) ⸱ ✅ [Proxy Connect](https://ramaproxy.org/docs/rama/proxy/http/client/layer/struct.HttpProxyConnector.html) ⸱ ❌ [Chromium Http](https://github.com/plabayo/rama/issues/189) <sup>(3)</sup> |
|[tls](https://ramaproxy.org/docs/rama/tls/index.html) |[Rustls](https://ramaproxy.org/docs/rama/tls/backend/rustls/index.html) ⸱ ✅ [BoringSSL](https://ramaproxy.org/docs/rama/tls/backend/boring/index.html) ⸱ ❌ NSS <sup>(3)</sup> |
| ✅ http [client](https://ramaproxy.org/docs/rama/http/client/index.html) |[client](https://ramaproxy.org/docs/rama/http/client/struct.HttpClient.html) ⸱ ✅ [high level API](https://ramaproxy.org/docs/rama/http/service/client/trait.HttpClientExt.html) ⸱ ✅ [Proxy Connect](https://ramaproxy.org/docs/rama/http/client/proxy/layer/struct.HttpProxyConnector.html) ⸱ ❌ [Chromium Http](https://github.com/plabayo/rama/issues/189) <sup>(3)</sup> |
|[tls](https://ramaproxy.org/docs/rama/tls/index.html) |[Rustls](https://ramaproxy.org/docs/rama/tls/rustls/index.html) ⸱ ✅ [BoringSSL](https://ramaproxy.org/docs/rama/tls/boring/index.html) ⸱ ❌ NSS <sup>(3)</sup> |
|[dns](https://ramaproxy.org/docs/rama/dns/index.html) |[DNS Resolver](https://ramaproxy.org/docs/rama/dns/struct.Dns.html) |
|[proxy protocols](https://ramaproxy.org/docs/rama/proxy/index.html) |[PROXY protocol](https://ramaproxy.org/docs/rama/proxy/haproxy/index.html) ⸱ ✅ [http proxy](https://github.com/plabayo/rama/blob/main/examples/http_connect_proxy.rs) ⸱ ✅ [https proxy](https://github.com/plabayo/rama/blob/main/examples/https_connect_proxy.rs) ⸱ 🏗️ SOCKS5 <sup>(1)</sup> ⸱ 🏗️ SOCKS5H <sup>(1)</sup> |
| 🏗️ web protocols | 🏗️ Web Sockets (WS) <sup>(2)</sup> ⸱ 🏗️ WSS <sup>(2)</sup> ⸱ ❌ Web Transport <sup>(3)</sup> ⸱ ❌ gRPC <sup>(3)</sup> |
Expand Down
2 changes: 1 addition & 1 deletion docs/book/src/intro/user_agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Rama offers support to:

More Information:

* ⛰️ The source code for User Agent (UA) support can be found at <https://github.com/plabayo/rama/tree/main/src/ua>;
* ⛰️ The source code for User Agent (UA) support can be found at <https://github.com/plabayo/rama/tree/main/rama-ua/src>;
* 📖 and the edge documentation for it can be found at <https://ramaproxy.org/docs/rama/ua/index.html>.

## Fingerprinting
Expand Down
4 changes: 2 additions & 2 deletions docs/book/src/preface.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ This framework comes with 🔋 batteries included, giving you the full freedome
|[transports](https://ramaproxy.org/docs/rama/net/stream/index.html) |[tcp](https://ramaproxy.org/docs/rama/tcp/index.html) ⸱ 🏗️ udp <sup>(2)</sup> ⸱ ✅ [middleware](https://ramaproxy.org/docs/rama/net/stream/layer/index.html) |
|[http](https://ramaproxy.org/docs/rama/http/index.html) |[auto](https://ramaproxy.org/docs/rama/http/server/service/struct.HttpServer.html#method.auto) ⸱ ✅ [http/1.1](https://ramaproxy.org/docs/rama/http/server/service/struct.HttpServer.html#method.http1) ⸱ ✅ [h2](https://ramaproxy.org/docs/rama/http/server/service/struct.HttpServer.html#method.h2) ⸱ 🏗️ h3 <sup>(2)</sup> ⸱ ✅ [middleware](https://ramaproxy.org/docs/rama/http/layer/index.html) |
| ✅ web server |[fs](https://ramaproxy.org/docs/rama/http/service/fs/index.html) ⸱ ✅ [redirect](https://ramaproxy.org/docs/rama/http/service/redirect/struct.Redirect.html) ⸱ ✅ [dyn router](https://ramaproxy.org/docs/rama/http/service/web/struct.WebService.html) ⸱ ✅ [static router](https://ramaproxy.org/docs/rama/http/service/web/macro.match_service.html) ⸱ ✅ [handler extractors](https://ramaproxy.org/docs/rama/http/service/web/extract/index.html) ⸱ ✅ [k8s healthcheck](https://ramaproxy.org/docs/rama/http/service/web/k8s/index.html) |
| ✅ http [client](https://ramaproxy.org/docs/rama/http/client/index.html) |[client](https://ramaproxy.org/docs/rama/http/client/struct.HttpClient.html) ⸱ ✅ [high level API](https://ramaproxy.org/docs/rama/http/service/client/trait.HttpClientExt.html) ⸱ ✅ [Proxy Connect](https://ramaproxy.org/docs/rama/proxy/http/client/layer/struct.HttpProxyConnector.html) ⸱ ❌ [Chromium Http](https://github.com/plabayo/rama/issues/189) <sup>(3)</sup> |
|[tls](https://ramaproxy.org/docs/rama/tls/index.html) |[Rustls](https://ramaproxy.org/docs/rama/tls/backend/rustls/index.html) ⸱ ✅ [BoringSSL](https://ramaproxy.org/docs/rama/tls/backend/boring/index.html) ⸱ ❌ NSS <sup>(3)</sup> |
| ✅ http [client](https://ramaproxy.org/docs/rama/http/client/index.html) |[client](https://ramaproxy.org/docs/rama/http/client/struct.HttpClient.html) ⸱ ✅ [high level API](https://ramaproxy.org/docs/rama/http/service/client/trait.HttpClientExt.html) ⸱ ✅ [Proxy Connect](https://ramaproxy.org/docs/rama/http/client/proxy/layer/struct.HttpProxyConnector.html) ⸱ ❌ [Chromium Http](https://github.com/plabayo/rama/issues/189) <sup>(3)</sup> |
|[tls](https://ramaproxy.org/docs/rama/tls/index.html) |[Rustls](https://ramaproxy.org/docs/rama/tls/rustls/index.html) ⸱ ✅ [BoringSSL](https://ramaproxy.org/docs/rama/tls/boring/index.html) ⸱ ❌ NSS <sup>(3)</sup> |
|[dns](https://ramaproxy.org/docs/rama/dns/index.html) |[DNS Resolver](https://ramaproxy.org/docs/rama/dns/struct.Dns.html) |
|[proxy protocols](https://ramaproxy.org/docs/rama/proxy/index.html) |[PROXY protocol](https://ramaproxy.org/docs/rama/proxy/haproxy/index.html) ⸱ ✅ [http proxy](https://github.com/plabayo/rama/blob/main/examples/http_connect_proxy.rs) ⸱ ✅ [https proxy](https://github.com/plabayo/rama/blob/main/examples/https_connect_proxy.rs) ⸱ 🏗️ SOCKS5 <sup>(1)</sup> ⸱ 🏗️ SOCKS5H <sup>(1)</sup> |
| 🏗️ web protocols | 🏗️ Web Sockets (WS) <sup>(2)</sup> ⸱ 🏗️ WSS <sup>(2)</sup> ⸱ ❌ Web Transport <sup>(3)</sup> ⸱ ❌ gRPC <sup>(3)</sup> |
Expand Down
3 changes: 2 additions & 1 deletion rama-core/src/graceful.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//! Shutdown management for graceful shutdown of async-first applications.
pub use tokio_graceful::{default_signal, Shutdown, ShutdownGuard, WeakShutdownGuard};
#[doc(inline)]
pub use ::tokio_graceful::{default_signal, Shutdown, ShutdownGuard, WeakShutdownGuard};
1 change: 1 addition & 0 deletions rama-core/src/telemetry/opentelemetry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
//! This module re-exports the crates supported and used by rama for (open) telemetry,
//! such that you can make use of it for custom metrics, registries and more.
#[doc(inline)]
pub use ::opentelemetry::*;

#[doc(inline)]
Expand Down
2 changes: 1 addition & 1 deletion rama-error/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ pub use ext::{ErrorContext, ErrorExt, OpaqueError};

mod macros;
#[doc(inline)]
pub use crate::__error as error;
pub use macros::error;

#[cfg(test)]
mod test {
Expand Down
3 changes: 2 additions & 1 deletion rama-error/src/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
/// let err = error!("An error occurred: {}", 42);
/// let err = error!(std::io::Error::new(std::io::ErrorKind::Other, "oh no!"));
/// ```
#[macro_export]
#[doc(hidden)]
#[macro_export]
macro_rules! __error {
($msg:literal $(,)?) => ({
$crate::OpaqueError::from_display($msg)
Expand All @@ -25,3 +25,4 @@ macro_rules! __error {
$crate::OpaqueError::from_std($err)
});
}
pub use crate::__error as error;
5 changes: 5 additions & 0 deletions rama-http-types/src/headers/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,10 @@
//! }
//! ```
#[doc(inline)]
pub use headers::{Header, HeaderMapExt};

#[doc(inline)]
pub use headers::{
AcceptRanges, AccessControlAllowCredentials, AccessControlAllowHeaders,
AccessControlAllowMethods, AccessControlAllowOrigin, AccessControlExposeHeaders,
Expand All @@ -79,9 +81,12 @@ pub use headers::{
pub mod authorization {
//! Authorization header and types.
#[doc(inline)]
pub use headers::authorization::Credentials;
#[doc(inline)]
pub use headers::authorization::{Authorization, Basic, Bearer};
}

mod ext;
#[doc(inline)]
pub use ext::HeaderExt;
14 changes: 11 additions & 3 deletions rama-http-types/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,12 @@
#![cfg_attr(not(test), warn(clippy::print_stdout, clippy::dbg_macro))]

pub(crate) mod body;
#[doc(inline)]
pub use body::{Body, BodyDataStream};

mod body_limit;
#[doc(inline)]
pub use body_limit::BodyLimit;

mod body_ext;
#[doc(inline)]
pub use body_ext::BodyExtractExt;

/// Type alias for [`http::Request`] whose body type
Expand All @@ -87,6 +84,7 @@ pub mod dep {
//!
//! [`http`]: https://docs.rs/http
#[doc(inline)]
pub use http::*;
}

Expand All @@ -97,6 +95,7 @@ pub mod dep {
//!
//! [`http-body`]: https://docs.rs/http-body
#[doc(inline)]
pub use http_body::*;
}

Expand All @@ -108,6 +107,7 @@ pub mod dep {
//! [`http-body`]: https://docs.rs/http-body
//! [`http-body-util`]: https://docs.rs/http-body-util
#[doc(inline)]
pub use http_body_util::*;
}

Expand All @@ -118,6 +118,7 @@ pub mod dep {
//!
//! [`mime`]: https://docs.rs/mime
#[doc(inline)]
pub use mime::*;
}

Expand All @@ -128,13 +129,15 @@ pub mod dep {
//!
//! [`mime_guess`]: https://docs.rs/mime_guess
#[doc(inline)]
pub use mime_guess::*;
}
}

pub mod header {
//! HTTP header types
#[doc(inline)]
pub use crate::dep::http::header::*;

macro_rules! static_header {
Expand Down Expand Up @@ -169,8 +172,13 @@ pub mod header {
);
}

#[doc(inline)]
pub use self::dep::http::header::{HeaderMap, HeaderName, HeaderValue};
#[doc(inline)]
pub use self::dep::http::method::Method;
#[doc(inline)]
pub use self::dep::http::status::StatusCode;
#[doc(inline)]
pub use self::dep::http::uri::{Scheme, Uri};
#[doc(inline)]
pub use self::dep::http::version::Version;
11 changes: 8 additions & 3 deletions rama-http/src/headers/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,10 @@
//! }
//! ```
#[doc(inline)]
pub use rama_http_types::headers::{Header, HeaderMapExt};

#[doc(inline)]
pub use rama_http_types::headers::{
AcceptRanges, AccessControlAllowCredentials, AccessControlAllowHeaders,
AccessControlAllowMethods, AccessControlAllowOrigin, AccessControlExposeHeaders,
Expand All @@ -90,11 +92,14 @@ pub use forwarded::{
pub mod authorization {
//! Authorization header and types.
pub use headers::authorization::Credentials;
pub use headers::authorization::{Authorization, Basic, Bearer};
#[doc(inline)]
pub use ::headers::authorization::Credentials;
#[doc(inline)]
pub use ::headers::authorization::{Authorization, Basic, Bearer};
}

pub use rama_http_types::headers::HeaderExt;
#[doc(inline)]
pub use ::rama_http_types::headers::HeaderExt;

pub(crate) mod util;
pub use util::quality_value::{Quality, QualityValue};
2 changes: 2 additions & 0 deletions rama-http/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
#![cfg_attr(test, allow(clippy::float_cmp))]
#![cfg_attr(not(test), warn(clippy::print_stdout, clippy::dbg_macro))]

#[doc(inline)]
pub use ::rama_http_types::{
header,
response::{self, IntoResponse, Response},
Expand All @@ -76,5 +77,6 @@ pub mod dep {
//!
//! Exported for your convenience.
#[doc(inline)]
pub use ::rama_http_types::dep::{http, http_body, http_body_util, mime, mime_guess};
}
2 changes: 1 addition & 1 deletion rama-http/src/service/web/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ macro_rules! __match_service {
}

#[doc(inline)]
pub use __match_service as match_service;
pub use crate::__match_service as match_service;

#[cfg(test)]
mod test {
Expand Down
1 change: 1 addition & 0 deletions rama-net/src/stream/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ pub mod dep {
//!
//! [`ipnet`]: https://docs.rs/ipnet
#[doc(inline)]
pub use ipnet::*;
}
}
2 changes: 2 additions & 0 deletions rama-proxy/src/proxydb/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,14 @@ mod update;
pub use update::{proxy_db_updater, LiveUpdateProxyDB, LiveUpdateProxyDBSetter};

mod internal;
#[doc(inline)]
pub use internal::Proxy;

#[cfg(feature = "csv")]
mod csv;

#[cfg(feature = "csv")]
#[doc(inline)]
pub use csv::{ProxyCsvRowReader, ProxyCsvRowReaderError, ProxyCsvRowReaderErrorKind};

pub(super) mod layer;
Expand Down
2 changes: 2 additions & 0 deletions rama-tls/src/boring/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,15 @@ pub mod dep {
//!
//! [`boring`]: https://docs.rs/boring
#[doc(inline)]
pub use boring::*;
}

pub mod tokio_boring {
//! Full Re-export of the [`tokio-boring`] crate.
//!
//! [`tokio-boring`]: https://docs.rs/tokio-boring
#[doc(inline)]
pub use tokio_boring::*;
}
}
2 changes: 2 additions & 0 deletions rama-tls/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ pub use boring as std;

pub mod types {
//! common tls types
#[doc(inline)]
pub use ::rama_net::tls::{
client, ApplicationProtocol, CipherSuite, CompressionAlgorithm, ECPointFormat, ExtensionId,
HttpsTunnel, ProtocolVersion, SecureTransport, SignatureScheme, SupportedGroup,
Expand All @@ -84,6 +85,7 @@ pub mod dep {
//!
//! [`rcgen`]: https://docs.rs/rcgen
#[doc(inline)]
pub use rcgen::*;
}
}
10 changes: 10 additions & 0 deletions rama-tls/src/rustls/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ pub mod dep {
//!
//! [`pki-types`]: https://docs.rs/rustls-pki-types
#[doc(inline)]
pub use rustls_pki_types::*;
}

Expand All @@ -23,6 +24,7 @@ pub mod dep {
//! A basic parser for .pem files containing cryptographic keys and certificates.
//!
//! [`rustls-pemfile`]: https://docs.rs/rustls-pemfile
#[doc(inline)]
pub use rustls_pemfile::*;
}

Expand All @@ -33,6 +35,7 @@ pub mod dep {
//! store when operating as a TLS client.
//!
//! [`rustls-native-certs`]: https://docs.rs/rustls-native-certs
#[doc(inline)]
pub use rustls_native_certs::*;
}

Expand All @@ -45,6 +48,7 @@ pub mod dep {
//! [`tokio-rustls`]: https://docs.rs/tokio-rustls
//! [`TlsAcceptorLayer`]: crate::rustls::server::TlsAcceptorLayer
#[doc(inline)]
pub use rustls::*;

pub mod client {
Expand All @@ -53,7 +57,9 @@ pub mod dep {
//! [`rustls`]: https://docs.rs/rustls
//! [`tokio-rustls`]: https://docs.rs/tokio-rustls
#[doc(inline)]
pub use rustls::client::*;
#[doc(inline)]
pub use tokio_rustls::client::TlsStream;
}

Expand All @@ -63,7 +69,9 @@ pub mod dep {
//! [`rustls`]: https://docs.rs/rustls
//! [`tokio-rustls`]: https://docs.rs/tokio-rustls
#[doc(inline)]
pub use rustls::server::*;
#[doc(inline)]
pub use tokio_rustls::server::TlsStream;
}
}
Expand All @@ -72,6 +80,7 @@ pub mod dep {
//! Full Re-export of the [`tokio-rustls`] crate.
//!
//! [`tokio-rustls`]: https://docs.rs/tokio-rustls
#[doc(inline)]
pub use tokio_rustls::*;
}

Expand All @@ -81,6 +90,7 @@ pub mod dep {
//! This crate provides a function to load the Mozilla root CA store.
//!
//! [`webpki-roots`]: https://docs.rs/webpki-roots
#[doc(inline)]
pub use webpki_roots::*;
}
}
1 change: 1 addition & 0 deletions rama-utils/src/macros/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,5 @@ macro_rules! __static_str_error {
impl std::error::Error for $name {}
}
}
#[doc(inline)]
pub use crate::__static_str_error as static_str_error;
Loading

0 comments on commit 9093db3

Please sign in to comment.