iprobe runs its local socket probes once per process and returns the same
cached snapshot from probe() and the convenience functions thereafter.
The probes perform these operations:
- IPv4: create an IPv4 TCP socket.
- IPv6: create an IPv6 TCP socket and bind it to
::1. - IPv4-mapped IPv6: create a dual-stack IPv6 TCP socket and bind it to
::ffff:127.0.0.1.
These are local operation checks. They do not test routing, interface
availability, remote hosts, or Internet connectivity. A false result is
best effort and may reflect unsupported functionality, policy restrictions,
resource exhaustion, or a transient failure.
[dependencies]
iprobe = "1"use iprobe::{ipv4, ipv6, ipv4_mapped_ipv6};
println!("IPv4 enabled: {}", ipv4());
println!("IPv6 enabled: {}", ipv6());
println!("IPv4-mapped IPv6 enabled: {}", ipv4_mapped_ipv6());iprobe is under the terms of both the MIT license and the
Apache License (Version 2.0).
See LICENSE-APACHE, LICENSE-MIT for details.
Copyright (c) 2025 Al Liu.