{"id":15032656,"url":"https://github.com/zigrazor/rust_ipify","last_synced_at":"2025-04-09T21:23:21.351Z","repository":{"id":57665704,"uuid":"384162404","full_name":"ZigRazor/rust_ipify","owner":"ZigRazor","description":"A rust client for ipify","archived":false,"fork":false,"pushed_at":"2021-07-09T12:41:18.000Z","size":34,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-23T23:16:15.259Z","etag":null,"topics":["api","api-binding","api-bindings","api-client","api-wrapper","crates","crates-io","ip","ipify","ipify-api","ipv6","library","rust","rust-bindings","rust-lang","rust-language","rust-library"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/rust_ipify","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ZigRazor.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-07-08T15:03:07.000Z","updated_at":"2022-12-06T13:57:08.000Z","dependencies_parsed_at":"2022-09-14T13:01:19.950Z","dependency_job_id":null,"html_url":"https://github.com/ZigRazor/rust_ipify","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZigRazor%2Frust_ipify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZigRazor%2Frust_ipify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZigRazor%2Frust_ipify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZigRazor%2Frust_ipify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ZigRazor","download_url":"https://codeload.github.com/ZigRazor/rust_ipify/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248113103,"owners_count":21049783,"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":["api","api-binding","api-bindings","api-client","api-wrapper","crates","crates-io","ip","ipify","ipify-api","ipv6","library","rust","rust-bindings","rust-lang","rust-language","rust-library"],"created_at":"2024-09-24T20:19:03.002Z","updated_at":"2025-04-09T21:23:21.295Z","avatar_url":"https://github.com/ZigRazor.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rust ipify Library\nA rust client library for [ipify](https://www.ipify.org/)\n\n\u003cimg src=\"https://img.shields.io/badge/rust%20-%2300599C.svg?\u0026style=for-the-badge\u0026logo=rust%2B%2B\u0026ogoColor=white\"/\u003e \u003cimg src=\"https://img.shields.io/badge/github%20-%23121011.svg?\u0026style=for-the-badge\u0026logo=github\u0026logoColor=white\"/\u003e\n\n[![GitHub license](https://img.shields.io/github/license/ZigRazor/rust_ipify.svg)](https://github.com/ZigRazor/rust_ipify/blob/master/LICENSE)\n[![GitHub release](https://img.shields.io/github/release/ZigRazor/rust_ipify.svg)](https://GitHub.com/ZigRazor/rust_ipify/releases/)\n\n[![Generic badge](https://img.shields.io/badge/Build-Passed-Green.svg)](https://shields.io/) [![Generic badge](https://img.shields.io/badge/UnitTest-Passed-Green.svg)](https://shields.io/)\n\n![Crates.io](https://img.shields.io/crates/v/rust_ipify)\n![docs.rs](https://img.shields.io/docsrs/rust_ipify)\n![Crates.io](https://img.shields.io/crates/d/rust_ipify)\n![Crates.io (latest)](https://img.shields.io/crates/dv/rust_ipify)\n![Crates.io (recent)](https://img.shields.io/crates/dr/rust_ipify)\n![Crates.io](https://img.shields.io/crates/l/rust_ipify)\n## Introduction\n\n**Rust ipify** is a client library in Rust language for ipify.\n\n## Why ipify?\nEver needed to get your public IP address programmatically?\nMaybe you're provisioning new cloud servers and need to know your IP -- maybe you're behind a corporate firewall and need to tunnel information -- whatever the reason: sometimes having a public IP address API is useful!\n\nYou should use ipify because:\n\n 1. You can use it without limit (even if you're doing millions of requests per minute.\n\n 2. It works flawlessly with both IPv4 and IPv6 addresses, so no matter what sort of technology you're using, there won't be issues.\n\n 3. It's always online and available, and its infrastructure is powered by Heroku, which means that regardless of whether the server running the API dies, or if there's an enormous tornado which destroys half of the east coast, ipify will still be running!\n\n 4. ipify is completely open source (check out the GitHub repository).\n\n 5. No visitor information is ever logged. Period.\n\n 6. Lastly, ipify is funded by Randall Degges, so there's no need to worry about the domain name disappearing in three years or anything like that: ipify is here to stay!\n\n## Requirements\n\nThe library requires the Rust Edition \u003e= 2018\n\n## How to Compile\n\nThe repository contains 2 folder. The first one *Rust_ipify_lib* contains the sources of the library, the second one *Rust_ipify_lib_test* contains the sources of the test.\n- To compile the library:\n  - `cd  Rust_ipify_lib`\n  - `cargo build`\n- To compile the test:\n  - `cd  Rust_ipify_lib_test`\n  - `cargo build`\n\n## How to Run\n\n- To run the test:\n  - `cd  Rust_ipify_lib_test`\n  - `cargo run`\n\n## Example\n\nThe example is provided under the `Rust_ipify_lib_test/src/` folder.\nThe file contains an example of usage of the API of the library to retrive the global IP:\n    \n    extern crate rust_ipify;\n    use rust_ipify::ipify::get_ip_json;\n    use rust_ipify::ipify::get_ip_string;\n    use rust_ipify::ipify::get_ip4_json;\n    use rust_ipify::ipify::get_ip4_string;\n    use rust_ipify::ipify::get_ip4_i32;\n    use rust_ipify::ipify::get_ip_i128;\n\n    fn main() {\n    println!(\"inside main of test \");\n\n    let result_ip64_json = get_ip_json();\n\n    match result_ip64_json {\n        Ok(r) =\u003e println!(\"Result IP ( JSON ): \\n{:#?}\\n\", r),\n        Err(e) =\u003e println!(\"error in request {:?}\", e),\n    }\n\n    let result_ip64_string = get_ip_string();\n    match result_ip64_string {\n        Ok(r) =\u003e println!(\"Result IP ( String ): \\n\\t{:#?}\\n\", r),\n        Err(e) =\u003e println!(\"error in request {:?}\", e),\n    }\n\n    let result_ip4_json = get_ip4_json();\n\n    match result_ip4_json {\n        Ok(r) =\u003e println!(\"Result IP v4 ( JSON ): \\n{:#?}\\n\", r),\n        Err(e) =\u003e println!(\"error in request {:?}\", e),\n    }\n\n    let result_ip4_string = get_ip4_string();\n    match result_ip4_string {\n        Ok(r) =\u003e println!(\"Result IP v4 ( String ): \\n\\t{:#?}\\n\", r),\n        Err(e) =\u003e println!(\"error in request {:?}\", e),\n    }\n\n    let result_ip4_i32 = get_ip4_i32();\n    match result_ip4_i32 {\n        Ok(r) =\u003e println!(\"Result IP v4 ( i32 ): \\n\\t{:#?}\\n\", r),\n        Err(e) =\u003e println!(\"error in request {:?}\", e),\n    }\n\n    let result_ip_i128 = get_ip_i128();\n    match result_ip_i128 {\n        Ok(r) =\u003e println!(\"Result IP ( i128 ): \\n\\t{:#?}\\n\", r),\n        Err(e) =\u003e println!(\"error in request {:?}\", e),\n    }\n\n## How to contribute \n[![GitHub contributors](https://img.shields.io/github/contributors/ZigRazor/rust_ipify.svg)](https://GitHub.com/ZigRazor/rust_ipify/graphs/contributors/)\n\nIf you want give your support you can create a ***pull request***   [![GitHub pull-requests](https://img.shields.io/github/issues-pr/ZigRazor/rust_ipify.svg)](https://GitHub.com/ZigRazor/rust_ipify/pull/) \n\nor report an ***issue***  [![GitHub issues](https://img.shields.io/github/issues/ZigRazor/rust_ipify.svg)](https://GitHub.com/ZigRazor/rust_ipify/issues/).\n\nIf you want to change the code, or fix issue, or implement a new feature please read our [CONTRIBUTING Guide](https://github.com/ZigRazor/rust_ipify/blob/master/CONTRIBUTING.md).\n\n## Site\n\nCheckout last released version from Crates.io Site [here](https://crates.io/crates/rust_ipify)\n\n## Contact\nE-Mail : zigrazor@gmail.com\n\n[GitHub Profile](https://github.com/ZigRazor) ![Profile views](https://gpvc.arturio.dev/ZigRazor)\n\n![ZigRazor's github stats](https://github-readme-stats.vercel.app/api?username=ZigRazor\u0026show_icons=true\u0026title_color=fff\u0026icon_color=79ff97\u0026text_color=9f9f9f\u0026bg_color=151515)\n\n## Support\nTo support me just add ***Star*** the project  [![GitHub stars](https://img.shields.io/github/stars/ZigRazor/rust_ipify.svg?style=social\u0026label=Star\u0026maxAge=2592000)](https://GitHub.com/ZigRazor/rust_ipify/stargazers/) or ***follow me***  [![GitHub followers](https://img.shields.io/github/followers/ZigRazor.svg?style=social\u0026label=Follow\u0026maxAge=2592000)](https://github.com/ZigRazor?tab=followers)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzigrazor%2Frust_ipify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzigrazor%2Frust_ipify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzigrazor%2Frust_ipify/lists"}