{"id":21586049,"url":"https://github.com/magiclen/whois-rust","last_synced_at":"2025-04-11T19:42:01.087Z","repository":{"id":33214534,"uuid":"155181643","full_name":"magiclen/whois-rust","owner":"magiclen","description":"This is a WHOIS client library for Rust, inspired by https://github.com/hjr265/node-whois","archived":false,"fork":false,"pushed_at":"2024-08-20T08:35:59.000Z","size":53,"stargazers_count":24,"open_issues_count":6,"forks_count":11,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-25T15:48:55.339Z","etag":null,"topics":["rust","whois"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/magiclen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-10-29T09:02:12.000Z","updated_at":"2025-02-25T21:21:27.000Z","dependencies_parsed_at":"2024-11-24T15:12:36.121Z","dependency_job_id":null,"html_url":"https://github.com/magiclen/whois-rust","commit_stats":{"total_commits":38,"total_committers":2,"mean_commits":19.0,"dds":0.07894736842105265,"last_synced_commit":"4f70dc08f23a354ff4170884ab469b3db5705ed4"},"previous_names":[],"tags_count":30,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magiclen%2Fwhois-rust","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magiclen%2Fwhois-rust/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magiclen%2Fwhois-rust/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magiclen%2Fwhois-rust/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/magiclen","download_url":"https://codeload.github.com/magiclen/whois-rust/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248468461,"owners_count":21108821,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["rust","whois"],"created_at":"2024-11-24T15:12:30.017Z","updated_at":"2025-04-11T19:42:01.047Z","avatar_url":"https://github.com/magiclen.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"WHOIS Rust\n====================\n\n[![CI](https://github.com/magiclen/whois-rust/actions/workflows/ci.yml/badge.svg)](https://github.com/magiclen/whois-rust/actions/workflows/ci.yml)\n\nThis is a WHOIS client library for Rust, inspired by https://github.com/hjr265/node-whois\n\n## Usage\n\nYou can make a **servers.json** file or copy one from https://github.com/hjr265/node-whois\n\nThis is a simple example of **servers.json**.\n\n```json\n{\n    \"org\": \"whois.pir.org\",\n    \"\": \"whois.ripe.net\",\n    \"_\": {\n        \"ip\": {\n            \"host\": \"whois.arin.net\",\n            \"query\": \"n + $addr\\r\\n\"\n        }\n    }\n}\n```\n\nThen, use the `from_path` (or `from_string` if your JSON data is in-memory) associated function to create a `WhoIs` instance.\n\n```rust\nuse whois_rust::WhoIs;\n\nlet whois = WhoIs::from_path(\"/path/to/servers.json\").unwrap();\n```\n\nUse the `lookup` method and input a `WhoIsLookupOptions` instance to lookup a domain or an IP.\n\n```rust\nuse whois_rust::{WhoIs, WhoIsLookupOptions};\n\nlet whois = WhoIs::from_path(\"/path/to/servers.json\").unwrap();\n\nlet result: String = whois.lookup(WhoIsLookupOptions::from_string(\"magiclen.org\").unwrap()).unwrap();\n```\n\n## Asynchronous APIs\n\nYou may want to use async APIs with your async runtime. This crate supports `tokio`, currently.\n\n```toml\n[dependencies.whois-rust]\nversion = \"*\"\nfeatures = [\"tokio\"]\n```\n\nAfter enabling the async feature, the `from_path_async` function and the `lookup_async` function are available.\n\n## Testing\n\n```bash\n# git clone --recurse-submodules git://github.com/magiclen/whois-rust.git\n\ngit clone git://github.com/magiclen/whois-rust.git\n\ncd whois-rust\n\ngit submodule init\ngit submodule update --recursive\n\ncargo test\n```\n\n## Crates.io\n\nhttps://crates.io/crates/whois-rust\n\n## Documentation\n\nhttps://docs.rs/whois-rust\n\n## License\n\n[MIT](LICENSE)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmagiclen%2Fwhois-rust","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmagiclen%2Fwhois-rust","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmagiclen%2Fwhois-rust/lists"}