Skip to content

About

Steem Proxy Node via CloudFlare Snippet

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

3 stars

Watchers

0 watching

Forks

Repository files navigation

Steem Proxy for Cloudflare

CI Last commit License GitHub stars Code style: Prettier Commit activity Watchers PRs welcome JavaScript percentage Repository size Top language Open pull requests Forks Open issues Node.js 22 Ask DeepWiki

A stateless Cloudflare Worker and Snippet-compatible proxy that selects a healthy Steem RPC node before forwarding each JSON-RPC request. A public instance is available at api2.steemyy.com.

Features

  • Sequential node health checks with minimum-version validation
  • Efficient failover that minimizes Cloudflare Snippet subrequests
  • Five-second deadlines and abort-signal support for upstream requests
  • CORS support for GET, POST, and preflight requests
  • Upstream status preservation with origin and version metadata
  • No application database, cookies, or client-side storage

Cloudflare Plan Requirements

The Snippet deployment requires a Cloudflare Pro plan or higher because it needs at least two subrequests: one node version check and one forwarded request. Worker deployments use the limits of their configured Workers plan.

Quick Start

Node.js 22 and npm are required.

nvm use
npm ci
npm run dev

Wrangler prints the local URL. Send a Steem JSON-RPC request to that endpoint:

curl --request POST http://localhost:8787 \
	--header "Content-Type: application/json" \
	--data '{"jsonrpc":"2.0","method":"condenser_api.get_dynamic_global_properties","params":[],"id":1}'

See the API reference for response metadata and error behavior.

Commands

Command Purpose
npm run dev Start the local Wrangler development server.
npm run test Run the Vitest suite once.
npm run test:watch Run tests in watch mode.
npm run coverage Run tests and enforce all 80% coverage thresholds.
npm run lint Check JavaScript with ESLint.
npm run lint:fix Apply safe ESLint fixes.
npm run format Check repository formatting with Prettier.
npm run format:fix Format supported repository files.
npm run build Create a Wrangler dry-run bundle in dist/.
npm run check Run formatting, linting, coverage, and build checks.
npm run deploy Deploy the Worker using Wrangler.

npm run coverage produces the JSON and HTML reports used by CI. Pull requests receive a coverage summary comment, including file coverage, from the Vitest Coverage Report Action.

Configuration

Runtime settings live in CONFIG:

Setting Default
Minimum RPC version 0.23.0
Candidate nodes api.justyy.com, api.steemit.com
Upstream timeout 5 seconds
Proxy version Date string exposed as X-Serverless-Version

Test configuration changes locally before deploying them. Adding an upstream gives that operator access to forwarded RPC payloads.

Deployment

Cloudflare Worker

Authenticate Wrangler, review wrangler.toml, and deploy:

npx wrangler login
npm run build
npm run deploy

This repository does not publish a static site or deploy GitHub Pages.

Cloudflare Snippet

The source is also compatible with a Cloudflare Snippet. Copy src/index.js into a Snippet, create a proxied DNS record for the target host, and configure a matching rule such as (http.host eq "api2.steemyy.com"). The public deployment points its placeholder DNS record to the reserved address 192.0.2.1.

Cloudflare placeholder DNS record

Depending on the zone configuration, WAF rules can reject API payloads before the Snippet runs. See Bypassing WAF for API/RPC Node: api2.steemyy.com for the public instance configuration.

Cloudflare WAF configuration Cloudflare Snippet rule

Documentation

Sibling Projects

License

MIT

Support the Project

Project support is optional. You can:

Buy me a Coffee

About

Steem Proxy Node via CloudFlare Snippet

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

3 stars

Watchers

0 watching

Forks

Releases

Sponsor this project

Packages

Contributors

Languages