mirror of
https://github.com/namecoin/ncdns
synced 2024-11-16 00:13:01 +00:00
(WIP) Support tlsrestrictnsssync.
Tested and working; still need to run static analysis.
This commit is contained in:
parent
5235417cf4
commit
9bcdd25a1d
@ -7,6 +7,7 @@ import "github.com/namecoin/ncdns/namecoin"
|
||||
import "github.com/namecoin/ncdns/util"
|
||||
import "github.com/namecoin/ncdns/ncdomain"
|
||||
import "github.com/namecoin/ncdns/tlshook"
|
||||
import "github.com/namecoin/tlsrestrictnss/tlsrestrictnsssync"
|
||||
import "github.com/hlandau/xlog"
|
||||
import "sync"
|
||||
import "fmt"
|
||||
@ -107,6 +108,11 @@ func convertEmail(email string) (string, error) {
|
||||
// Do low-level queries against an abstract zone file. This is the per-query
|
||||
// entrypoint from madns.
|
||||
func (b *Backend) Lookup(qname string) (rrs []dns.RR, err error) {
|
||||
if !tlsrestrictnsssync.IsReady() {
|
||||
err = fmt.Errorf("tlsrestrictnss not ready")
|
||||
return
|
||||
}
|
||||
|
||||
btx := &btx{}
|
||||
btx.b = b
|
||||
btx.qname = qname
|
||||
|
@ -15,6 +15,7 @@ import (
|
||||
"github.com/namecoin/ncdns/backend"
|
||||
"github.com/namecoin/ncdns/namecoin"
|
||||
"github.com/namecoin/ncdns/tlsoverridefirefox/tlsoverridefirefoxsync"
|
||||
"github.com/namecoin/tlsrestrictnss/tlsrestrictnsssync"
|
||||
"gopkg.in/hlandau/madns.v1"
|
||||
)
|
||||
|
||||
@ -220,6 +221,11 @@ func (s *Server) Start() error {
|
||||
return fmt.Errorf("Couldn't start Firefox override sync: %s", err)
|
||||
}
|
||||
|
||||
err = tlsrestrictnsssync.Start()
|
||||
if err != nil {
|
||||
return fmt.Errorf("Couldn't start tlsrestrictnss sync: %s", err)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user