### Usage
Same as `proxy`.
+
+## ip
+
+Returns the requester's IP address. Uses the [Cloudflare header](https://developers.cloudflare.com/workers/runtime-apis/headers#cloudflare-headers) `CF-Connecting-IP` to get this value. Inspired by and works like [ifconfig.me](https://ifconfig.me) and [ifconfig.co](https://ifconfig.co).
+
+### Usage
+
+In bash:
+```
+curl https://x.y.workers.dev
+> <your IP address>
+```
+
+In PowerShell:
+```
+(Invoke-WebRequest https://x.y.workers.dev).Content
+> <your IP address>
+```
--- /dev/null
+addEventListener('fetch', event => {
+ event.respondWith(new Response(event.request.headers.get('CF-Connecting-IP')));
+})
--- /dev/null
+{
+ "name": "ip",
+ "version": "0.1.0",
+ "description": "Cloudflare Worker which returns the requester's IP address.",
+ "private": true,
+ "main": "index.js",
+ "scripts": {
+ "login": "wrangler login",
+ "preview": "wrangler preview",
+ "build": "wrangler build",
+ "publish": "wrangler publish"
+ },
+ "author": "Ardis Lu",
+ "license": "ISC",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/ardislu/cloudflare-workers.git"
+ }
+}