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
@@ -129,7 +129,7 @@ func TestDNSScriptConfig(t *testing.T) {
dir := t.TempDir()
t.Setenv("xray.location.confdir", dir)
path := filepath.Join(dir, "lookup.lua")
if err := os.WriteFile(path, []byte("function handleDNSQuery(q) end"), 0o600); err != nil {
if err := os.WriteFile(path, []byte("function handleDNSQuery(domain, ipv4, ipv6, fake) end"), 0o600); err != nil {
t.Fatal(err)
}