mirror of
https://github.com/QuiteAFancyEmerald/Holy-Unblocker.git
synced 2025-05-12 11:30:01 -04:00
Added more games and a few modifications
This commit is contained in:
parent
7039d59bd6
commit
73d3a5a13e
51 changed files with 343 additions and 160 deletions
28
backend.js
28
backend.js
|
@ -1,13 +1,13 @@
|
|||
/* -----------------------------------------------
|
||||
* Authors: QuiteAFancyEmerald, BinBashBanana (OlyB), YÖCTDÖNALD'S and the lime
|
||||
* Additional help from Divide and SexyDuceDuce >:D
|
||||
* Additional help from Divide and SexyDuceDuce >:D test aaaa
|
||||
* ----------------------------------------------- */
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const http = require('http');
|
||||
const https = require('https');
|
||||
const express = require('express');
|
||||
const corrosion = require('./');
|
||||
const corrosion = require('corrosion');
|
||||
const config = require('./config.json');
|
||||
const insert = require('./randomization.json');
|
||||
const app = express();
|
||||
|
@ -43,8 +43,10 @@ const pages = {
|
|||
'm': 'pages/nav/emulibrary.html',
|
||||
/* Proxies */
|
||||
'q': 'pages/proxnav/corrosion.html',
|
||||
'rh': 'pages/proxnav/rammerhead.html',
|
||||
'w': 'pages/proxnav/womginx.html',
|
||||
/* Proxy Presets */
|
||||
'sx': 'pages/proxnav/preset/searx.html',
|
||||
'y': 'pages/proxnav/preset/youtube.html',
|
||||
'd': 'pages/proxnav/preset/discord.html',
|
||||
'r': 'pages/proxnav/preset/reddit.html',
|
||||
|
@ -57,10 +59,15 @@ const pages = {
|
|||
const cookingInserts = insert.content;
|
||||
const vegetables = insert.keywords;
|
||||
const charRandom = insert.chars;
|
||||
const splashRandom = insert.splash;
|
||||
const cacheBustList = {
|
||||
// "styles.css": "styles-1642900360.min.css",
|
||||
"common.js": "common-1643838852.js",
|
||||
"links.js": "links-1642900360.js"
|
||||
"styles.css": "styles-1644738239.css",
|
||||
"h5-nav.js": "h5-nav-1644738239.js",
|
||||
"desc.js": "desc-1644738239.js",
|
||||
"header.js": "header-1644738239.js",
|
||||
"footer.js": "footer-1644738239.js",
|
||||
"common.js": "common-1644738239.js",
|
||||
"links.js": "links-1644738239.js"
|
||||
};
|
||||
|
||||
function randomListItem(lis) {
|
||||
|
@ -71,12 +78,12 @@ function insertCharset(str) {
|
|||
return str.replace(/­|​|­|<wbr>/g, function() { return randomListItem(charRandom); }); // this needs to be inside a function, so that not every string is the same
|
||||
}
|
||||
|
||||
function insertCooking(str) {
|
||||
return str.replace(/<!-- IMPORTANT-HUCOOKINGINSERT-DONOTDELETE -->/g, function() { return '<span style="display: none;" data-fact="' + randomListItem(vegetables) + '" data-type="' + randomListItem(vegetables) + '">' + randomListItem(cookingInserts) + '</span>'; }); // this needs to be inside a function, so that not every string is the same
|
||||
function hutaoInsert(str) {
|
||||
return str.replace(/<!--HUTAOWOA-->/g, function() { return randomListItem(splashRandom); }); // this needs to be inside a function, so that not every string is the same
|
||||
}
|
||||
|
||||
function splashPublic(str) {
|
||||
return str.replace(/<!-- ######## -->/g, function() { return '<p class="text-center">Jo­in the <a id="tnlink" target="_blank">T­N Dis­co­rd</a> for more pr­iva️te site lin­ks. Note that this is the public version of HU which is not official. Things may not work or are unsecure.</p>'; }); // this needs to be inside a function, so that not every string is the same
|
||||
function insertCooking(str) {
|
||||
return str.replace(/<!-- IMPORTANT-HUCOOKINGINSERT-DONOTDELETE -->/g, function() { return '<span style="display: none;" data-fact="' + randomListItem(vegetables) + '" data-type="' + randomListItem(vegetables) + '">' + randomListItem(cookingInserts) + '</span>'; }); // this needs to be inside a function, so that not every string is the same
|
||||
}
|
||||
|
||||
function cacheBusting(str) {
|
||||
|
@ -87,7 +94,7 @@ function cacheBusting(str) {
|
|||
}
|
||||
|
||||
function insertAll(str) {
|
||||
return insertCharset(insertCooking(splashPublic(cacheBusting(str))));
|
||||
return insertCharset(hutaoInsert(insertCooking(cacheBusting(str))));
|
||||
}
|
||||
|
||||
function tryReadFile(file) {
|
||||
|
@ -108,7 +115,6 @@ const proxy = new corrosion({
|
|||
prefix: config.prefix || '/search/',
|
||||
codec: config.codec || 'xor',
|
||||
ws: config.ws,
|
||||
forceHttps: true,
|
||||
requestMiddleware: [
|
||||
corrosion.middleware.blacklist(blacklist, 'Service not allowed due to bot protection! Make sure you are not trying to verify on a proxy.'),
|
||||
],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue