{"id":18348640,"url":"https://github.com/averagehelper/ip-echo-cloudflare","last_synced_at":"2025-04-09T23:28:43.402Z","repository":{"id":141012451,"uuid":"612769266","full_name":"AverageHelper/ip-echo-cloudflare","owner":"AverageHelper","description":"A simple no-logs Cloudflare Worker that returns the caller's IP address. (Read-only Git mirror)","archived":false,"fork":false,"pushed_at":"2023-12-16T23:24:17.000Z","size":970,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-15T14:53:56.752Z","etag":null,"topics":["mirror"],"latest_commit_sha":null,"homepage":"https://git.average.name/AverageHelper/ip-echo-cloudflare","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-11T23:08:29.000Z","updated_at":"2023-12-14T20:35:33.000Z","dependencies_parsed_at":"2023-12-17T00:25:57.201Z","dependency_job_id":null,"html_url":"https://github.com/AverageHelper/ip-echo-cloudflare","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AverageHelper%2Fip-echo-cloudflare","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AverageHelper%2Fip-echo-cloudflare/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AverageHelper%2Fip-echo-cloudflare/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AverageHelper%2Fip-echo-cloudflare/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AverageHelper","download_url":"https://codeload.github.com/AverageHelper/ip-echo-cloudflare/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248128676,"owners_count":21052443,"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:41.499Z","updated_at":"2025-04-09T23:28:43.365Z","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 Cloudflare Worker that returns the caller's IP address.\n\n## Usage\n\nA `GET` request to \u003chttps://ip.average.name\u003e will return a string containing the caller's IP address.\n\n```sh\n$ curl https://ip.average.name\n1.2.3.4\n```\n\nThe API is documented using [OpenAPI](https://petstore.swagger.io/?url=https://ip.average.name/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://ip.average.name/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\nNot actively. Cloudflare lets me start streaming live access logs down on-demand, and these logs tell me the IP address and inferred location of the request, which is far from ideal. You'll just have to trust that I'm not storing that anywhere.\n\nIf you're concerned I may be snooping, feel free to run your own instance:\n\n### Prerequisites\n\nThis project uses [Nixpkg](https://nixos.org/download#download-nix) to manage the dev environment. Our `default.nix` file currently defines an environment that has appropriate versions of `curl`, `jq`, `node`, and `npm`. To make sure you have them available on your machine, try running the following commands:\n\n```sh\n$ nix-shell\n$ npm -v \u0026\u0026 node -v\n10.1.0\nv20.9.0\n```\n\nAlternatively, you may install Node yourself by whatever method you prefer. This project requires [NodeJS](https://nodejs.org/) (version 20 or later) and [NPM](https://npmjs.org/).\n\n### Clone the repo\n\n```sh\n$ cd path/to/parent\n$ git clone https://git.average.name/AverageHelper/ip-echo-cloudflare.git\n$ cd ip-echo-cloudflare\n```\n\n### Install dependencies\n\n```sh\n$ npm ci\n```\n\n### Make sure everything lints and compiles\n\n```sh\n$ npm run build\n```\n\n### Deploy to your own Cloudflare zone\n\n```sh\n$ npm run deploy\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faveragehelper%2Fip-echo-cloudflare","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faveragehelper%2Fip-echo-cloudflare","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faveragehelper%2Fip-echo-cloudflare/lists"}