Skip to content
al8nPublic

About

Probe if the host system supports IPv4, IPv6 and IPv4-mapped-IPv6.

Resources

Stars

3 stars

Watchers

1 watching

Forks

Repository files navigation

iprobe

Probe if the host system supports IPv4, IPv6 and IPv4-mapped-IPv6.

github LoC Build codecov

docs.rs crates.io crates.io license

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.

Installation

[dependencies]
iprobe = "1"

Example

use iprobe::{ipv4, ipv6, ipv4_mapped_ipv6};

println!("IPv4 enabled: {}", ipv4());
println!("IPv6 enabled: {}", ipv6());
println!("IPv4-mapped IPv6 enabled: {}", ipv4_mapped_ipv6());

License

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.

About

Probe if the host system supports IPv4, IPv6 and IPv4-mapped-IPv6.

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Sponsor this project

Packages

Contributors

Languages

Generated from al8n/template-rs