From f654fc0b8a7d86eab559129e206fe3d0543d3802 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Wed, 8 Apr 2026 18:37:18 +0300 Subject: Route f3s.buetow.org to Pi static backends --- frontends/etc/hosts.wg.append | 4 ++++ frontends/etc/relayd.conf.tpl | 15 ++++++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/frontends/etc/hosts.wg.append b/frontends/etc/hosts.wg.append index f410d66..3da6a50 100644 --- a/frontends/etc/hosts.wg.append +++ b/frontends/etc/hosts.wg.append @@ -7,6 +7,8 @@ 192.168.2.130 f0.wg0.wan.buetow.org f0.wg0 192.168.2.131 f1.wg0.wan.buetow.org f1.wg0 192.168.2.132 f2.wg0.wan.buetow.org f2.wg0 +192.168.2.203 pi0.wg0.wan.buetow.org pi0.wg0 +192.168.2.204 pi1.wg0.wan.buetow.org pi1.wg0 192.168.2.200 earth.wg0.wan.buetow.org earth.wg0 192.168.2.201 pixel7pro.wg0.wan.buetow.org pixel7pro.wg0 @@ -18,5 +20,7 @@ fd42:beef:cafe:2::122 r2.wg0.wan.buetow.org r2.wg0 fd42:beef:cafe:2::130 f0.wg0.wan.buetow.org f0.wg0 fd42:beef:cafe:2::131 f1.wg0.wan.buetow.org f1.wg0 fd42:beef:cafe:2::132 f2.wg0.wan.buetow.org f2.wg0 +fd42:beef:cafe:2::203 pi0.wg0.wan.buetow.org pi0.wg0 +fd42:beef:cafe:2::204 pi1.wg0.wan.buetow.org pi1.wg0 fd42:beef:cafe:2::200 earth.wg0.wan.buetow.org earth.wg0 fd42:beef:cafe:2::201 pixel7pro.wg0.wan.buetow.org pixel7pro.wg0 diff --git a/frontends/etc/relayd.conf.tpl b/frontends/etc/relayd.conf.tpl index 79d3e57..3009622 100644 --- a/frontends/etc/relayd.conf.tpl +++ b/frontends/etc/relayd.conf.tpl @@ -8,6 +8,12 @@ table { 192.168.2.122 } +# Static f3s landing page served from the Raspberry Pi HTTP nodes over WireGuard +table { + 192.168.2.203 + 192.168.2.204 +} + # Same backends, separate table for registry service on port 30001 table { 192.168.2.120 @@ -74,7 +80,10 @@ http protocol "https" { # Registry is special: needs explicit routing to port 30001 <% for my $host (@$f3s_hosts) { for my $prefix (@prefixes) { - if ($host eq 'registry.f3s.buetow.org') { + if ($host eq 'f3s.buetow.org') { + -%> + match request header "Host" value "<%= $prefix.$host -%>" forward to + <% } elsif ($host eq 'registry.f3s.buetow.org') { -%> match request header "Host" value "<%= $prefix.$host -%>" forward to <% } elsif ($host eq 'jellyfin.f3s.buetow.org') { @@ -99,6 +108,8 @@ relay "https4" { session timeout 300 # Primary: f3s cluster (with health checks) - Falls back to localhost when all hosts down forward to port 80 check tcp + # Static landing page served from pi0/pi1 instead of k3s + forward to port 80 check tcp forward to port 8080 # Registry uses separate port and table forward to port 30001 check tcp @@ -114,6 +125,8 @@ relay "https6" { session timeout 300 # Primary: f3s cluster (with health checks) - Falls back to localhost when all hosts down forward to port 80 check tcp + # Static landing page served from pi0/pi1 instead of k3s + forward to port 80 check tcp forward to port 8080 # Registry uses separate port and table forward to port 30001 check tcp -- cgit v1.2.3