Refactor XRayMOD into a Secure VPN Infrastructure Control Plane - #59
Open
Pakrohk wants to merge 20 commits into
Open
Refactor XRayMOD into a Secure VPN Infrastructure Control Plane#59Pakrohk wants to merge 20 commits into
Pakrohk wants to merge 20 commits into
Conversation
Add /twa user+admin surfaces (scoped by ?ref=), six-language keys, and refresh the main panel dashboard/protocols with the same bento patterns. Version stays 5.1.1.
Add DE/NL/FI/TR-weighted clean-IP pools with larger scan limits, one-click recommended subscription, in-panel GitHub→Cloudflare self-update with live steps, and clearer Persian login UX. Co-authored-by: Cursor <cursoragent@cursor.com>
Accept the install-time password when hashes desync, resync PBKDF2 hashes, and return clearer Persian login errors. Co-authored-by: Cursor <cursoragent@cursor.com>
Tag recommended/clean-IP subscription entries with 🇩🇪/🇳🇱/… so clients display the country next to each node. Co-authored-by: Cursor <cursoragent@cursor.com>
Add nightly Auto Clean-IP + health-check cron, speed profiles, 24h guest subs with QR, Iran split routing, failover tags, pro canary, presets, backup/restore, multi-node, Worker rollback, and a polished Lab panel. Update EN/FA READMEs with the new feature set. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Wire D1-backed plans/wallet/coupons/reseller, complete ?ref= invite attribution with commission, and cron Telegram alerts for pause/cap/weak IPs/suspicious login. Co-authored-by: Cursor <cursoragent@cursor.com>
Drop /twa UI, telegram-bot, worker Telegram/commerce/alerts paths, and related deps so the product is panel-only. Co-authored-by: Cursor <cursoragent@cursor.com>
Edge was still serving cached Mini App HTML via SPA fallback; block /twa,/bot,/api/commerce explicitly. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Guarantee Mini App paths never hit SPA/assets, even under SECURE PATH or stale edge cache. Co-authored-by: Cursor <cursoragent@cursor.com>
Keep Lab + TWA removal overlays; take upstream deps/remote API; restore canonical 1.9.12 versioning. Co-authored-by: Cursor <cursoragent@cursor.com>
Fix post-merge lint fallout, document architecture/cleanup audits, and introduce Cloudflare Edge Provider for control-plane API calls. Co-authored-by: Cursor <cursoragent@cursor.com>
sync: EvolveBeyond 1.9.12 + AGENTS control-plane migration plan
Panel update was marking itself current after applying an old rolling bundle. Track the rolling tag commit, warn when it lags main, and bust download cache so republished assets are actually fetched. Co-authored-by: Cursor <cursoragent@cursor.com>
…copy Add agent enroll/heartbeat APIs, security policy, rolling wizard artifacts, and a panel Wizard page. Mark shell installers deprecated without deleting them. Co-authored-by: Cursor <cursoragent@cursor.com>
Panel deploys via prebuilt worker.mjs (not wrangler TS) with run_worker_first so CSS/JS get correct Content-Type; HTML routes no longer download as files. Co-authored-by: Cursor <cursoragent@cursor.com>
One-command panel ship from ~/.xraymod/config.json; deploy script retries transient SSL/API failures when uploading UI assets. Co-authored-by: Cursor <cursoragent@cursor.com>
… lib. Align wizard remote deploy with rolling worker.mjs + assets and run_worker_first; add OAuth PKCE endpoints and operator docs for ship-panel/rolling publish. Co-authored-by: Cursor <cursoragent@cursor.com>
English-only control-plane docs and panel copy; delete README.fa.md; drop fa i18n/RTL/Vazirmatn defaults. Co-authored-by: Cursor <cursoragent@cursor.com>
Pakrohk
marked this pull request as draft
August 21, 2026 00:56
Pakrohk
marked this pull request as ready for review
August 21, 2026 00:57
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR introduces a major architectural refactor of XRayMOD, moving the project from a traditional VPN/proxy panel model toward a Secure VPN Infrastructure Control Plane.
The new architecture clearly separates the control plane from the data plane, introduces an Edge Provider abstraction, establishes a Node Agent model, makes the Wizard the canonical deployment/orchestration path, and adds stronger security, policy, deployment, and CI infrastructure.
This PR also synchronizes the project with upstream
1.9.12while preserving XRayMOD-specific architecture and security decisions.Type of change
Architectural Changes
Control Plane / Data Plane separation
XRayMOD now explicitly distinguishes between:
Control Plane
Data Plane
The Worker is no longer treated as the VPN runtime. Its role is limited to infrastructure control, policy, orchestration, and edge-facing services.
Edge Provider abstraction
A new Edge Provider abstraction decouples XRayMOD from Cloudflare-specific implementation details.
Cloudflare is currently the first provider implementation, allowing future providers or infrastructure integrations to be introduced without coupling the core architecture directly to Cloudflare APIs.
Node Agent
A new Node Agent contract provides a structured way for managed nodes to:
The architecture keeps actual proxy/data-plane execution outside the Worker.
Wizard as the canonical orchestrator
The installation and deployment Wizard is now the primary orchestration surface.
It provides:
Legacy shell installers remain available for compatibility but are no longer treated as the primary installation path.
Security Improvements
This refactor introduces a dedicated security policy layer and strengthens several infrastructure boundaries:
xrm_node_bearer credentialsDeployment & Release Infrastructure
The deployment workflow has been redesigned around reproducible rolling artifacts.
Added:
publish-rolling.shship-panel.shworker.mjsartifactsassets.tar.gzdeployment flowrun_worker_firstdeployment handlingThe preferred production path now preserves existing D1 state and supports controlled panel updates.
CI Improvements
CI now validates the actual project surfaces instead of silently ignoring failures.
The pipeline now runs:
npm run lint npm run build:ui npm testA dedicated rolling-bundle workflow was also added for publishing deployable artifacts.
Product & Repository Cleanup
This PR also removes deprecated product surfaces that no longer fit the new architecture:
telegram-bot/These removals are intentional architectural decisions rather than simple file cleanup.
Legacy installer and compatibility code remains where required and is not permanently removed without an explicit cleanup decision.
Versioning
The canonical product version is now maintained through:
worker/lib/version.tsTarget product version:
1.9.12
This avoids conflicting legacy version identities across the repository.
Testing
The refactor has been validated through the project's main build and test surfaces:
npm run lint npm run build:ui npm testAdditional deployment and installer paths were reviewed as part of the migration.
Notes
This PR is intentionally larger than a conventional feature PR because it establishes the architectural foundation for the next phase of XRayMOD development.
The goal is not to add another layer around the existing panel, but to establish a cleaner and more scalable infrastructure model that can support future providers, managed nodes, policy enforcement, automated deployment, and additional control-plane capabilities without coupling them to the VPN data plane.