From 8d39eae6b950057a1713a4ee8247ff17ef2e1e9e Mon Sep 17 00:00:00 2001
From: morluto <76467478+morluto@users.noreply.github.com>
Date: Fri, 9 Oct 2026 04:29:57 +0800
Subject: [PATCH] chore(website): configure Cloudflare hosting for rea.tools
---
.gitignore | 7 +++
README.md | 20 +++---
website/README.md | 78 ++++++++++++++++++++++++
website/public/guides/browser/index.html | 2 +-
website/wrangler.toml | 22 +++++++
5 files changed, 118 insertions(+), 11 deletions(-)
create mode 100644 website/wrangler.toml
diff --git a/.gitignore b/.gitignore
index a362e63e81..670f8a1be9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -50,6 +50,13 @@ Thumbs.db
# Generated website download
/website/public/examples/notes-example.zip
+# Local Cloudflare development state and credentials
+/website/.wrangler/
+/website/.dev.vars*
+/website/.env*
+!/website/.dev.vars.example
+!/website/.env*.example
+
# Build-generated MCP tool catalog (regenerated by `npm run build`; never commit)
src/generatedMcpToolCatalog.ts
diff --git a/README.md b/README.md
index 3ac6a90da2..4ffd6f4607 100644
--- a/README.md
+++ b/README.md
@@ -18,7 +18,7 @@
-**[Website](https://morluto.github.io/rea/) · [Guides](https://morluto.github.io/rea/guides/) · [Showcases](https://morluto.github.io/rea/showcase/)**
+**[Website](https://rea.tools/) · [Guides](https://rea.tools/guides/) · [Showcases](https://rea.tools/showcase/)**
[Quick start](#quick-start) · [How REA works](#how-rea-works) · [What you can analyze](#what-you-can-analyze) · [Showcases](#showcases) · [FAQ](#faq) · [Documentation](#documentation)
@@ -54,7 +54,7 @@ REA connects your agent to tools for inspecting native binaries, JavaScript and
Setup registers REA with your agent and installs matching workflow instructions. Native analysis can use an existing Hopper or Ghidra installation; setup can optionally install Hopper with approval. Static JavaScript analysis needs neither engine.
-> **[Visit the REA website](https://morluto.github.io/rea/)** for setup instructions, illustrated guides, and real case studies.
+> **[Visit the REA website](https://rea.tools/)** for setup instructions, illustrated guides, and real case studies.
## Quick start
@@ -149,12 +149,12 @@ Additional tools and host support depend on the target:
| Target | What REA returns | Requirements and guide |
| ---------------------- | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------- |
-| Native binaries | Pseudocode, assembly, strings, symbols, calls and references | Hopper, Ghidra or IDA; [native analysis](https://morluto.github.io/rea/guides/native/) |
+| Native binaries | Pseudocode, assembly, strings, symbols, calls and references | Hopper, Ghidra or IDA; [native analysis](https://rea.tools/guides/native/) |
| Offline ELF layout | Sections, segments, original symbols/relocations and static mitigation candidates | Caller-supplied pwntools on Linux x64; [binary diagnostics](docs/binary-diagnostics.md) |
| EVM bytecode | Dispatch selectors, byte offsets, inferred arguments and mutability | Local raw/hex carrier; [offline EVM guide](docs/evm-bytecode.md) |
| Recorded Linux crashes | Raw notes, every recorded thread's registers/signals and optional mapping candidates | Caller-supplied pwntools; optional GDB/pwndbg; [recorded crashes](docs/recorded-crashes.md) |
-| JavaScript / Electron | Modules, imports, source maps, routes, IPC and native add-on relationships | Node.js and npm; [application analysis](https://morluto.github.io/rea/guides/javascript/) |
-| Websites | Page structure, scripts, network observations and requested screenshots | A Chrome-family browser; [browser analysis](https://morluto.github.io/rea/guides/browser/) |
+| JavaScript / Electron | Modules, imports, source maps, routes, IPC and native add-on relationships | Node.js and npm; [application analysis](https://rea.tools/guides/javascript/) |
+| Websites | Page structure, scripts, network observations and requested screenshots | A Chrome-family browser; [browser analysis](https://rea.tools/guides/browser/) |
| Saved network captures | Requests, responses, exposed payloads and source locations | HAR; mitmdump on Linux for native mitmproxy captures; [capture guide](docs/web-network-captures.md) |
| .NET assemblies | Metadata, CIL instructions, declared native dependencies and build comparisons | Static inspection; [managed-code guide](docs/managed-code-analysis.md) |
| Android APKs | Manifest declarations, classes, decompiled methods and references | Headless JADX and a full JDK on Linux/macOS; [Android guide](docs/android-analysis.md) |
@@ -185,7 +185,7 @@ Follow a sound call into its position-to-pan helper, inspect the instructions,
and turn incomplete pseudocode into C. The reconstruction passes 3,205
original-x86 cases and reproduces all 63 compiled function bytes.
-[Read the case study](https://morluto.github.io/rea/showcase/dx-ball/) ·
+[Read the case study](https://rea.tools/showcase/dx-ball/) ·
[Reconstruction repository](https://github.com/N0zoM1z0/dx-ball)
### Notion: trace the Electron clipboard bridge
@@ -193,7 +193,7 @@ original-x86 cases and reproduces all 63 compiled function bytes.
Find the renderer's clipboard API, follow it through preload and IPC into the
main process, and inspect the rich clipboard format.
-[Read the case study](https://morluto.github.io/rea/showcase/notion/)
+[Read the case study](https://rea.tools/showcase/notion/)
### TH04: recover a DOS bullet-ring calculation
@@ -201,7 +201,7 @@ Inspect the original PC-98 game's 16-bit instructions, recover the fixed and
aimed angle calculations, and compare the reconstructed C++ with the
historical compiler output.
-[Read the case study](https://morluto.github.io/rea/showcase/th04/) ·
+[Read the case study](https://rea.tools/showcase/th04/) ·
[Reconstruction repository](https://github.com/N0zoM1z0/th04)
If you've used REA on something interesting, we'd love to see it. Share your
@@ -289,7 +289,7 @@ with your REA version, target type, steps to reproduce and error output.
## Documentation
-Start with the website's [worked guides](https://morluto.github.io/rea/guides/).
+Start with the website's [worked guides](https://rea.tools/guides/).
For exact options, prerequisites and result contracts:
- [Installation and setup](docs/installation.md): agent registration, provider configuration, updates and uninstall.
@@ -313,7 +313,7 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup and checks,
## Project links
-[Website](https://morluto.github.io/rea/) · [npm](https://www.npmjs.com/package/rea-agents) · [skills.sh](https://skills.sh/morluto/rea/reverse-engineer-anything) · [Issues](https://github.com/morluto/rea/issues) · [Security](SECURITY.md)
+[Website](https://rea.tools/) · [npm](https://www.npmjs.com/package/rea-agents) · [skills.sh](https://skills.sh/morluto/rea/reverse-engineer-anything) · [Issues](https://github.com/morluto/rea/issues) · [Security](SECURITY.md)
## Star history
diff --git a/website/README.md b/website/README.md
index 23fbca0526..09c1f8b673 100644
--- a/website/README.md
+++ b/website/README.md
@@ -130,6 +130,84 @@ The mask SVG is drawn from the seventh decoded mask. It selects zero-based
position 21 and compares its character code with 55 (`7`). Keep the figure,
solver constants and evidence notes aligned when changing this case.
+## Cloudflare Workers
+
+`wrangler.toml` serves `website/public/` through Workers Static Assets. There is
+no Worker script or frontend build. Before a preview or deployment, Wrangler
+runs the existing Python scripts to prepare the example ZIP and verify the
+website. Node.js and Python 3 must be available; the commands below use a pinned
+Wrangler version without adding it to REA's package dependencies.
+
+Cloudflare documents static-asset requests as free and unlimited, with no
+additional storage cost. See [billing and limitations](https://developers.cloudflare.com/workers/static-assets/billing-and-limitations/).
+
+### Preview and deploy
+
+Run these commands from the repository root. `--cwd website` makes the build
+paths consistent with the website configuration. Preview locally first:
+
+```sh
+npx wrangler@4.149.0 dev --cwd website --env ""
+```
+
+If `CLOUDFLARE_API_TOKEN` is already set in your shell, Wrangler uses it for
+authentication; skip `wrangler login`. If you are not using an API token, sign
+in once with `npx wrangler@4.149.0 login`. See Cloudflare's
+[authentication commands](https://developers.cloudflare.com/workers/wrangler/commands/general/).
+
+To publish a preview:
+
+```sh
+npx wrangler@4.149.0 deploy --cwd website --env ""
+```
+
+This creates `rea-website-preview` at the `workers.dev` URL printed by Wrangler.
+It does not attach `rea.tools`. Check the homepage, a nested guide, case studies,
+the Notes browser example and the Electron ZIP at that URL.
+
+### Connect rea.tools
+
+Serving the custom hostname requires an
+[active Cloudflare zone](https://developers.cloudflare.com/workers/configuration/routing/custom-domains/).
+When DNS is managed elsewhere:
+
+1. Add `rea.tools` to your Cloudflare account and choose the Free plan.
+2. Export or save the current DNS records. Review Cloudflare's imported records
+ against them, including subdomains, MX and TXT records for email and domain
+ verification; the automatic scan can miss records.
+3. If DNSSEC is enabled, follow Cloudflare's instructions to disable it at the
+ registrar before changing nameservers.
+4. At the domain registrar, replace the current nameservers with the two assigned
+ by Cloudflare. The domain can remain registered with the current registrar.
+5. Wait for Cloudflare to report the zone as Active. Re-enable DNSSEC through
+ Cloudflare afterward if required.
+
+See Cloudflare's [nameserver setup procedure](https://developers.cloudflare.com/dns/zone-setups/full-setup/setup/)
+for the complete migration steps. A CNAME to the preview's `workers.dev` hostname
+at the current DNS provider does not configure a Workers Custom Domain.
+
+Publish to the production Worker:
+
+```sh
+npx wrangler@4.149.0 deploy --cwd website --env production
+```
+
+This creates or updates `rea-website`, attaches `rea.tools`, and lets Cloudflare
+manage its DNS record and HTTPS certificate. Deployment can succeed while the
+zone is pending; verify public HTTPS after activation and certificate issuance.
+An existing CNAME at `rea.tools` must be resolved before adding the Custom Domain. The production Worker also
+retains its `workers.dev` address for direct checks. Only `rea.tools` is attached;
+`www.rea.tools` is not configured by this file.
+
+Verify
google-chrome \
--remote-debugging-port=9222 \
--user-data-dir=/tmp/rea-notes-browser \
- https://morluto.github.io/rea/examples/notes-web/
+ https://rea.tools/examples/notes-web/
Use your installed browser's executable path on macOS or Windows. diff --git a/website/wrangler.toml b/website/wrangler.toml new file mode 100644 index 0000000000..06be8ad532 --- /dev/null +++ b/website/wrangler.toml @@ -0,0 +1,22 @@ +# Serve only the public website. The default deployment is a workers.dev preview. +name = "rea-website-preview" +compatibility_date = "2026-10-08" +workers_dev = true +preview_urls = false + +[assets] +directory = "./public" +html_handling = "auto-trailing-slash" +not_found_handling = "none" + +[build] +cwd = ".." +command = "python3 scripts/prepare-website.py && python3 scripts/verify-website.py" +watch_dir = "./public/examples/notes-electron" + +# Public HTTPS depends on zone activation and certificate readiness. +[env.production] +name = "rea-website" +workers_dev = true +preview_urls = false +routes = [{ pattern = "rea.tools", custom_domain = true }]