Updated to master with CGNAT

This commit is contained in:
Adam Heathcote 2019-11-27 16:29:34 +11:00 committed by GitHub
parent f6614d2765
commit 0981247847
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -55,6 +55,10 @@ if (strpos($ip, '169.254.') === 0) { // IPv4 link-local
echo json_encode(['processedString' => $ip . " - link-local IPv4 access", 'rawIspInfo' => ""]);
die();
}
if (preg_match('/^100\.([6-9][0-9]|1[0-2][0-7])\./', $ip) === 1) { // 100.64/10 CGNAT IPv4
echo json_encode(['processedString' => $ip . " - CGNAT IPv4 access", 'rawIspInfo' => ""]);
die();
}
/**
* Optimized algorithm from http://www.codexworld.com