| Crates.io | reauthfi-core |
| lib.rs | reauthfi-core |
| version | 0.1.2 |
| created_at | 2025-10-16 11:16:53.266136+00 |
| updated_at | 2025-10-16 11:16:53.266136+00 |
| description | macOS Captive Portal auto-detection and opener CLI tool |
| homepage | |
| repository | https://github.com/kazu728/reauthfi |
| max_upload_size | |
| id | 1885770 |
| size | 56,137 |
Core library for the reauthfi captive portal detector.
reauthfi-core contains the detection logic shared by the CLI and Node.js bindings.
It probes known endpoints, inspects gateway responses, and opens the detected portal
URL on supported platforms (currently macOS).
Add the crate to your Cargo.toml:
[dependencies]
reauthfi-core = "0.1.2"
Basic example:
use reauthfi_core::{run, ExecutionStatus, Options};
fn main() -> Result<(), Box<dyn std::error::Error>> {
let options = Options {
verbose: true,
no_open: true,
gateway: false,
timeout: 10,
};
match run(&options) {
Ok(ExecutionStatus::Completed) => println!("No captive portal detected"),
Ok(ExecutionStatus::NetworkNotReady) => println!("Network not ready"),
Err(err) => eprintln!("Detection failed: {err}"),
}
Ok(())
}
On non-macOS platforms the library currently returns ReauthfiError::UnsupportedPlatform.
MIT License.