Skip to content

Latest commit

 

History

History
59 lines (51 loc) · 4.01 KB

File metadata and controls

59 lines (51 loc) · 4.01 KB

Changelog

All notable changes to this project are documented here. The format follows Keep a Changelog, and versions follow Semantic Versioning.

1.0.0 - 2026-08-05

First release. A Java port of monovm/whois-php, rebuilt around replaceable collaborators rather than inheritance, with the original's verdicts preserved and pinned by recorded parity tests.

Added

  • WhoisClient, the entry point: single lookups, parallel bulk checks, asynchronous lookups, and diagnostic reports. Immutable and thread safe.
  • Checker and WhoisHandler, matching the PHP package's static facades for code being ported across.
  • Two transports: SocketWhoisTransport for RFC 3912 on port 43, and HttpWhoisTransport for RDAP over HTTPS, which several registries now use exclusively. RoutingWhoisTransport chooses per endpoint.
  • Transport decorators, composable in any order: RetryingWhoisTransport with exponential backoff, CachingWhoisTransport with a bounded TTL cache, RateLimitingWhoisTransport enforcing a per-host gap, and ReferralFollowingWhoisTransport for thin registries that point at the registrar's server.
  • Rule-based availability detection: eleven ordered rules, each independently reviewable, with every verdict carrying the rule that reached it and the evidence it matched. The chain is data, so rules can be added, replaced or removed without touching the library.
  • Three rule sets to choose from: AvailabilityRules.defaults() (PHP behaviour plus the blank-response guard), phpCompatible() (PHP behaviour exactly), and strict(), which repairs the inherited pattern tables' known false-positive sources — a bare /404/ matching inside a phone number, free matching inside "freephone", the single word available listed for two dozen extensions, .uk's bare /registered/i matching inside "has not been registered", start-of-response markers filed on the wrong side, and availability inferred from the mere absence of recognised fields. Each repair is documented in StrictDetectionPatterns alongside the response that exposes it, and each is pinned by a test asserting both the old and the new reading.
  • DetectionReport, which evaluates every signal rather than stopping at the first, and renders under the PHP package's getAvailabilityDetails() field names for direct comparison.
  • The bundled server list: 890 extension declarations across 285 registries, overridable by placing a whois.json at the same classpath location, or by layering registries with CompositeTldRegistry.
  • Immutable value objects for the domain model, normalising on construction, with Punycode encoding and RFC 1035 length validation.
  • SuffixAwareDomainParser, which resolves the extension against known suffixes, so bbc.co.uk and www.monovm.com both reduce to the right registrable name.
  • WhoisEventListener for logging and metrics, with no logging framework dependency.
  • A runnable CLI (WhoisCli) with text and JSON output, detection reports, and script-friendly exit codes.
  • A JPMS module descriptor. No runtime dependencies beyond the JDK.

Differences from whois-php

  • An empty response is reported as an error rather than as an available domain. PHP reads "no registration fields" as availability, which turns a dropped connection into a domain someone might try to buy. AvailabilityRules.phpCompatible() restores the original behaviour.
  • WHOIS text is returned exactly as received, not HTML escaped with htmlentities() and nl2br().
  • A server list entry with no available phrase never matches, where PHP's strpos($text, '') matches everything and would report every domain in that extension as free.
  • Bulk checks run in parallel, bounded by bulkConcurrency.
  • Input is cleaned up before use: schemes, credentials, ports, paths and subdomains are stripped, and internationalised names are Punycode encoded.