一款社区驱动的免费、高性能、高扩展顶级Web应用和API安全防护产品
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

20 lines
371 B

--[[
规则名称: 区域访问限制
过滤阶段: 请求阶段
危险等级: 低危
规则描述: 限制非大陆地区访问网站
--]]
if waf.contains(waf.ip,":") then
return false
end
local country, province, city = waf.ip2loc(waf.ip)
if country ~= "中国" and city ~= "内网IP" then
return true, "限制非大陆地区访问", true
end
return false