Report version and auto-update state to Hammerhead and update on request
CI / test (push) Successful in 7m1s
Release / release (push) Successful in 9m15s

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
VeillaxandClaude Sonnet 5.5 committed 2026-10-26 17:03:31 -06:00
1 parent 7597f12db9
commit 049b6bad97
4 files changed
+59 -2

No files matched your search

+4 -1
View File
@@ -50,9 +50,12 @@ func main() {
flag.Usage()
os.Exit(2)
}
upd := selfupdate.Config{Server: "https://git.veillax.com", Repo: "Veillax/blacktip", App: "blacktip", Current: version, Logf: log.Printf}
b, err := blacktip.New(blacktip.Config{
Hammerhead: strings.TrimRight(*hh, "/"), Token: *token, TunnelAddr: *tun, DataDir: *data, Docker: *dockerOn,
Traefik: blacktip.TraefikConfig{Path: *traefikPath, ACMEDNS: *acmeDNS, NoACME: *noACME},
Version: version, AutoUpdate: *autoUpdate,
UpdateNow: func(ctx context.Context) (string, error) { return selfupdate.CheckOnce(ctx, upd) },
})
if err != nil {
log.Fatal(err)
@@ -61,7 +64,7 @@ func main() {
ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt)
defer stop()
if *autoUpdate {
go selfupdate.Run(ctx, selfupdate.Config{Server: "https://git.veillax.com", Repo: "Veillax/blacktip", App: "blacktip", Current: version, Logf: log.Printf})
go selfupdate.Run(ctx, upd)
}
if err := b.Run(ctx); err != nil {
log.Fatal(err)