myaddr

package
v0.0.0-...-b4bca67 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2024 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PendingTtl      = 3600
	RegistrationTtl = 120 * 86400
	AddressTtl      = 90 * 86400
	ChallengeTtl    = 120
)

Variables

This section is empty.

Functions

func GetName

func GetName(sub string) string

func GetRegistrationInfo

func GetRegistrationInfo(name string, store ttlstore.TtlStore, prefix string) (created, updated, expires uint32)

func IsValidName

func IsValidName(s string) bool

func UpdateRegistration

func UpdateRegistration(hash, name string, store ttlstore.TtlStore, prefix string) error

Types

type RecordGenerator

type RecordGenerator struct {
	Addrs               dnsutil.IPCollection
	SelfChallengeTarget string
	DataStore           ttlstore.TtlStore
	ChallengeStore      ttlstore.TtlStore
	KeyPrefix           string
}

func (*RecordGenerator) GenerateRecords

func (g *RecordGenerator) GenerateRecords(q *dns.Question, zone string) (rrs []dns.RR, validName bool)

type RegistrationHandler

type RegistrationHandler struct {
	DataStore      ttlstore.TtlStore
	ChallengeStore ttlstore.TtlStore
	KeyPrefix      string
	*httputil.TurnstileSite
}

func (*RegistrationHandler) ServeHTTP

func (h *RegistrationHandler) ServeHTTP(w http.ResponseWriter, req *http.Request)

type UpdateHandler

type UpdateHandler struct {
	DataStore      ttlstore.TtlStore
	ChallengeStore ttlstore.TtlStore
	KeyPrefix      string
}

func (*UpdateHandler) ServeHTTP

func (h *UpdateHandler) ServeHTTP(w http.ResponseWriter, req *http.Request)

Jump to

Keyboard shortcuts

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