CloudFlare Workers are pretty awesome. This project leverages Workers to turn CloudFlare's massive network into a super quick, distributed, and reliable IP echo service. Is this overkill for an IP echo service? Absolutely, but it's fun.
This is replacing my old Golang based IP echo service
- Get a CloudFlare account, if you don't already have one.
- Sign up for CloudFlare Workers and register your
worker.dev
subdomain. - Install Wrangler.
- Set up your Wrangler config with your CloudFlare creds.
- Clone this repo.
- Copy
wrangler.toml.example
->wrangler.toml
and fill in: a. Your CloudFlare account/zone ID (if you want to deploy this worker to a nonworker.dev
subdomain). b. A route where the worker will be hosted from (I use tjhop.io/echo)
# make your config, if you haven't already
wrangler config
# preview the build in the Worker Sandbox
wrangler preview --watch
# publish the worker to your `worker.dev` subdomain
wrangler publish
# or publish it to your domain on CloudFlare
wrangler publish --release