dns: reduce Lua allocations with flat arguments and returns and native IP slice userdata

This commit is contained in:
Meo597
2026-09-28 22:12:47 +08:00
parent 459301d42e
commit 5e1bb92b98
5 changed files with 162 additions and 177 deletions
+1 -1
View File
@@ -39,7 +39,7 @@ func newScriptEngine(path string, server *DNS) (*scriptEngine, error) {
}
if L.GetGlobal("handleDNSQuery").Type() != lua.LTFunction {
L.Close()
return nil, errors.New("DNS script must define handleDNSQuery(q)")
return nil, errors.New("DNS script must define handleDNSQuery(domain, ipv4, ipv6, fake)")
}
return L, nil
})