From e36f141f0bf615b322ae60a459e33deb4232cd02 Mon Sep 17 00:00:00 2001 From: Trisha <46720122+virtusense-trisha@users.noreply.github.com> Date: Tue, 5 Oct 2021 10:08:22 -0500 Subject: [PATCH 01/11] Create rust.yml --- .github/workflows/rust.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/rust.yml diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml new file mode 100644 index 0000000..7ae98f3 --- /dev/null +++ b/.github/workflows/rust.yml @@ -0,0 +1,22 @@ +name: Rust + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +env: + CARGO_TERM_COLOR: always + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Build + run: cargo build --verbose + - name: Run tests + run: cargo test --verbose From cb0c522b4df2cd84a6f29efe79e1057f00240e8d Mon Sep 17 00:00:00 2001 From: Trisha <46720122+virtusense-trisha@users.noreply.github.com> Date: Tue, 5 Oct 2021 10:11:22 -0500 Subject: [PATCH 02/11] Update rust.yml --- .github/workflows/rust.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 7ae98f3..3b8f34e 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -5,6 +5,8 @@ on: branches: [ main ] pull_request: branches: [ main ] + workflow_dispatch: + inputs: "" env: CARGO_TERM_COLOR: always From 1cc6acf86a01a3423950fd91bdd0e3bfe20c2304 Mon Sep 17 00:00:00 2001 From: Trisha <46720122+virtusense-trisha@users.noreply.github.com> Date: Tue, 5 Oct 2021 10:20:37 -0500 Subject: [PATCH 03/11] Update rust.yml --- .github/workflows/rust.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 3b8f34e..72747f6 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -6,7 +6,6 @@ on: pull_request: branches: [ main ] workflow_dispatch: - inputs: "" env: CARGO_TERM_COLOR: always From 3c328eb58fa8451203961fa56da4c65eac46d5bf Mon Sep 17 00:00:00 2001 From: Trisha Date: Tue, 19 Oct 2021 11:11:12 -0500 Subject: [PATCH 04/11] :loud_sound: improve error message --- prototypes/ptth_quic_client_gui/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prototypes/ptth_quic_client_gui/src/main.rs b/prototypes/ptth_quic_client_gui/src/main.rs index ad1c3f6..077f60a 100644 --- a/prototypes/ptth_quic_client_gui/src/main.rs +++ b/prototypes/ptth_quic_client_gui/src/main.rs @@ -224,7 +224,7 @@ fn main () -> anyhow::Result <()> { let connection_p2_p3 = rt.block_on (async move { let server_cert = match opt.cert_url.as_ref () { Some (url) => reqwest::get (url).await?.bytes ().await?, - None => tokio::fs::read ("ptth_quic_output/quic_server.crt").await?.into (), + None => tokio::fs::read ("ptth_quic_output/quic_server.crt").await.context ("can't read quic_server.crt from disk")?.into (), }; let endpoint = make_client_endpoint ("0.0.0.0:0".parse ()?, &[&server_cert])?; From 8189bc9769b78a5ed7cae9128a44771b287d8f0d Mon Sep 17 00:00:00 2001 From: Trisha Date: Tue, 19 Oct 2021 11:17:53 -0500 Subject: [PATCH 05/11] :arrow_up: fltk 1.2.8 --- Cargo.lock | 8 ++++---- prototypes/ptth_quic_client_gui/Cargo.toml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6644a46..7c6b9c6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -345,9 +345,9 @@ checksum = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" [[package]] name = "fltk" -version = "1.2.7" +version = "1.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0953c34fd5b0c6ac1b615fdcda8845c81ed364165b115ddac46ae8953d456640" +checksum = "889d9b2176b88c6f8f90ba64b0b030e52807ed1d6e416df0c15611225b40cc1d" dependencies = [ "bitflags", "fltk-sys", @@ -356,9 +356,9 @@ dependencies = [ [[package]] name = "fltk-sys" -version = "1.2.7" +version = "1.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2df700440c014123cc1644fbef7d33dcdda18cdd80373a7552a9d5cec47ca63" +checksum = "e38b2f3fb23b4bd46fc492d5d8d099b0bf766a7ab5d18b8424d93089ae934a48" dependencies = [ "cmake", ] diff --git a/prototypes/ptth_quic_client_gui/Cargo.toml b/prototypes/ptth_quic_client_gui/Cargo.toml index 23b6df2..b5f7b81 100644 --- a/prototypes/ptth_quic_client_gui/Cargo.toml +++ b/prototypes/ptth_quic_client_gui/Cargo.toml @@ -10,7 +10,7 @@ license = "AGPL-3.0" [dependencies] anyhow = "1.0.38" blake3 = "1.0.0" -fltk = "1.2.7" +fltk = "1.2.8" quic_demo = { path = "../quic_demo" } quinn = "0.7.2" rand = "0.8.4" From 3a8fdbe6cd026e1a2dc229913c51a3c4815ca548 Mon Sep 17 00:00:00 2001 From: Trisha Date: Tue, 19 Oct 2021 11:19:01 -0500 Subject: [PATCH 06/11] :recycle: refactor: extract MAX_PORTS --- prototypes/ptth_quic_client_gui/src/main.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/prototypes/ptth_quic_client_gui/src/main.rs b/prototypes/ptth_quic_client_gui/src/main.rs index 077f60a..4dba9b9 100644 --- a/prototypes/ptth_quic_client_gui/src/main.rs +++ b/prototypes/ptth_quic_client_gui/src/main.rs @@ -136,7 +136,9 @@ impl GuiClient <'_> { ports_col: &mut Flex, fltk_tx: fltk::app::Sender ) { - if self.ports.len () >= 5 { + const MAX_PORTS: usize = 5; + + if self.ports.len () >= MAX_PORTS { return; } @@ -151,7 +153,7 @@ impl GuiClient <'_> { self.ports.push (port); - if self.ports.len () >= 5 { + if self.ports.len () >= MAX_PORTS { self.but_add_port.deactivate (); } } From 33f2891773a487962ff57c3d2ee8146a53781f81 Mon Sep 17 00:00:00 2001 From: Trisha Date: Tue, 19 Oct 2021 11:19:50 -0500 Subject: [PATCH 07/11] increase max port count to 15 --- prototypes/ptth_quic_client_gui/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prototypes/ptth_quic_client_gui/src/main.rs b/prototypes/ptth_quic_client_gui/src/main.rs index 4dba9b9..13c23f7 100644 --- a/prototypes/ptth_quic_client_gui/src/main.rs +++ b/prototypes/ptth_quic_client_gui/src/main.rs @@ -136,7 +136,7 @@ impl GuiClient <'_> { ports_col: &mut Flex, fltk_tx: fltk::app::Sender ) { - const MAX_PORTS: usize = 5; + const MAX_PORTS: usize = 15; if self.ports.len () >= MAX_PORTS { return; From 1367c257e9b0a632e3ee5fcde9b8ba37060e1aa1 Mon Sep 17 00:00:00 2001 From: _ <> Date: Wed, 20 Oct 2021 09:30:29 +0000 Subject: [PATCH 08/11] :bug: bug: remove some stuff that prevented `/` from rendering in end servers --- handlebars/server/file_server_root.html | 4 ---- 1 file changed, 4 deletions(-) diff --git a/handlebars/server/file_server_root.html b/handlebars/server/file_server_root.html index 7cd63df..834e21d 100644 --- a/handlebars/server/file_server_root.html +++ b/handlebars/server/file_server_root.html @@ -22,10 +22,6 @@

{{metrics_startup.server_name}}

-

Gauges

- -

RSS MiB: {{metrics_interval.rss_mib}}

-
From d3bd1a78c5d34e69e3d1378269e5586fc4e27b90 Mon Sep 17 00:00:00 2001 From: _ <> Date: Wed, 20 Oct 2021 09:51:09 +0000 Subject: [PATCH 09/11] :bug: bug: fix bug in rendering the debug page --- handlebars/relay/debug.hbs | 2 -- 1 file changed, 2 deletions(-) diff --git a/handlebars/relay/debug.hbs b/handlebars/relay/debug.hbs index f89e422..b71df54 100644 --- a/handlebars/relay/debug.hbs +++ b/handlebars/relay/debug.hbs @@ -52,8 +52,6 @@ Lorem ipsum dolor set amet

Data sink (POST only) -

Persistent toggle is

{{persistent_toggle}}

-
From 9f4c26a8b6d4aa8537b2578a8e7811f39959a1f0 Mon Sep 17 00:00:00 2001 From: _ <> Date: Wed, 20 Oct 2021 09:51:47 +0000 Subject: [PATCH 10/11] :pencil: update copyright info and link to license and source on important pages --- README.md | 2 +- handlebars/relay/root.hbs | 11 +++++++++++ handlebars/relay/server_list.hbs | 7 +++++++ handlebars/server/file_server_dir.html | 17 +++++++++++++++-- handlebars/server/file_server_root.html | 11 +++++++++++ 5 files changed, 45 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index ebbd3fe..28617be 100644 --- a/README.md +++ b/README.md @@ -226,4 +226,4 @@ For now, either email me (if you know me personally) or make a pull request to a PTTH is licensed under the [GNU AGPLv3](https://www.gnu.org/licenses/agpl-3.0.html) -Copyright 2020 "Trish" +Copyright 2020-2021 "Trish" diff --git a/handlebars/relay/root.hbs b/handlebars/relay/root.hbs index 98391fa..6d21b64 100644 --- a/handlebars/relay/root.hbs +++ b/handlebars/relay/root.hbs @@ -14,6 +14,10 @@ .entry_list div:nth-child(odd) { background-color: #ddd; } + .fine { + color: #444; + font-size: 12px; + } PTTH relay @@ -33,5 +37,12 @@
+

+Rendered by PTTH relay server. +Copyright 2020-2021 "Trish" ReactorScram. Licensed under the +GNU AGPLv3. +Download source code +

+ diff --git a/handlebars/relay/server_list.hbs b/handlebars/relay/server_list.hbs index 04ef3f1..84376a8 100644 --- a/handlebars/relay/server_list.hbs +++ b/handlebars/relay/server_list.hbs @@ -95,6 +95,13 @@ Git version: {{git_version}} {{else}} Not built from Git {{/if}} + +

+Rendered by PTTH relay server. +Copyright 2020-2021 "Trish" ReactorScram. Licensed under the +GNU AGPLv3. +Download source code +

diff --git a/handlebars/server/file_server_dir.html b/handlebars/server/file_server_dir.html index aca7991..857daca 100644 --- a/handlebars/server/file_server_dir.html +++ b/handlebars/server/file_server_dir.html @@ -27,6 +27,10 @@ AIABAACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAA" rel="icon" type="image/x-icon" /> transition: var(--dark-mode-transition); } + .fine { + color: #444; + font-size: 12px; + } .light_switch { display: none; } @@ -40,7 +44,7 @@ AIABAACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAA" rel="icon" type="image/x-icon" /> .light_switch_label::before { content: "[ ] "; } - a { + .app a { color: var(--main-link-color); transition: var(--dark-mode-transition); } @@ -122,6 +126,15 @@ AIABAACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAA" rel="icon" type="image/x-icon" /> - + + + +

+Rendered by PTTH end server. +Copyright 2020-2021 "Trish" ReactorScram. Licensed under the +GNU AGPLv3. +Download source code +

+ diff --git a/handlebars/server/file_server_root.html b/handlebars/server/file_server_root.html index 834e21d..f55aab5 100644 --- a/handlebars/server/file_server_root.html +++ b/handlebars/server/file_server_root.html @@ -15,6 +15,10 @@ .entry_list div:nth-child(even) { background-color: #ddd; } + .fine { + color: #444; + font-size: 12px; + } {{metrics_startup.server_name}} @@ -36,5 +40,12 @@ +

+Rendered by PTTH end server. +Copyright 2020-2021 "Trish" ReactorScram. Licensed under the +GNU AGPLv3. +Download source code +

+ From 620ec2fd5b6750a44a47d78783abf7940126efbc Mon Sep 17 00:00:00 2001 From: Trisha Date: Wed, 20 Oct 2021 15:57:58 -0500 Subject: [PATCH 11/11] :pencil: todo --- todo.md | 1 + 1 file changed, 1 insertion(+) diff --git a/todo.md b/todo.md index e793417..186130c 100644 --- a/todo.md +++ b/todo.md @@ -1,6 +1,7 @@ Interesting issues will get a unique ID with `dd if=/dev/urandom bs=5 count=1 | base32` +- PTTH_QUIC: Report errors on client GUI (At least whether it's P2 or P4) - Fix long-running downloads restarting in the middle - [DMX6CO4G](issues/2021-01Jan/status-DMX6CO4G.md) fire-and-forget logs / key-value status data - ptth_tail