Skip to content

Commit 3b3bf76

Browse files
committed
Fixed proxy command
1 parent ec967bc commit 3b3bf76

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pkg/handlers/proxy.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,15 @@ import (
44
"github.com/buglloc/simplelog"
55
"github.com/miekg/dns"
66

7+
"github.com/buglloc/rip/pkg/cfg"
78
"github.com/buglloc/rip/pkg/resolver"
89
)
910

1011
func ProxyHandler(question dns.Question, name string, l log.Logger) (rrs []dns.RR) {
12+
if !cfg.AllowProxy {
13+
return
14+
}
15+
1116
subName := parseSubName(name)
1217
ip, err := resolver.ResolveIp(question.Qtype, subName)
1318
if err != nil {

0 commit comments

Comments
 (0)