Skip to content

erille/my-ip

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 

Repository files navigation

My IP

Cloudflare Workers JavaScript Wrangler Last commit Repo size

My IP is a lightweight Cloudflare Worker that displays the visitor's public IP address and, when available, the proxy IP address detected from request headers. It provides a simple browser interface with click-to-copy support and a small JSON API for programmatic use.

Live Demo

The application is available at:

https://my-ip.ketah.workers.dev

Features

  • Displays the visitor's public IP address.
  • Detects and displays a proxy IP address when request headers indicate proxy usage.
  • Copies an IP address to the clipboard with one click.
  • Exposes a JSON endpoint for direct IP lookup.
  • Runs at the edge on Cloudflare Workers.

API

GET /api/ip

Example response:

{
  "myIp": "203.0.113.10",
  "proxyIp": null
}

When a proxy is detected, proxyIp contains the detected proxy address.

Project Structure

.
├── README.MD
├── worker.js
└── wrangler.toml

Development

Run the Worker locally with Wrangler:

npx wrangler dev

Deploy to Cloudflare Workers:

npx wrangler deploy

Technology

  • Cloudflare Workers
  • JavaScript
  • Wrangler

About

Cloudflare Worker that displays your public IP address and proxy IP, with click-to-copy.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors