From c2d5b75c618414a43fd7c77eaf70885b188a0715 Mon Sep 17 00:00:00 2001 From: mfraass Date: Fri, 20 Dec 2024 09:13:41 +0100 Subject: [PATCH 1/2] Support new authentication method from fritzctl --- go.mod | 2 ++ main.go | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/go.mod b/go.mod index 4b4b83e..d4a10e1 100644 --- a/go.mod +++ b/go.mod @@ -2,6 +2,8 @@ module github.com/jayme-github/fritzbox_smarthome_exporter go 1.17 +replace github.com/bpicode/fritzctl => github.com/matthiasfraass/fritzctl v1.4.24_mf + require ( github.com/bpicode/fritzctl v1.4.24-0.20210413183853-48944781b59f github.com/namsral/flag v1.7.4-pre diff --git a/main.go b/main.go index 7b98dc6..881f294 100644 --- a/main.go +++ b/main.go @@ -126,6 +126,10 @@ func main() { options = append(options, fritz.Certificate(crt)) } + if fbURL.RequestURI() != "/" { + options = append(options, fritz.AuthEndpoint(fbURL.RequestURI())) + } + fritzClient = NewClient(options...) if err := fritzClient.SafeLogin(); err != nil { From a7720907fd227a5e2255f39a566b859d32ea50d7 Mon Sep 17 00:00:00 2001 From: MatthiasFraass Date: Fri, 20 Dec 2024 10:01:02 +0100 Subject: [PATCH 2/2] Fixed Replace --- go.mod | 2 -- 1 file changed, 2 deletions(-) diff --git a/go.mod b/go.mod index d4a10e1..71810a1 100644 --- a/go.mod +++ b/go.mod @@ -27,5 +27,3 @@ require ( google.golang.org/protobuf v1.21.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect ) - -replace github.com/bpicode/fritzctl => github.com/jayme-github/fritzctl v1.4.23-0.20220609211037-25a9f8556e3b