Skip to content

Commit

Permalink
remove SJ submodule
Browse files Browse the repository at this point in the history
  • Loading branch information
MotorTruck1221 committed Dec 19, 2024
1 parent 6b5b27b commit 005ecc9
Show file tree
Hide file tree
Showing 7 changed files with 134 additions and 4 deletions.
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
[submodule "vendor/scramjet"]
path = vendor/scramjet
url = https://github.com/mercuryworkshop/scramjet
1 change: 0 additions & 1 deletion vendor/scramjet
Submodule scramjet deleted from 1efcf8
6 changes: 6 additions & 0 deletions vendor/scramjet/LICENSE
Original file line number Diff line number Diff line change
@@ -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 [email protected] for information on a obtaining a dual license.
51 changes: 51 additions & 0 deletions vendor/scramjet/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<div align="center">
<img src="assets/scramjet.png" height="200" />
</div>

---

> [!WARNING]
> Scramjet is not currently production ready, DO NOT USE THIS AS THE MAIN OPTION IN YOUR SITE.
<a href="https://www.npmjs.com/package/@mercuryworkshop/scramjet"><img src="https://img.shields.io/npm/v/@mercuryworkshop/scramjet.svg?maxAge=3600" alt="npm version" /></a>

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).
7 changes: 7 additions & 0 deletions vendor/scramjet/lib/index.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
"use strict";

const { resolve } = require("node:path");

const scramjetPath = resolve(__dirname, "..", "dist");

exports.scramjetPath = scramjetPath;
3 changes: 3 additions & 0 deletions vendor/scramjet/lib/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
declare const scramjetPath: string;

export { scramjetPath };
67 changes: 67 additions & 0 deletions vendor/scramjet/package.json
Original file line number Diff line number Diff line change
@@ -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"
}
}

0 comments on commit 005ecc9

Please sign in to comment.