geodata: rename Lua matcher constructors to BuildDomainMatcher and BuildIPMatcher

This commit is contained in:
Meo597
2026-09-28 22:52:45 +08:00
parent 5724db08f4
commit 1c52c65872
4 changed files with 8 additions and 8 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").BuildIPMatcher("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)