@@ -75,6 +75,13 @@ class Traits implements \JsonSerializable
7575 */
7676 public readonly bool $ isAnonymousVpn ;
7777
78+ /**
79+ * @var bool This is true if the IP address belongs to an [anycast
80+ * network](https://en.wikipedia.org/wiki/Anycast). This property is not
81+ * available from GeoLite databases or web services.
82+ */
83+ public readonly bool $ isAnycast ;
84+
7885 /**
7986 * @var bool This is true if the IP address belongs
8087 * to a hosting or VPN provider (see description of isAnonymousVpn property).
@@ -198,6 +205,7 @@ public function __construct(array $record)
198205 $ this ->ipAddress = $ record ['ip_address ' ] ?? null ;
199206 $ this ->isAnonymous = $ record ['is_anonymous ' ] ?? false ;
200207 $ this ->isAnonymousVpn = $ record ['is_anonymous_vpn ' ] ?? false ;
208+ $ this ->isAnycast = $ record ['is_anycast ' ] ?? false ;
201209 $ this ->isHostingProvider = $ record ['is_hosting_provider ' ] ?? false ;
202210 $ this ->isLegitimateProxy = $ record ['is_legitimate_proxy ' ] ?? false ;
203211 $ this ->isp = $ record ['isp ' ] ?? null ;
@@ -242,6 +250,9 @@ public function jsonSerialize(): array
242250 if ($ this ->isAnonymousVpn !== false ) {
243251 $ js ['is_anonymous_vpn ' ] = $ this ->isAnonymousVpn ;
244252 }
253+ if ($ this ->isAnycast !== false ) {
254+ $ js ['is_anycast ' ] = $ this ->isAnycast ;
255+ }
245256 if ($ this ->isHostingProvider !== false ) {
246257 $ js ['is_hosting_provider ' ] = $ this ->isHostingProvider ;
247258 }
0 commit comments