{"id":17119057,"url":"https://github.com/chyroc/detect-ip","last_synced_at":"2025-03-24T02:19:11.048Z","repository":{"id":65804568,"uuid":"599944295","full_name":"chyroc/detect-ip","owner":"chyroc","description":null,"archived":false,"fork":false,"pushed_at":"2023-02-18T00:14:24.000Z","size":20,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-29T08:23:31.304Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chyroc.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},"funding":{"github":["chyroc"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":["https://sponsor.chyroc.cn/","https://afdian.net/a/chyroc"]}},"created_at":"2023-02-10T08:21:35.000Z","updated_at":"2023-02-13T01:02:31.000Z","dependencies_parsed_at":"2023-02-23T10:00:24.121Z","dependency_job_id":null,"html_url":"https://github.com/chyroc/detect-ip","commit_stats":{"total_commits":18,"total_committers":1,"mean_commits":18.0,"dds":0.0,"last_synced_commit":"e3d420e0b23cee3b375d62ae58ad095011d8fc26"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chyroc%2Fdetect-ip","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chyroc%2Fdetect-ip/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chyroc%2Fdetect-ip/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chyroc%2Fdetect-ip/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chyroc","download_url":"https://codeload.github.com/chyroc/detect-ip/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245195962,"owners_count":20575938,"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":[],"created_at":"2024-10-14T17:56:11.081Z","updated_at":"2025-03-24T02:19:11.023Z","avatar_url":"https://github.com/chyroc.png","language":"Go","funding_links":["https://github.com/sponsors/chyroc","https://sponsor.chyroc.cn/","https://afdian.net/a/chyroc"],"categories":[],"sub_categories":[],"readme":"# detect-ip\n\ndetect-ip is a tool to detect your public ip(v4/v6).\n\n## Install\n\n- *For Cli*\n\n```shell\ngo install github.com/chyroc/detect-ip/cli/detect-ip@latest\n```\n\n- *For Go Package*\n\n```shell\ngo get github.com/chyroc/detect-ip/detect_ip\n```\n\n## Usage\n\n- *For Cli*\n\n```shell\ndetect-ip\ndetect-ip -timeout 3000 # timeout 3s\ndetect-ip -timeout 3000 -json # with json output\ndetect-ip -timeout 3000 -v4=false # disable ipv4\n```\n\n- *For Go Package*\n\n```go\npackage main\n\nimport (\n    \"fmt\"\n\n    \"github.com/chyroc/detect-ip/detect_ip\"\n)\n\nfunc main() {\n    ip := detect_ip.PublicIPV4() // PublicIPV6\n\t// ip := detect_ip.PublicIPV4(detect_ip.WithTimeout(time.Second*3))\n    fmt.Println(ip)\n}\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchyroc%2Fdetect-ip","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchyroc%2Fdetect-ip","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchyroc%2Fdetect-ip/lists"}