Skip to content

Commit 01c9e69

Browse files
author
lich2king
committed
scramjet impl
1 parent c04c373 commit 01c9e69

13 files changed

Lines changed: 83 additions & 475 deletions

File tree

‎package-lock.json‎

Lines changed: 16 additions & 409 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"@mercuryworkshop/bare-as-module3": "^2.2.2",
2020
"@mercuryworkshop/bare-mux": "^2.1.7",
2121
"@mercuryworkshop/epoxy-transport": "^2.1.28",
22-
"@mercuryworkshop/scramjet": "https://github.com/MercuryWorkshop/scramjet/releases/download/latest/mercuryworkshop-scramjet-1.0.2-dev.tgz",
22+
"@mercuryworkshop/scramjet": "https://github.com/MercuryWorkshop/scramjet/releases/download/latest/mercuryworkshop-scramjet-2.0.0-alpha.tgz",
2323
"@mercuryworkshop/libcurl-transport": "^1.3.7",
2424
"@titaniumnetwork-dev/ultraviolet": "3.2.7",
2525
"@tomphttp/bare-server-node": "<=2.0.3",

‎public/apps/index.html‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,7 @@ <h1>Looking for links</h1>
237237
<div id="proxytech" style="color: white; margin: 100px;">
238238
<h2>Technologies Used</h2>
239239
<ul>
240+
<li><a href="https://github.com/MercuryWorkshop/scramjet">Scramjet</a></li>
240241
<li><a href="https://github.com/titaniumnetwork-dev/Ultraviolet">Ultraviolet</a></li>
241242
<li><a href="https://github.com/MercuryWorkshop/EpoxyTransport">EpoxyTransport</a></li>
242243
<li><a href="https://github.com/MercuryWorkshop/Bare-as-module3">Bare</a></li>
24.4 KB
Loading

‎public/assets/scripts/class.js‎

Lines changed: 29 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -334,32 +334,45 @@ window.addEventListener('load', async () => {
334334
}
335335
else
336336
{
337-
if (typeof registerEclipseSW === 'function') {
338-
try {
339-
await registerEclipseSW();
340-
} catch (err) {
341-
console.error("Failed to register service worker. " + err.toString());
342-
}
343-
}
344-
else
345-
{
346-
// epoxy
337+
const { ScramjetController } = $scramjetLoadController();
338+
339+
const scramjet = new ScramjetController({
340+
files: {
341+
wasm: '/scram/scramjet.wasm.wasm',
342+
all: '/scram/scramjet.all.js',
343+
sync: '/scram/scramjet.sync.js',
344+
},
345+
});
346+
scramjet.init();
347+
348+
const connection = new BareMux.BareMuxConnection("/baremux/worker.js");
349+
350+
351+
352+
// epoxy
347353
try {
348354
await registerSW();
349355
} catch (err) {
350356
console.error("Failed to register service worker. " + err.toString());
351357
}
352358

353-
try {
354-
await setTransport("epoxy");
355-
} catch (err) {
356-
console.error("Failed to setTransport. " + err.toString());
357-
}
359+
let wispUrl =
360+
(location.protocol === "https:" ? "wss" : "ws") +
361+
"://" +
362+
location.host +
363+
"/wisp/";
364+
if ((await connection.getTransport()) !== "/epoxy/index.mjs") {
365+
await connection.setTransport("/epoxy/index.mjs", [{ wisp: wispUrl }]);
358366
}
367+
const sjEncode = scramjet.encodeUrl.bind(scramjet);
368+
369+
370+
359371

360372
const url = gameData.iframe_url; //search(address.value, searchEngine.value);
361373

362-
iframe.src = __uv$config.prefix + __uv$config.encodeUrl(url);
374+
iframe.src = sjEncode(url);
375+
//iframe.src = __uv$config.prefix + __uv$config.encodeUrl(url);
363376

364377

365378
}

‎public/assets/scripts/index.js‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
let categorizedGames = {
22
'enigma': document.createElement('div'),
3-
'app': document.createElement('div'),
43
'multiplayer': document.createElement('div'),
54
'car': document.createElement('div'),
65
'casual': document.createElement('div'),

‎public/assets/ts_apps.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,6 @@
4545
"name":"Unblocked Games",
4646
"image":"/assets/images/icons/apps/a8.png",
4747
"type":"proxy",
48-
"url":"https://sites.google.com/site/unblockedgames77/"
48+
"url":"https://d11jzht7mj96rr.cloudfront.net/"
4949
}
5050
]

‎public/assets/ts_apps2.json‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,12 @@
5757
"name":"Unblocked Games",
5858
"image":"/assets/images/icons/apps/a8.png",
5959
"type":"proxy",
60-
"url":"https://sites.google.com/site/unblockedgames77/"
60+
"url":"https://d11jzht7mj96rr.cloudfront.net/"
61+
},
62+
{
63+
"name":"Youtube",
64+
"image":"/assets/images/icons/apps/a9.png",
65+
"type":"proxy",
66+
"url":"https://www.youtube.com/"
6167
}
6268
]

