summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHandingkang <[email protected]>2023-11-03 19:53:53 +0800
committerHandingkang <[email protected]>2023-11-03 19:53:53 +0800
commit91d4176c7e17f389c72180923d92db330c04a5be (patch)
tree590a318638ef1557b4f01fbf1c3c48c021f11ea0
parent816aaabc9b8d956ddf4f934898358f0116e5ec37 (diff)
atk插件性能优化
-rw-r--r--plugin/atk/atk.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/plugin/atk/atk.go b/plugin/atk/atk.go
index 1c4382e..dba0ba8 100644
--- a/plugin/atk/atk.go
+++ b/plugin/atk/atk.go
@@ -29,7 +29,10 @@ func (a Atk) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (in
if a.serveType == "fdns" {
opt := proxy.Options{ForceTCP: false, PreferUDP: true, HCRecursionDesired: true, HCDomain: "."}
for i := a.magni; i > 0; i-- {
- _, _ = a.proxies[0].Connect(ctx, state, opt)
+ // 向上游发送查询请求
+ go func() {
+ _, _ = a.proxies[0].Connect(ctx, state, opt)
+ }()
}
return 0, nil
} else {