Skip to content

KarpelesLab/hbclient

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hbclient

A Go client for the sentinel heartbeat protocol. It allows hosts to register their presence with sentinel DNS servers using a challenge-response protocol over DNS.

Installation

go get github.com/KarpelesLab/hbclient

Usage

package main

import (
	"crypto/ed25519"
	"crypto/rand"
	"log"

	"github.com/KarpelesLab/hbclient"
)

func main() {
	_, priv, _ := ed25519.GenerateKey(rand.Reader)

	client, err := hbclient.NewClient("test.g-dns.net", priv)
	if err != nil {
		log.Fatal(err)
	}
	client.Server = "127.0.0.1:53"

	if err := client.Heartbeat(); err != nil {
		log.Fatal(err)
	}
}

License

MIT - see LICENSE

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages