From 005ecc9242a22a1ba191d2cab340e053cda7e8ad Mon Sep 17 00:00:00 2001 From: MotorTruck1221 Date: Thu, 19 Dec 2024 04:42:49 -0700 Subject: [PATCH] remove SJ submodule --- .gitmodules | 3 -- vendor/scramjet | 1 - vendor/scramjet/LICENSE | 6 +++ vendor/scramjet/README.md | 51 ++++++++++++++++++++++++++ vendor/scramjet/lib/index.cjs | 7 ++++ vendor/scramjet/lib/index.d.ts | 3 ++ vendor/scramjet/package.json | 67 ++++++++++++++++++++++++++++++++++ 7 files changed, 134 insertions(+), 4 deletions(-) delete mode 160000 vendor/scramjet create mode 100644 vendor/scramjet/LICENSE create mode 100644 vendor/scramjet/README.md create mode 100644 vendor/scramjet/lib/index.cjs create mode 100644 vendor/scramjet/lib/index.d.ts create mode 100644 vendor/scramjet/package.json diff --git a/.gitmodules b/.gitmodules index 22e55e3a2..e69de29bb 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +0,0 @@ -[submodule "vendor/scramjet"] - path = vendor/scramjet - url = https://github.com/mercuryworkshop/scramjet diff --git a/vendor/scramjet b/vendor/scramjet deleted file mode 160000 index 1efcf8537..000000000 --- a/vendor/scramjet +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 1efcf85373a4a806b523154a08b8f3508694a831 diff --git a/vendor/scramjet/LICENSE b/vendor/scramjet/LICENSE new file mode 100644 index 000000000..4270c4120 --- /dev/null +++ b/vendor/scramjet/LICENSE @@ -0,0 +1,6 @@ +Scramjet is licensed under AGPL-3. You can view the full terms of the license here: https://www.gnu.org/licenses/agpl-3.0.txt + +- Your project using scramjet MUST be open source, and must be compatible with GPL +- Your project must include clear and prominent credit to the scramjet project, with a link to https://discord.gg/88CapFYSEd + +If these terms cannot work for your project, email contact@mercurywork.shop for information on a obtaining a dual license. diff --git a/vendor/scramjet/README.md b/vendor/scramjet/README.md new file mode 100644 index 000000000..5e6e5f72f --- /dev/null +++ b/vendor/scramjet/README.md @@ -0,0 +1,51 @@ +
+ +
+ +--- + +> [!WARNING] +> Scramjet is not currently production ready, DO NOT USE THIS AS THE MAIN OPTION IN YOUR SITE. + +npm version + +Scramjet is an experimental interception based web proxy that aims to be the successor to Ultraviolet. It is designed with security, developer friendliness, and performance in mind. Scramjet strives to have a clean, organized codebase to improve maintainability. Scramjet is made to evade internet censorship and bypass arbitrary web browser restrictions. + +## Supported Sites + +Some of the popular websites that Scramjet supports include: + +- [Google](https://google.com) +- [Youtube](https://www.youtube.com) +- [Spotify](https://spotify.com) +- [Discord](https://discord.com) +- [Reddit](https://reddit.com) +- [GeForce NOW](https://play.geforcenow.com/) +- [now.gg](https://now.gg) + +## Development + +### Dependencies + +- Recent versions of `node.js` and `pnpm` +- `rustup` +- `wasm-bindgen` +- `wasm-opt` +- [this `wasm-snip` fork](https://github.com/r58Playz/wasm-snip) + +#### Building + +- Clone the repository with `git clone --recursive https://github.com/MercuryWorkshop/scramjet` +- Install the dependencies with `pnpm i` +- Build the rewriter with `pnpm rewriter:build` +- Build Scramjet with `pnpm build` + +### Running Scramjet Locally + +You can run the Scramjet dev server with the command + +```sh +pnpm dev +``` + +Scramjet should now be running at `localhost:1337` and should rebuild upon a file being changed (excluding the rewriter). diff --git a/vendor/scramjet/lib/index.cjs b/vendor/scramjet/lib/index.cjs new file mode 100644 index 000000000..1eaaca915 --- /dev/null +++ b/vendor/scramjet/lib/index.cjs @@ -0,0 +1,7 @@ +"use strict"; + +const { resolve } = require("node:path"); + +const scramjetPath = resolve(__dirname, "..", "dist"); + +exports.scramjetPath = scramjetPath; diff --git a/vendor/scramjet/lib/index.d.ts b/vendor/scramjet/lib/index.d.ts new file mode 100644 index 000000000..eb8f01457 --- /dev/null +++ b/vendor/scramjet/lib/index.d.ts @@ -0,0 +1,3 @@ +declare const scramjetPath: string; + +export { scramjetPath }; diff --git a/vendor/scramjet/package.json b/vendor/scramjet/package.json new file mode 100644 index 000000000..f6d760267 --- /dev/null +++ b/vendor/scramjet/package.json @@ -0,0 +1,67 @@ +{ + "name": "@mercuryworkshop/scramjet", + "version": "1.0.2-dev", + "description": "An experimental web proxy that aims to be the successor to Ultraviolet", + "main": "./lib/index.cjs", + "types": "./lib/index.d.js", + "type": "module", + "repository": { + "type": "git", + "url": "https://github.com/MercuryWorkshop/scramjet" + }, + "files": [ + "dist/*.js", + "dist/*.js.map", + "lib" + ], + "keywords": [], + "author": "", + "license": "MIT", + "devDependencies": { + "@eslint/eslintrc": "^3.2.0", + "@eslint/js": "^9.17.0", + "@estruyf/github-actions-reporter": "^1.9.2", + "@fastify/static": "^8.0.3", + "@mercuryworkshop/bare-as-module3": "^2.2.5", + "@mercuryworkshop/epoxy-transport": "^2.1.27", + "@mercuryworkshop/libcurl-transport": "^1.3.14", + "@nebula-services/bare-server-node": "^2.0.4", + "@playwright/test": "^1.49.1", + "@rsdoctor/rspack-plugin": "^0.4.11", + "@rspack/cli": "^1.1.6", + "@rspack/core": "^1.1.6", + "@types/eslint": "^9.6.1", + "@types/estree": "^1.0.6", + "@types/node": "^22.10.2", + "@types/serviceworker": "^0.0.107", + "@typescript-eslint/eslint-plugin": "^8.18.0", + "@typescript-eslint/parser": "^8.18.0", + "dotenv": "^16.4.7", + "eslint": "^9.17.0", + "fastify": "^5.1.0", + "playwright": "^1.49.1", + "prettier": "^3.4.2", + "tslib": "^2.8.1", + "typescript": "^5.7.2", + "wisp-server-node": "^1.1.7" + }, + "dependencies": { + "@mercuryworkshop/bare-mux": "^2.1.7", + "dom-serializer": "^2.0.0", + "domhandler": "^5.0.3", + "domutils": "^3.1.0", + "htmlparser2": "^9.1.0", + "parse-domain": "^8.2.2", + "set-cookie-parser": "^2.7.1" + }, + "scripts": { + "build": "rspack build --mode production", + "rewriter:build": "cd rewriter/wasm/ && bash build.sh && cd ../../", + "dev": "node server.js", + "pub": "npm publish --no-git-checks --access public", + "format": "prettier --config .prettierrc.js --write .", + "lint": "eslint ./src/", + "lint:fix": "eslint ./src/ --fix", + "test": "npx playwright test" + } +} \ No newline at end of file