{"id":18348671,"url":"https://github.com/averagehelper/ip-echo-vercel","last_synced_at":"2025-04-09T23:28:42.750Z","repository":{"id":112983024,"uuid":"609557900","full_name":"AverageHelper/ip-echo-vercel","owner":"AverageHelper","description":"A simple no-logs Vercel Edge function that returns the caller's IP address. (Read-only Git mirror)","archived":false,"fork":false,"pushed_at":"2023-12-15T01:50:02.000Z","size":729,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-15T14:53:55.493Z","etag":null,"topics":["mirror"],"latest_commit_sha":null,"homepage":"https://git.average.name/AverageHelper/ip-echo-vercel","language":"TypeScript","has_issues":false,"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/AverageHelper.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":"FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":"https://average.name/support"}},"created_at":"2023-03-04T14:42:48.000Z","updated_at":"2023-12-14T23:23:31.000Z","dependencies_parsed_at":null,"dependency_job_id":"958e66fc-1890-4a7b-864d-e3d42ed8c086","html_url":"https://github.com/AverageHelper/ip-echo-vercel","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AverageHelper%2Fip-echo-vercel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AverageHelper%2Fip-echo-vercel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AverageHelper%2Fip-echo-vercel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AverageHelper%2Fip-echo-vercel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AverageHelper","download_url":"https://codeload.github.com/AverageHelper/ip-echo-vercel/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248128663,"owners_count":21052441,"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":["mirror"],"created_at":"2024-11-05T21:18:46.976Z","updated_at":"2025-04-09T23:28:42.710Z","avatar_url":"https://github.com/AverageHelper.png","language":"TypeScript","funding_links":["https://average.name/support"],"categories":[],"sub_categories":[],"readme":"# IP Echo\n\nA simple no-logs Vercel Edge function that returns the caller's IP address.\n\n## Usage\n\nA `GET` request to \u003chttps://ipv4.average.name/api\u003e will return a string containing the caller's IPv4 address. Note that, because this project is hosted on Vercel, and [Vercel does not support IPv6](https://github.com/orgs/vercel/discussions/47#discussioncomment-4314763), you will only see an IPv4 address from this endpoint.\n\n```sh\n$ curl https://ipv4.average.name/api\n1.2.3.4\n```\n\nNavigating to the root returns an HTML file that defines a redirect to the `/api` endpoint, because Vercel is weird.\n\nThe API is documented using [OpenAPI](https://petstore.swagger.io/?url=https://raw.githubusercontent.com/AverageHelper/ip-echo-vercel/main/openapi.yaml). You can generate a TypeScript client by plugging our spec file into [oazapfts](https://www.npmjs.com/package/oazapfts):\n\n```sh\n$ oazapfts https://raw.githubusercontent.com/AverageHelper/ip-echo-vercel/main/openapi.yaml ./ip.ts\n```\n\n```ts\nimport { ip } from \"./ip\";\n\nconst result = await ip();\n\nswitch (result.status) {\n\tcase 200:\n\t\tconsole.info(result.data); // \"1.2.3.4\"\n\t\tbreak;\n\n\tcase 404:\n\t\tconsole.warn(\"Couldn't get IP address\");\n\t\tbreak;\n\n\tdefault:\n\t\tconsole.error(\"Something went very very wrong!\");\n}\n```\n\n## No logs?\n\nNo more than Vercel's normal logging, which looks like this:\n\n![A screenshot of Vercel's connection logs. Included is the time of the request, the request status code, the requested host name, the requested document path on the host, the requester's user agent string, and Vercel's request ID string.](/docs/images/example-logs.png)\n\nThere's not much there to identify you, unless you put some personally-identifying information into your request path, or contact me directly and inform me that you made a request.\n\nI'm not doing any additional logging myself. You can read as much [in the code](/api/index.ts), though I suppose I cannot prove that I'm running _this_ repo on the above-named endpoint on Vercel's Edge network. If you're concerned I may be snooping, feel free to run your own instance!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faveragehelper%2Fip-echo-vercel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faveragehelper%2Fip-echo-vercel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faveragehelper%2Fip-echo-vercel/lists"}