Domain/MX/DNS intelligence analyzer implementing foundation-web-analysis::Analyzer -- WHOIS registration lookup (subprocess), live DNS resolution (A/AAAA/MX/TXT/NS/CNAME), IP geolocation, and hosting-provider/CDN detection
| Tier | infrastructure |
| Role | unclassified (baselined) |
| Path | crates/infrastructure/web-domain-intel |
| Edition | 2021 |
| Targets | infrastructure_web_domain_intel |
| Public items | 20 across 2 modules |
| Tests | 36 |
What it is for
# infrastructure-web-domain-intel
Domain/MX/DNS intelligence analyzer implementing foundation_web_analysis::Analyzer. Runs a WHOIS registration lookup (subprocess), live DNS resolution (A/AAAA/MX/TXT/NS/CNAME), and IP geolocation for a target website's domain, then derives a models::DomainIntelligence snapshot (registrar/registrant, domain age, name servers, DNS records, IP geolocation, inferred hosting provider/CDN).
Lifted from plumber/src/analyzers/domain_analyzer.rs and plumber/src/models/domain_intelligence.rs (sprint 3.46, wave 2 -- see CHANGELOG.md for provenance).
Capabilities
analyzer (other)
Domain/MX/DNS intelligence analyzer.
| Item |
|---|
pub const DEFAULT_MAX_GEO_BYTES: usize |
pub const DEFAULT_MAX_WHOIS_BYTES: usize |
pub const DEFAULT_WHOIS_TIMEOUT: Duration |
pub const DEFAULT_DNS_TIMEOUT: Duration |
DomainIntelAnalyzer
Domain/MX/DNS intelligence analyzer.
| Item |
|---|
pub struct DomainIntelAnalyzer |
DomainIntelAnalyzer :: fn new() -> std::result::Result <Self, infrastructure_fetcher::SafeHttpError> |
DomainIntelAnalyzer :: fn with_whois_bin(mut self, bin : impl Into <String>) -> Self |
DomainIntelAnalyzer :: fn with_whois_timeout(mut self, timeout : Duration) -> Self |
DomainIntelAnalyzer :: fn with_geo_base(mut self, geo_base : & str) -> Self |
DomainIntelAnalyzer :: fn with_geo_delay(mut self, delay : Duration) -> Self |
DomainIntelAnalyzer :: fn default() -> Self |
DomainIntelAnalyzer :: fn name(& self) -> & 'static str |
DomainIntelAnalyzer :: async fn analyze(& self, organization_id : Uuid, website_url : & str) -> Result <AnalysisResult> |
DomainIntelAnalyzer :: fn cache_ttl_days(& self) -> u32 |
DomainIntelligence
Domain intelligence data model.
| Item |
|---|
pub struct DomainIntelligence |
DomainIntelligence :: fn default() -> Self |
DomainIntelligence :: fn new(organization_id : Uuid, domain : & str) -> Self |
DomainIntelligence :: fn inferred_email_provider(& self) -> Option <String> |
DomainIntelligence :: fn detect_cdn(& self) -> Option <String> |
MxRecord
Domain intelligence data model.
| Item |
|---|
pub struct MxRecord |
How to use it
No examples/ target and no doctest in this crate's rustdoc. The tests listed under Verification are the closest executable usage.
Module structure
infrastructure_web_domain_intel
analyzermodels
flowchart TD n_infrastructure_web_domain_intel["infrastructure_web_domain_intel"] n_infrastructure_web_domain_intel --> n_analyzer["analyzer"] n_infrastructure_web_domain_intel --> n_models["models"]
Public surface
`analyzer`
| Item | What it is |
|---|---|
pub const DEFAULT_MAX_GEO_BYTES: usize | Response body byte cap for the IP-geolocation JSON response (Gate 1.5.6 input limit) -- the response is a small fixed-shape JSON object, so this is generous headroom, not a tuned limit. |
pub const DEFAULT_MAX_WHOIS_BYTES: usize | Stdout byte cap for the WHOIS subprocess (Gate 1.5.6 input limit). |
pub const DEFAULT_WHOIS_TIMEOUT: Duration | WHOIS subprocess timeout. |
pub const DEFAULT_DNS_TIMEOUT: Duration | Per-query DNS resolution timeout (matches hickory_resolver::config::ResolverOpts's own default). |
pub struct DomainIntelAnalyzer | Analyzer for domain intelligence: WHOIS registration, DNS resolution, and IP geolocation / hosting-provider / CDN detection. |
DomainIntelAnalyzer :: fn new() -> std::result::Result <Self, infrastructure_fetcher::SafeHttpError> | Build an analyzer with the default WHOIS binary ("whois"), byte caps, DNS timeout (5s, matching ResolverOpts's own default), and geolocation delay (1.5s, matching the source's own IP_API_DELAY/45-req-per-min free-tier rate limit). |
DomainIntelAnalyzer :: fn with_whois_bin(mut self, bin : impl Into <String>) -> Self | Override the WHOIS binary path (allowlisted/configurable; still invoked as a strict argument vector, never a shell). |
DomainIntelAnalyzer :: fn with_whois_timeout(mut self, timeout : Duration) -> Self | Override the WHOIS subprocess timeout. |
DomainIntelAnalyzer :: fn with_geo_base(mut self, geo_base : & str) -> Self | Override the geolocation-endpoint base URL |
DomainIntelAnalyzer :: fn with_geo_delay(mut self, delay : Duration) -> Self | Override the post-geolocation-call rate-limit delay. |
DomainIntelAnalyzer :: fn default() -> Self | # Panics Panics if the underlying SafeHttpClient cannot be built (TLS backend init failure) -- matches the source's ?-on-construction posture and infrastructure-web-tech-detector/infrastructure-web-backlink-finder's expect-on-construction Default impl. |
DomainIntelAnalyzer :: fn name(& self) -> & 'static str | — |
DomainIntelAnalyzer :: async fn analyze(& self, organization_id : Uuid, website_url : & str) -> Result <AnalysisResult> | — |
DomainIntelAnalyzer :: fn cache_ttl_days(& self) -> u32 | — |
`models`
| Item | What it is |
|---|---|
pub struct DomainIntelligence | Domain intelligence data from WHOIS, DNS, and IP geolocation lookups |
pub struct MxRecord | A single MX (mail exchange) record: preference (lower = more preferred) and the mail-server hostname. |
DomainIntelligence :: fn default() -> Self | — |
DomainIntelligence :: fn new(organization_id : Uuid, domain : & str) -> Self | — |
DomainIntelligence :: fn inferred_email_provider(& self) -> Option <String> | Infer the email provider from the exchange hostnames in mx_records. |
DomainIntelligence :: fn detect_cdn(& self) -> Option <String> | Detect a CDN from cname_records. |
Re-exports. Exported here, defined elsewhere.
| Export | Defined in |
|---|---|
{DomainIntelAnalyzer,DEFAULT_DNS_TIMEOUT,DEFAULT_MAX_GEO_BYTES,DEFAULT_MAX_WHOIS_BYTES,DEFAULT_WHOIS_TIMEOUT,} | analyzer::{DomainIntelAnalyzer,DEFAULT_DNS_TIMEOUT,DEFAULT_MAX_GEO_BYTES,DEFAULT_MAX_WHOIS_BYTES,DEFAULT_WHOIS_TIMEOUT,} |
{DomainIntelligence,MxRecord} | models::{DomainIntelligence,MxRecord} |
Boundary
Reaches into foundation.
Shares tier infrastructure with 82 other crates: infrastructure-acquire, infrastructure-adapters-google-calendar, infrastructure-adapters-google-gmail, infrastructure-adapters-google-places, infrastructure-adapters-google-trends, infrastructure-adapters-shodan, infrastructure-adapters-yelp, infrastructure-agent, … (82 total).
_What this crate deliberately does NOT own is a judgment. No committed registry records one for it, so none is stated here._
Where it sits
| Tier (ontology) | infrastructure |
| Architectural role (taxonomy) | unclassified (baselined) |
| Location | crates/infrastructure/web-domain-intel |
| Vocabulary in force (lexicon) | current |
Tier flow. Which tiers this crate's own edges cross.
flowchart LR n_infrastructure["infrastructure"] --> n_foundation["foundation"]
Dependencies
Runtime, in this workspace.
| Crate | Tier | Optional | Only on |
|---|---|---|---|
| `foundation-web-analysis` | foundation | no | always |
| `infrastructure-fetcher` | infrastructure | no | always |
Runtime, from outside the workspace.
| Crate | Requirement | Features | Optional | Only on |
|---|---|---|---|---|
async-trait | ^0.1 | — | no | always |
chrono | ^0.4 | serde | no | always |
hickory-resolver | ^0.26 | — | no | always |
serde | ^1 | derive | no | always |
serde_json | ^1 | — | no | always |
thiserror | ^2 | — | no | always |
tokio | ^1 | full | no | always |
tracing | ^0.1 | — | no | always |
url | ^2 | — | no | always |
uuid | ^1 | v4, v7, serde, js | no | always |
Development, from outside the workspace.
| Crate | Requirement | Features | Optional | Only on |
|---|---|---|---|---|
tokio | ^1 | full, full, test-util | no | always |
tokio-test | ^0.4 | — | no | always |
Build. None.
Depended on by. 1 workspace crate.
Signal flow — what reaches this crate, and what it reaches.
flowchart LR n_application_party_discovery["application-party-discovery"] -->|uses| SELF SELF["infrastructure-web-domain-intel"] SELF -->|runtime| n_foundation_web_analysis["foundation-web-analysis"] SELF -->|runtime| n_infrastructure_fetcher["infrastructure-fetcher"] classDef self fill:#1f883d,stroke:#1f883d,color:#fff; class SELF self;
Feature flags
No Cargo features are defined: every capability is unconditional, so no consumer can receive a half-wired crate.
Targets
| Kind | Name | Source |
|---|---|---|
| lib | infrastructure_web_domain_intel | `src/lib.rs` |
Error model
No public error type was detected: no public item declares a type named *Error, and no public signature returns one.
Operational characteristics
| Property | Evidence |
|---|---|
| async public surface | yes |
| async runtime | yes |
| database access | none detected |
| network I/O | none detected |
| unsafe code | none detected |
| environment variables | none detected |
No unsafe block, unsafe fn, unsafe impl or unsafe trait was found by the parser anywhere in this crate's source.
Configuration
No environment variable is read with a literal name anywhere in this crate. A variable whose key is computed at run time cannot be listed here, and is not claimed to be absent.
Related capabilities
1 workspace crate depends on this one: application-party-discovery.
Verification
| Kind | Count |
|---|---|
| Unit tests | 36 |
| Integration tests | 0 |
| Examples | 0 |
| Doctests | 0 |
Evidence by module. How often each public module is named by something executable.
| Module | Tests | Examples | Consumers |
|---|---|---|---|
analyzer | 5 | 0 | 1 |
models | 2 | 0 | 1 |
What the tests establish, by name:
analyze_fails_on_invalid_url—src/analyzer.rscache_ttl_is_seven_days—src/analyzer.rsdetect_hosting_provider_checks_each_known_org_substring—src/analyzer.rsdetect_hosting_provider_falls_back_to_cname_when_org_unmatched—src/analyzer.rsdetect_hosting_provider_none_when_nothing_matches—src/analyzer.rsdetect_hosting_provider_org_match_takes_precedence_over_cname—src/analyzer.rsexpiring_soon_review_none_when_already_expired—src/analyzer.rsexpiring_soon_review_none_when_far_in_the_future—src/analyzer.rsexpiring_soon_review_none_when_no_expiration_date—src/analyzer.rsexpiring_soon_review_present_when_within_ninety_days—src/analyzer.rsextract_domain_parses_host_from_valid_url—src/analyzer.rsextract_domain_returns_err_for_invalid_url—src/analyzer.rsname_is_domain_intel_analyzer—src/analyzer.rsnormalize_hostname_leaves_a_dotless_name_unchanged—src/analyzer.rsnormalize_hostname_strips_trailing_root_dot—src/analyzer.rsparse_date_accepts_dd_mon_yyyy—src/analyzer.rsparse_date_accepts_iso_datetime—src/analyzer.rsparse_date_accepts_plain_iso_date—src/analyzer.rsparse_date_accepts_slash_separated_date—src/analyzer.rsparse_date_returns_none_for_unrecognized_format—src/analyzer.rsparse_whois_collects_multiple_name_servers_lowercased—src/analyzer.rsparse_whois_extracts_dates—src/analyzer.rsparse_whois_extracts_registrar_and_registrant_fields—src/analyzer.rsparse_whois_ignores_unrecognized_keys—src/analyzer.rsparse_whois_skips_comment_and_blank_lines—src/analyzer.rsrequires_link_graph_is_false_default—src/analyzer.rsdetect_cdn_checks_each_known_cdn_substring—src/models.rsdetect_cdn_none_for_unrecognized_cname—src/models.rsdetect_cdn_none_when_no_cname_records—src/models.rsdomain_intelligence_new_sets_org_and_domain_defaults_rest—src/models.rs- _… 6 more_
Documentation coverage
| Measure | Documented | Total |
|---|---|---|
| Public items with rustdoc | 15 | 20 |
Public modules with a //! block | 2 | 2 |
pie showData
title Public items with rustdoc
"Documented" : 15
"No rustdoc detected" : 5
Metrics
| Metric | Value |
|---|---|
| Rust source files | 3 |
| Source lines | 1161 |
| Code lines | 898 |
| Public API items | 20 |
| Public modules | 2 |
| Tests | 36 |
| Examples | 0 |
| Cargo features | 0 |
| Direct runtime dependencies | 12 |
| Workspace reverse dependencies | 1 |
pie showData
title Public API by kind
"constant" : 4
"method" : 13
"struct" : 3
pie showData
title Rust source composition
"Code" : 898
"Blank or comment" : 263
Generation
Rendered by tools-corpus corpus readme from repository evidence alone, renderer schema 2, lexicon current. No model, network service or database was consulted. Regenerate with tools-corpus corpus readme --write; verify with --check.