From a838d80d3831605bdd8bf97cdd961416b222ad62 Mon Sep 17 00:00:00 2001 From: _ <_@_> Date: Sat, 31 Dec 2022 03:06:23 +0000 Subject: [PATCH 1/4] :bug: bug: also hack in content-type for HTML pages --- crates/ptth_server/src/file_server.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crates/ptth_server/src/file_server.rs b/crates/ptth_server/src/file_server.rs index 3c13674..8b1d873 100644 --- a/crates/ptth_server/src/file_server.rs +++ b/crates/ptth_server/src/file_server.rs @@ -220,6 +220,9 @@ async fn serve_file ( if uri.ends_with (".js") { response.header ("content-type".into (), b"application/javascript".to_vec ()); } + else if uri.ends_with (".html") { + response.header ("content-type".into (), b"text/html; charset=UTF-8".to_vec ()); + } response.header ("content-length".into (), content_length.to_string ().into_bytes ()); From 82cef9cfd67014ac9b656650c15eda93bf318e09 Mon Sep 17 00:00:00 2001 From: _ <_@_> Date: Sat, 7 Jan 2023 00:10:11 +0000 Subject: [PATCH 2/4] :pencil: docs: add the new PTTH repo on self-hosted Gitea to all Cargo.toml files --- Cargo.toml | 1 + crates/always_equal/Cargo.toml | 1 + crates/ptth_core/Cargo.toml | 1 + crates/ptth_quic/Cargo.toml | 2 ++ crates/ptth_quic_client_gui/Cargo.toml | 2 ++ crates/ptth_relay/Cargo.toml | 1 + crates/ptth_server/Cargo.toml | 1 + crates/ptth_server_gui/Cargo.toml | 2 ++ 8 files changed, 11 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index 038decc..129230b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,6 +7,7 @@ edition = "2018" license = "AGPL-3.0" description = "An extroverted HTTP server that can run behind firewalls" +repository = "https://six-five-six-four.com/git/reactor/ptth" readme = "README.md" keywords = ["http", "tunnel", "firewall"] categories = ["command-line-utilities", "web-programming::http-server"] diff --git a/crates/always_equal/Cargo.toml b/crates/always_equal/Cargo.toml index 62c9ba8..00bbe3c 100644 --- a/crates/always_equal/Cargo.toml +++ b/crates/always_equal/Cargo.toml @@ -6,5 +6,6 @@ edition = "2018" license = "AGPL-3.0" description = "A wrapper for types that can't implement Eq" +repository = "https://six-five-six-four.com/git/reactor/ptth" [dependencies] diff --git a/crates/ptth_core/Cargo.toml b/crates/ptth_core/Cargo.toml index 566d6e5..927368c 100644 --- a/crates/ptth_core/Cargo.toml +++ b/crates/ptth_core/Cargo.toml @@ -7,6 +7,7 @@ edition = "2018" license = "AGPL-3.0" description = "Common code for the PTTH relay and server" +repository = "https://six-five-six-four.com/git/reactor/ptth" [dependencies] diff --git a/crates/ptth_quic/Cargo.toml b/crates/ptth_quic/Cargo.toml index 7e43a9f..9bf762a 100644 --- a/crates/ptth_quic/Cargo.toml +++ b/crates/ptth_quic/Cargo.toml @@ -5,6 +5,8 @@ authors = ["Trish"] edition = "2018" license = "AGPL-3.0" +repository = "https://six-five-six-four.com/git/reactor/ptth" + # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] diff --git a/crates/ptth_quic_client_gui/Cargo.toml b/crates/ptth_quic_client_gui/Cargo.toml index e04bcbd..e295dbc 100644 --- a/crates/ptth_quic_client_gui/Cargo.toml +++ b/crates/ptth_quic_client_gui/Cargo.toml @@ -5,6 +5,8 @@ authors = ["Trish"] edition = "2018" license = "AGPL-3.0" +repository = "https://six-five-six-four.com/git/reactor/ptth" + # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] diff --git a/crates/ptth_relay/Cargo.toml b/crates/ptth_relay/Cargo.toml index 28dae70..a818640 100644 --- a/crates/ptth_relay/Cargo.toml +++ b/crates/ptth_relay/Cargo.toml @@ -7,6 +7,7 @@ edition = "2018" license = "AGPL-3.0" description = "The PTTH relay" +repository = "https://six-five-six-four.com/git/reactor/ptth" [dependencies] diff --git a/crates/ptth_server/Cargo.toml b/crates/ptth_server/Cargo.toml index 76f61fb..7ffd266 100644 --- a/crates/ptth_server/Cargo.toml +++ b/crates/ptth_server/Cargo.toml @@ -8,6 +8,7 @@ license = "AGPL-3.0" categories = ["command-line-utilities", "web-programming::http-server"] description = "The server for PTTH" +repository = "https://six-five-six-four.com/git/reactor/ptth" documentation = "https://docs.rs/ptth_server/" default-run = "ptth_server" diff --git a/crates/ptth_server_gui/Cargo.toml b/crates/ptth_server_gui/Cargo.toml index 8d210a7..bcff2c2 100644 --- a/crates/ptth_server_gui/Cargo.toml +++ b/crates/ptth_server_gui/Cargo.toml @@ -4,6 +4,8 @@ version = "0.1.0" authors = ["Trish"] edition = "2018" +repository = "https://six-five-six-four.com/git/reactor/ptth" + [dependencies] anyhow = "1.0.38" fltk = "1.3.1" From cce326435b74de11ec057a70a544174213933b4f Mon Sep 17 00:00:00 2001 From: _ <_@_> Date: Sat, 7 Jan 2023 00:13:39 +0000 Subject: [PATCH 3/4] :sparkles: release: bump always_equal to v1.0.3 so I can push the doc fix to crates.io --- crates/always_equal/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/always_equal/Cargo.toml b/crates/always_equal/Cargo.toml index 00bbe3c..babdc4a 100644 --- a/crates/always_equal/Cargo.toml +++ b/crates/always_equal/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "always_equal" -version = "1.0.2" +version = "1.0.3" authors = ["Trish"] edition = "2018" license = "AGPL-3.0" From 2a909307230475597ffdf9cff3d4e670572a83db Mon Sep 17 00:00:00 2001 From: _ <_@_> Date: Mon, 28 Aug 2023 19:54:48 -0500 Subject: [PATCH 4/4] :package: build: set up `cargo-deb` configuration for `ptth_multi_call_server` --- Cargo.lock | 4 ++-- crates/ptth_multi_call_server/Cargo.toml | 12 +++++++++++- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c138489..ac511eb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -13,7 +13,7 @@ dependencies = [ [[package]] name = "always_equal" -version = "1.0.2" +version = "1.0.3" [[package]] name = "ansi_term" @@ -1245,7 +1245,7 @@ dependencies = [ [[package]] name = "ptth_multi_call_server" -version = "0.1.0" +version = "1.1.1" dependencies = [ "anyhow", "ctrlc", diff --git a/crates/ptth_multi_call_server/Cargo.toml b/crates/ptth_multi_call_server/Cargo.toml index 7db5ed4..1a46008 100644 --- a/crates/ptth_multi_call_server/Cargo.toml +++ b/crates/ptth_multi_call_server/Cargo.toml @@ -1,6 +1,10 @@ [package] name = "ptth_multi_call_server" -version = "0.1.0" + +# Keep this synced with the Debian package name +# dpkg doesn't let us do side-by-side versioning, shrug +version = "1.1.1" + authors = ["Trish"] edition = "2018" license = "AGPL-3.0" @@ -31,3 +35,9 @@ tracing = "0.1.25" version = "0.11.1" default-features = false features = ["stream", "rustls-tls", "hyper-rustls"] + +[package.metadata.deb] +assets = [ + ["target/release/ptth_multi_call_server", "usr/bin/ptth_multi_call_server_1.1", "755"], +] +name = "ptth-multi-call-server-1.1"