‎public/assets/ts_games.json‎

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,17 @@
11
[
2+
{
3+
"name": "AI Chat",
4+
"description": "Free AI Chat",
5+
"article": null,
6+
"image": "/assets/images/games/2025/html2/ai-chat/ai-chat512.webp",
7+
"mobileimage": null,
8+
"controls": "Mouse and keyboard",
9+
"tags": "featured,enigma",
10+
"date_added": "2022-01-13 03:19:02",
11+
"developer": "FreezeNova",
12+
"iframe_url": "/assets/games/2025/html2/ai-chat/index.html",
13+
"enabled": "1"
14+
},
215
{
316
"name": "Football King",
417
"description": "Football King is an unblocked two-player game in which you can enjoy the thrill of a soccer match with a friend. Choose from quick, friendly matches, tournament options, and a variety of stadiums. Your new favorite soccer game will be Football King!",
@@ -3028,19 +3041,6 @@
30283041
"iframe_url": "https://zombsroyale.io/",
30293042
"enabled": "1"
30303043
},
3031-
{
3032-
"name": "Google",
3033-
"description": "The Google Search website is accessible at www.google.com. This is the main page for Google's search engine, where users can enter queries to search the web for information, images, news, videos, and more.",
3034-
"article": null,
3035-
"image": "/assets/images/icons/apps/google512.jpg",
3036-
"mobileimage": null,
3037-
"controls": "Mouse and keyboard",
3038-
"tags": "app",
3039-
"date_added": "2022-01-13 03:19:02",
3040-
"developer": "Alphabet",
3041-
"iframe_url": "https://www.google.com",
3042-
"enabled": "1"
3043-
},
30443044
{
30453045
"name": "DuckDuckGo",
30463046
"description": "Ducks",

‎public/class.html‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010

1111
<link rel='stylesheet' href='/assets/styles/class.css'>
1212

13-
<script src="/assets/scripts/uv/uv.bundle.js" type="text/javascript"></script>
14-
<script src="/assets/scripts/uv/uv.config.js" type="text/javascript"></script>
13+
<!--<script src="/assets/scripts/uv/uv.bundle.js" type="text/javascript"></script>
14+
<script src="/assets/scripts/uv/uv.config.js" type="text/javascript"></script>-->
1515

1616
<script>
1717
const url = window.location.href;
@@ -33,9 +33,10 @@
3333
<script src="/uv/uv.config.js" defer></script>
3434
<script src="/enigma/register-sw.js" defer></script>-->
3535

36-
<script src="/eclipse/uv/uv.bundle.js"></script>
37-
<script src="/eclipse/uv/uv.config.js"></script>
38-
<script src="/eclipse/register-eclipse-sw.js"></script>
36+
<script src="/scram/scramjet.all.js"></script>
37+
<script src="/baremux/index.js"></script>
38+
<script src="/epoxy/index.js"></script>
39+
<script src="/register-sw.js"></script>
3940

4041
</head>
4142

0 commit comments

Comments
 (0)