fritzbox

package
v0.18.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 5, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FritzBox

type FritzBox struct {
	Host     string
	User     string
	Insecure bool
	Domain   string

	VerificationURL *url.URL
	// contains filtered or unexported fields
}

FritzBox holds general information about the FRITZ!Box to talk to

func (*FritzBox) CheckSession

func (fb *FritzBox) CheckSession() (bool, error)

func (*FritzBox) PerformLogin

func (fb *FritzBox) PerformLogin(adminPassword string) error

PerformLogin performs a login and returns SessionInfo including the session id (SID) on success

func (*FritzBox) UploadCertificate

func (fb *FritzBox) UploadCertificate(data io.Reader) (bool, string, error)

UploadCertificate uploads certificate and privatekey, provided via data and installs it

func (*FritzBox) VerifyCertificate

func (fb *FritzBox) VerifyCertificate() (bool, error)

VerifyCertificate uses Go's http.Get with TLS verification to see if a valid certificate is actually installed.

type SessionInfo

type SessionInfo struct {
	SID       string `xml:"SID"`
	Challenge string `xml:"Challenge"`
}

SessionInfo holds information about the current authenticated fritzbox session

We only need SID and Challenge currently.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL