Cloudflare Session Name Service (SNS/ONS) resolver worker https://cf-ons-resolver.hloth.workers.dev/
Find a file
2025-06-13 22:08:54 +04:00
.vscode Initial commit 2025-06-04 23:29:16 +04:00
src Add ons resolving 2025-06-05 01:44:46 +04:00
.gitignore Add wrangler 2025-06-04 23:46:55 +04:00
.prettierignore Add wrangler 2025-06-04 23:46:55 +04:00
.prettierrc Initial commit 2025-06-04 23:29:16 +04:00
bun.lock Update @session.js/ons to 1.1.1 2025-06-13 22:08:54 +04:00
eslint.config.js Initial commit 2025-06-04 23:29:16 +04:00
LICENSE.md Add ons resolving 2025-06-05 01:44:46 +04:00
package.json Update @session.js/ons to 1.1.1 2025-06-13 22:08:54 +04:00
README.md Add ons resolving 2025-06-05 01:44:46 +04:00
tsconfig.json Initial commit 2025-06-04 23:29:16 +04:00
wrangler.jsonc Add ons resolving 2025-06-05 01:44:46 +04:00

Cloudflare Session Name Service (SNS/ONS) resolver worker

Made with Elysia, running on Bun with WASM for id.session.community

Deployed version: cf-ons-resolver.hloth.workers.dev

You are encouraged to deploy your own resolved to avoid rate limits and decrease load on my worker.

Deploy

Prerequisites:

  • Enable Cloudflare Workers in your Cloudflare account
  • Install Bun
  1. Clone this repository
  2. Install dependencies using bun install
  3. Run bun cf-typegen to generate files for the worker
  4. Run bun run deploy to deploy this worker under your Cloudflare Compute service

🌿 Help reduce the environmental impact of data center emissions and waste generated during computation. Switch to "Green Compute" mode in Workers & Pages -> Compute setting

Usage

GET /resolve/:ons

  • HTTP 200: {"ok":true,"sessionId":"05ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"}
  • HTTP 200: {"ok":true,"sessionId":null}
  • HTTP 400: {"ok":false,"error":"Invalid ONS"}
  • HTTP 500: {"ok":false,"error":"Internal Server Error"}

Example:

  • GET /resolve/hloth -> {"ok":true,"sessionId":"057aeb66e45660c3bdfb7c62706f6440226af43ec13f3b6f899c1dd4db1b8fce5b"}

License

MIT

Donate

hloth.dev/donate