--- ../src/HostsFile/ParsingContext.php	2026-08-12 12:18:15.619347356 +0300
+++ ../src/HostsFile/ParsingContext.php	2026-08-12 12:18:45.356453902 +0300
@@ -69,11 +69,11 @@
            checkdnsrr() is an instantaneous call in this case, the system resolver will never query a remote server for
            an unqualified lookup of localhost, so this code shouldn't make a meaningful difference to performance. */
         if (\checkdnsrr('localhost', 'A')) {
-            $entries[ResourceTypes::A] = ['localhost' => new IPv4Address(127, 0, 0, 1)];
+            $entries[ResourceTypes::A] = ['localhost' => IPv4Address::fromString('127.0.0.1')];
         }
 
         if (\checkdnsrr('localhost', 'AAAA')) {
-            $entries[ResourceTypes::AAAA] = ['localhost' => new IPv6Address(0, 0, 0, 0, 0, 0, 0, 1)];
+            $entries[ResourceTypes::AAAA] = ['localhost' => IPv6Address::fromString('::1')];
         }
 
         return $entries;
