This commit is contained in:
2025-12-18 19:19:30 +08:00
parent 3a6b014333
commit 433ad0f5c5
5 changed files with 19 additions and 30 deletions

View File

@@ -7,23 +7,15 @@ function unet_is_valid_network_v4() {
];
}
function unet_is_valid_network_v4_anynet() {
return net ~ [
44.32.191.0/24+,
172.20.21.0/26+
];
}
function unet_is_valid_network_v4_allnet(){
if !unet_is_valid_network_v4_anynet() && !unet_is_valid_network_v4() then return false;
return true;
if unet_is_valid_network_v4() then return true;
if is_self_net() then return true;
if dn42_is_self_net() then return true;
return false;
}
function unet_is_voalid_net_v6(){
return net ~ [
2406:840:e600::/44{44,64},
2a0f:1cc5:0010::/44{44,64},
fde8:936e:ee29::/48{44,64}
];
if is_self_net_v6() then return true;
if dn42_is_self_net_v6() then return true;
return false;
}