update: switch to scramjet v2.0.67#579
Closed
sylvieisnton wants to merge 1 commit into
Closed
Conversation
There was a problem hiding this comment.
Pull request overview
Updates the proxy front-end/runtime to use Scramjet v2.0.67 (via scramjet-controller) and consolidates service-worker handling so Scramjet routing can coexist with Ultraviolet (including an optional blacklist SW).
Changes:
- Upgrade Scramjet to
2.0.67-alpha.1and add@mercuryworkshop/scramjet-controller, adjusting build/asset routing to serve the new controller artifacts. - Replace the old Scramjet v1 bundled SW scripts with a combined SW (
views/sw.js) and a combined blacklist SW (views/sw-blacklist.js) that route Scramjet first, then UV. - Update client pages and common logic to initialize the new Scramjet controller + frame navigation model (using an internal
sj:target tag).
Reviewed changes
Copilot reviewed 22 out of 24 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| views/uv/WWError.js | Removes Workerware error helper (no longer used). |
| views/uv/workerware.js | Removes Workerware middleware implementation. |
| views/uv/sw-blacklist.js | Removes UV-only blacklist SW in favor of combined SW. |
| views/sw.js | Adds Scramjet-first combined SW routing, then UV. |
| views/sw-blacklist.js | Adds combined SW with domain blacklist for Scramjet + UV routing. |
| views/scram/scramjet.sw.js | Removes Scramjet v1 SW script. |
| views/scram/scramjet.sw-blacklist.js | Removes Scramjet v1 blacklist SW script. |
| views/scram/scramjet.all.js | Removes large Scramjet v1 bundle from repo. |
| views/pages/proxnav/ultraviolet.html | Loads new Scramjet + controller API scripts alongside UV. |
| views/pages/proxnav/scramjet.html | Switches from scramjet.all.js to scramjet.js + controller.api.js. |
| views/pages/proxnav/preset/youtube.html | Switches to new Scramjet + controller API scripts. |
| views/pages/proxnav/preset/applications.html | Switches to new Scramjet + controller API scripts. |
| views/pages/nav/partners.html | Switches to new Scramjet + controller API scripts. |
| views/pages/nav/games.html | Switches to new Scramjet + controller API scripts. |
| views/pages/frame.html | Switches to new Scramjet + controller API scripts. |
| views/assets/js/register-sw.js | Refactors initialization to register combined SW and initialize Scramjet controller + frame using transports. |
| views/assets/js/common-1778310233.js | Updates “stealth” navigation to use sj: targets and controller frame navigation; refactors Scramjet autocomplete path. |
| TODO.md | Updates TODO list items (includes new Firefox/testing note). |
| src/source-rewrites.mjs | Adjusts string escaping regex used by the build-time rewriter. |
| src/server.mjs | Adds explicit routes to serve SW files at root-level with Service-Worker-Allowed. |
| src/routes.mjs | Updates SEO/non-SEO file aliases for new Scramjet/controller artifacts and new SW filenames. |
| run-command.mjs | Updates build pipeline to pull Scramjet + controller assets from node_modules and adjust minification inputs. |
| pnpm-lock.yaml | Updates lockfile for Scramjet v2 + controller and transport version bumps. |
| package.json | Bumps transports, pins Scramjet v2 alpha, adds scramjet-controller. |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| // Should help avoid confusion when using or adding to the goProx object. | ||
| (url, mode) => { | ||
| if (!url) return; | ||
| if (parser === sjUrl) mode = 'stealth'; |
Comment on lines
+10
to
+18
| const blacklist = {}; | ||
| fetch('{{route}}{{/assets/txt/blacklist.txt}}').then((request) => { | ||
| request.text().then((textData) => { | ||
| textData | ||
| .split('\n') | ||
| .filter((domain) => domain.trim()) | ||
| .forEach((domain) => { | ||
| const domainTld = domain.replace(/.+(?=\.\w)/, ''); | ||
| if (!blacklist.hasOwnProperty(domainTld)) blacklist[domainTld] = []; |
Comment on lines
+38
to
+39
| blacklist.hasOwnProperty(domainTld) && | ||
| blacklist[domainTld].test(domain.slice(0, -domainTld.length)) |
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.
test the changes before merging 🙏