From 2c4d46388a3350362bda335dc9146aa0435b5398 Mon Sep 17 00:00:00 2001 From: _ <_@_> Date: Sun, 18 Apr 2021 12:51:43 -0500 Subject: [PATCH] :pencil: docs: update README before publishing to crates.io --- Cargo.lock | 2 +- crates/ptth_server/README.md | 31 +++++++++++++++++++++++++++++++ crates/ptth_server/src/lib.rs | 32 +++++++++++++++++++++++++++++--- 3 files changed, 61 insertions(+), 4 deletions(-) create mode 100644 crates/ptth_server/README.md diff --git a/Cargo.lock b/Cargo.lock index fdbb8b8..fe92ba9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -11,7 +11,7 @@ dependencies = [ [[package]] name = "always_equal" -version = "1.0.1" +version = "1.0.2" [[package]] name = "ansi_term" diff --git a/crates/ptth_server/README.md b/crates/ptth_server/README.md new file mode 100644 index 0000000..0e82509 --- /dev/null +++ b/crates/ptth_server/README.md @@ -0,0 +1,31 @@ +# PTTH Server + +The PTTH server is an HTTP server that can serve files from +behind a firewall, because it only makes outgoing HTTP connections +to a PTTH relay. + +``` +View from outside the PTTH tunnel: + +* HTTP client +| +| HTTP(S) requests +V +* ptth_relay +^ +| HTTP(S) requests +| +* ptth_server + +View from inside the PTTH tunnel: + +* HTTP client +| +| HTTP(S) requests +V +* ptth_relay +| +| HTTP(S) requests +V +* ptth_server +``` diff --git a/crates/ptth_server/src/lib.rs b/crates/ptth_server/src/lib.rs index 94b60a1..10ef157 100644 --- a/crates/ptth_server/src/lib.rs +++ b/crates/ptth_server/src/lib.rs @@ -1,8 +1,34 @@ //! # PTTH Server //! -//! The PTTH server makes outgoing HTTP connections to a -//! PTTH relay, and then serves incoming HTTP requests through -//! the relay. +//! The PTTH server is an HTTP server that can serve files from +//! behind a firewall, because it only makes outgoing HTTP connections +//! to a PTTH relay. +//! +//! ``` +//! View from outside the PTTH tunnel: +//! +//! * HTTP client +//! | +//! | HTTP(S) requests +//! V +//! * ptth_relay +//! ^ +//! | HTTP(S) requests +//! | +//! * ptth_server +//! +//! View from inside the PTTH tunnel: +//! +//! * HTTP client +//! | +//! | HTTP(S) requests +//! V +//! * ptth_relay +//! | +//! | HTTP(S) requests +//! V +//! * ptth_server +//! ``` #![warn (clippy::pedantic)]