{"id":24168480,"url":"https://github.com/mamantoha/ip_address_list","last_synced_at":"2026-04-07T16:31:29.397Z","repository":{"id":272139307,"uuid":"858808816","full_name":"mamantoha/ip_address_list","owner":"mamantoha","description":"Retrieve the IP addresses (both IPv4 and IPv6) associated with the network interfaces on a system","archived":false,"fork":false,"pushed_at":"2025-08-12T11:04:05.000Z","size":41,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-12T13:25:52.492Z","etag":null,"topics":["crystal","ipaddress","ipaddresses","linux","macos","system","windows"],"latest_commit_sha":null,"homepage":"","language":"Crystal","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/mamantoha.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,"zenodo":null}},"created_at":"2024-09-17T15:13:11.000Z","updated_at":"2025-08-12T11:04:08.000Z","dependencies_parsed_at":null,"dependency_job_id":"30e2049a-a4dd-4cf8-b350-2a11b5c7deff","html_url":"https://github.com/mamantoha/ip_address_list","commit_stats":null,"previous_names":["mamantoha/ip_address_list"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/mamantoha/ip_address_list","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mamantoha%2Fip_address_list","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mamantoha%2Fip_address_list/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mamantoha%2Fip_address_list/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mamantoha%2Fip_address_list/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mamantoha","download_url":"https://codeload.github.com/mamantoha/ip_address_list/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mamantoha%2Fip_address_list/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31520421,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T16:28:08.000Z","status":"ssl_error","status_checked_at":"2026-04-07T16:28:06.951Z","response_time":105,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["crystal","ipaddress","ipaddresses","linux","macos","system","windows"],"created_at":"2025-01-12T22:14:50.810Z","updated_at":"2026-04-07T16:31:29.387Z","avatar_url":"https://github.com/mamantoha.png","language":"Crystal","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Crystal IP Address List Library\n\n[![Crystal CI](https://github.com/mamantoha/ip_address_list/actions/workflows/crystal.yml/badge.svg)](https://github.com/mamantoha/ip_address_list/actions/workflows/crystal.yml)\n[![GitHub release](https://img.shields.io/github/release/mamantoha/ip_address_list.svg)](https://github.com/mamantoha/ip_address_list/releases)\n[![License](https://img.shields.io/github/license/mamantoha/ip_address_list.svg)](https://github.com/mamantoha/ip_address_list/blob/master/LICENSE)\n\nThis library provides functionality to retrieve the IP addresses (both IPv4 and IPv6) associated with the network interfaces on a system. It is a port of Ruby's `ip_address_list` method from the `Socket` class.\n\n## Features\n\n- Retrieve both IPv4 and IPv6 addresses from network interfaces.\n- Supports Windows, Linux, and macOS.\n- Easy-to-use interface, returning a list of `Socket::IPAddress` objects.\n\n## Installation\n\n1. Add the dependency to your `shard.yml`:\n\n   ```yaml\n   dependencies:\n     ip_address_list:\n       github: mamantoha/ip_address_list\n   ```\n\n2. Run `shards install`\n\n## Usage\n\n```crystal\nrequire \"ip_address_list\"\n\np! Socket.ip_address_list\n# =\u003e [Socket::IPAddress(127.0.0.1:0),\n#     Socket::IPAddress(192.168.31.229:0),\n#     Socket::IPAddress(172.17.0.1:0),\n#     Socket::IPAddress([::1]:0),\n#     Socket::IPAddress([fdcc:60fc:349d:2fcf:7e6:1635:e1a7:1fb6]:0),\n#     Socket::IPAddress([fe80::c8e3:857d:43c8:cec3]:0)\n#     ...]\n```\n\n## Technical Notes\n\n### Windows Implementation\n\nOn Windows, this library uses the `GetAdaptersAddresses` function to retrieve network interface information, including IP addresses. You can find more information about `GetAdaptersAddresses` in the Microsoft [documentation](https://docs.microsoft.com/en-us/windows/win32/api/iphlpapi/nf-iphlpapi-getadaptersaddresses).\n\n### Linux and macOS Implementation\n\nOn Linux and macOS, the library uses the `getifaddrs` function to gather network interface information. This function is part of the standard C library and provides a linked list of structures describing the network interfaces of the local system. More details about `getifaddrs` can be found in the [Linux man page](https://man7.org/linux/man-pages/man3/getifaddrs.3.html) and the [macOS documentation](https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man3/getifaddrs.3.html).\n\n## Contributing\n\n1. Fork it (\u003chttps://github.com/mamantoha/ip_address_list/fork\u003e)\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create a new Pull Request\n\n## Contributors\n\n- [Anton Maminov](https://github.com/mamantoha) - creator and maintainer\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmamantoha%2Fip_address_list","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmamantoha%2Fip_address_list","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmamantoha%2Fip_address_list/lists"}