fix: keep probe files across hub restarts; phone filter sheet above the tab bar (2.1.2)
CI / Format and vet (push) Successful in 1m4s
CI / Dependency audit (push) Successful in 33s
CI / Tests (Linux, race detector) (push) Successful in 2m10s
Release / Plan (reuse the published image?) (push) Successful in 5s
Release / ci (push) Skipped
Release / Build hub image (amd64) (push) Skipped
Release / Build probe image (amd64) (push) Skipped
Release / Build hub image (arm64) (push) Skipped
Release / Build probe image (arm64) (push) Skipped
Release / Publish tags (hub) (push) Successful in 16s
Release / Publish tags (probe) (push) Successful in 16s
Release / Gitea release (push) Successful in 5s
CI / Format and vet (push) Successful in 1m4s
CI / Dependency audit (push) Successful in 33s
CI / Tests (Linux, race detector) (push) Successful in 2m10s
Release / Plan (reuse the published image?) (push) Successful in 5s
Release / ci (push) Skipped
Release / Build hub image (amd64) (push) Skipped
Release / Build probe image (amd64) (push) Skipped
Release / Build hub image (arm64) (push) Skipped
Release / Build probe image (arm64) (push) Skipped
Release / Publish tags (hub) (push) Successful in 16s
Release / Publish tags (probe) (push) Successful in 16s
Release / Gitea release (push) Successful in 5s
The hub kept a probe's resolv.conf and containers.map only in memory, so after a restart the egress lines replayed on reconnect were judged with the hub's own resolvers (false dns_bypass, hostinger/INC-8). They are now saved in the node directory and loaded at start. Phone: the global filter sheet opens above the bottom tab bar, the tab bar closes it, and the sticky filter bar no longer covers the More menu. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
fb2dfa3fb2
commit
19afd221e2
7 files changed
+89
-6
No files matched your search
@@ -0,0 +1,29 @@
|
||||
package app
|
||||
|
||||
import (
|
||||
"io"
|
||||
"log/slog"
|
||||
"testing"
|
||||
|
||||
"git.lucasrguerra.dev.br/ciberfauna/urutau/internal/wire"
|
||||
)
|
||||
|
||||
// The files sent by a probe survive a hub restart: without them the egress
|
||||
// lines the probe replays right after reconnecting were judged with the hub's
|
||||
// own resolvers (a dns_bypass false positive on the probe's upstream resolver).
|
||||
func TestProbeFilesSurviveRestart(t *testing.T) {
|
||||
dir := t.TempDir()
|
||||
sh := &shared{log: slog.New(slog.NewTextHandler(io.Discard, nil))}
|
||||
n := &Node{name: "hostinger", Dir: dir, sh: sh}
|
||||
n.saveProbeFile(wire.FileResolv, []byte("nameserver 153.92.2.6\n"))
|
||||
n.saveProbeFile(wire.FileContainers, []byte("172.17.0.2 coolify-sentinel\n"))
|
||||
|
||||
n2 := &Node{name: "hostinger", Dir: dir, sh: sh}
|
||||
n2.loadProbeFiles()
|
||||
if b := n2.resolv.Load(); b == nil || string(*b) != "nameserver 153.92.2.6\n" {
|
||||
t.Fatalf("resolv.conf not restored: %v", b)
|
||||
}
|
||||
if b := n2.containers.Load(); b == nil || string(*b) != "172.17.0.2 coolify-sentinel\n" {
|
||||
t.Fatalf("containers.map not restored: %v", b)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user