mirror of
https://github.com/MercuryWorkshop/scramjet.git
synced 2025-05-14 06:50:01 -04:00
chore: code cleanup
This commit is contained in:
parent
473c756f60
commit
52e419f44e
4 changed files with 9 additions and 5 deletions
|
@ -9,7 +9,7 @@
|
|||
|
||||
<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 inteception based web proxy that aims to be the successor to Ultraviolet. It is designed with security, developer friendlyness, and performance in mind. Scramjet strives to have a clean, organized codebase to improve maintainability. Scramjet is made to evade internet censorship and arbitrary bypass web browser restrictions.
|
||||
Scramjet is an experimental inteception based web proxy that aims to be the successor to Ultraviolet. It is designed with security, developer friendlyness, 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
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import { ScramjetConfig } from "../types";
|
||||
import { Codec } from "../codecs";
|
||||
import { ScramjetFrame } from "./frame";
|
||||
import { $scramjet, loadCodecs } from "../scramjet";
|
||||
|
||||
|
|
5
src/types.d.ts
vendored
5
src/types.d.ts
vendored
|
@ -15,7 +15,6 @@ import {
|
|||
import { rewriteJs } from "./shared/rewriters/js";
|
||||
import { rewriteHeaders } from "./shared/rewriters/headers";
|
||||
import { rewriteWorkers } from "./shared/rewriters/worker";
|
||||
import type { Codec } from "./codecs";
|
||||
import { BareClient, BareMuxConnection } from "@mercuryworkshop/bare-mux";
|
||||
import { parseDomain } from "parse-domain";
|
||||
import { ScramjetHeaders } from "./shared/headers";
|
||||
|
@ -94,6 +93,10 @@ declare global {
|
|||
encode: (url: string) => string;
|
||||
decode: (url: string) => string;
|
||||
};
|
||||
version: {
|
||||
version: string;
|
||||
build: string;
|
||||
};
|
||||
};
|
||||
COOKIE: string;
|
||||
WASM: string;
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import { $scramjet } from "../scramjet";
|
||||
|
||||
export function errorTemplate(trace: string, fetchedURL: string) {
|
||||
// turn script into a data URI so we don"t have to escape any HTML values
|
||||
const script = `
|
||||
|
@ -5,8 +7,8 @@ export function errorTemplate(trace: string, fetchedURL: string) {
|
|||
fetchedURL.textContent = ${JSON.stringify(fetchedURL)};
|
||||
for (const node of document.querySelectorAll("#hostname")) node.textContent = ${JSON.stringify(location.hostname)};
|
||||
reload.addEventListener("click", () => location.reload());
|
||||
version.textContent = ${JSON.stringify(VERSION)};
|
||||
build.textContent = ${JSON.stringify(COMMITHASH)};
|
||||
version.textContent = ${JSON.stringify($scramjet.version.version)};
|
||||
build.textContent = ${JSON.stringify($scramjet.version.build)};
|
||||
`;
|
||||
|
||||
return `<!DOCTYPE html>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue