diff options
| -rw-r--r-- | plugin/rtest/rtest.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugin/rtest/rtest.go b/plugin/rtest/rtest.go index a4cae08..f9eed78 100644 --- a/plugin/rtest/rtest.go +++ b/plugin/rtest/rtest.go @@ -27,7 +27,7 @@ func (r Rtest) ServeDNS(ctx context.Context, writer dns.ResponseWriter, msg *dns q := strings.ToLower(state.QName()) qlist := strings.Split(q, ".") // 符合要求的域名 - if len(qlist) >= 4 { + if len(qlist) >= 5 && strings.ContainsAny(qlist[len(qlist)-5], "-") { // 1.入口 iaddr := strings.ReplaceAll(qlist[len(qlist)-5], "-", ":") // 2.出口 |
