diff options
| author | Handingkang <[email protected]> | 2023-10-10 16:38:04 +0800 |
|---|---|---|
| committer | Handingkang <[email protected]> | 2023-10-10 16:38:04 +0800 |
| commit | 2d0103717b2f365d6427359a85b90ccaa5fcb8ef (patch) | |
| tree | 2238aa7c809c24dabaeb4eb9d2a4f6831b76124e | |
| parent | 598a0317400e8f34641600283a5a2736402e1ed2 (diff) | |
策略加强
| -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.出口 |
