geodata: flatten Lua matcher rule arguments

This commit is contained in:
Meo597
2026-09-28 22:23:04 +08:00
parent 5e1bb92b98
commit 3d3306503d
4 changed files with 23 additions and 20 deletions
+1 -1
View File
@@ -158,7 +158,7 @@ func TestLuaDNSServerQuery(t *testing.T) {
server.RegisterLua(L)
if err := L.DoString(`
local server = require("xray.dns").servers[1]
local matcher = require("xray.geodata").ipMatcher({"127.0.0.0/8"})
local matcher = require("xray.geodata").ipMatcher("127.0.0.0/8")
function handleDNSQuery(domain, ipv4, ipv6, fake)
local ips, ttl, err = server:query(domain, ipv4, ipv6, fake)
assert(type(ips) == "userdata" and not err)