forked from QuiteAFancyEmerald/Holy-Unblocker
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
823205a
commit 608881d
Showing
256 changed files
with
1,647 additions
and
32,337 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,102 +1,86 @@ | ||
/* ----------------------------------------------- | ||
* Authors: QuiteAFancyEmerald, YÖCTDÖNALD'S, BinBashBanana (OlyB), SexyDuceDuce | ||
* Additional help from Divide | ||
* Authors: QuiteAFancyEmerald, BinBashBanana (OlyB), YÖCTDÖNALD'S | ||
* Additional help from Divide and SexyDuceDuce | ||
* MIT license: http://opensource.org/licenses/MIT | ||
* ----------------------------------------------- */ | ||
const | ||
char_insert = require('./src/charinsert.js'), | ||
alloy = require('./src/alloyproxy'), | ||
path = require('path'), | ||
config = require('./config.json'), | ||
fs = require('fs'), | ||
http = require('http'), | ||
express = require('express'), | ||
app = express(), | ||
port = process.env.PORT || config.port, | ||
server = http.createServer(app); | ||
char_insert = require('./src/charinsert.js'), | ||
path = require('path'), | ||
config = require('./config.json'), | ||
fs = require('fs'), | ||
http = require('http'), | ||
express = require('express'), | ||
app = express(), | ||
port = process.env.PORT || config.port, | ||
server = http.createServer(app); | ||
|
||
btoa = (str) => { | ||
return new Buffer.from(str).toString('base64'); | ||
return new Buffer.from(str).toString('base64'); | ||
} | ||
|
||
atob = (str) => { | ||
return new Buffer.from(str, 'base64').toString('utf-8'); | ||
return new Buffer.from(str, 'base64').toString('utf-8'); | ||
} | ||
|
||
const text404 = fs.readFileSync(path.normalize(__dirname + '/views/404.html'), 'utf8'), | ||
siteIndex = 'index.html', | ||
pages = { | ||
/* Main */ | ||
'in': 'info.html', | ||
'faq': 'faq.html', | ||
'status': 'status.html', | ||
'j': 'hidden.html', | ||
's': 'pages/frame.html', | ||
'z': 'pages/surf.html', | ||
'c': 'pages/nav/credits.html', | ||
'x': 'pages/nav/bookmarklets.html', | ||
'i': 'pages/nav/icons.html', | ||
't': 'pages/nav/terms.html', | ||
/* Games */ | ||
'g': 'pages/nav/gtools.html', | ||
'h': 'pages/nav/games5.html', | ||
'el': 'pages/nav/emulators.html', | ||
'f': 'pages/nav/flash.html', | ||
/* Proxies */ | ||
'a': 'pages/proxnav/alloy.html', | ||
'w': 'pages/proxnav/womginx.html', | ||
'p': 'pages/proxnav/pmprox.html', | ||
'e': 'pages/proxnav/pydodge.html', | ||
'y': 'pages/proxnav/youtube.html', | ||
'd': 'pages/proxnav/discordhub.html', | ||
/* Ruffle and Webretro */ | ||
'fg': 'archive/gfiles/flash/index.html', | ||
'eg': 'archive/gfiles/rarch/index.html' | ||
}, | ||
/* Randomize Keywords */ | ||
cookingInserts = [ | ||
"This is a cool example cooking sentence.", | ||
"I wish I could boil hot water. Try to fill this sentence with a lot of cooking related keywords." | ||
], | ||
vegetables = ['Beet', 'Potato'], | ||
charrandom = ['­','‌']; | ||
const text404 = fs.readFileSync(path.normalize(__dirname + '/views/404.html'), 'utf8'), | ||
siteIndex = 'index.html', | ||
pages = { | ||
/* Main */ | ||
'in': 'info.html', | ||
'faq': 'faq.html', | ||
'j': 'hidden.html', | ||
's': 'pages/frame.html', | ||
'z': 'pages/surf.html', | ||
'c': 'pages/nav/credits.html', | ||
'x': 'pages/nav/bookmarklets.html', | ||
'i': 'pages/nav/icons.html', | ||
't': 'pages/nav/terms.html', | ||
/* Games */ | ||
'g': 'pages/nav/gtools.html', | ||
'h': 'pages/nav/games5.html', | ||
'el': 'pages/nav/emulators.html', | ||
'f': 'pages/nav/flash.html', | ||
/* Proxies */ | ||
'a': 'pages/proxnav/alloy.html', | ||
'w': 'pages/proxnav/womginx.html', | ||
'p': 'pages/proxnav/pmprox.html', | ||
'e': 'pages/proxnav/pydodge.html', | ||
'y': 'pages/proxnav/youtube.html', | ||
'd': 'pages/proxnav/discordhub.html', | ||
/* Ruffle and Webretro */ | ||
'fg': 'archive/gfiles/flash/index.html', | ||
'eg': 'archive/gfiles/rarch/index.html' | ||
}, | ||
/* Randomize Keywords */ | ||
cookingInserts = [ | ||
"This is a cool example cooking sentence.", | ||
"I wish I could boil hot water. Try to fill this sentence with a lot of cooking related keywords." | ||
], | ||
vegetables = ['Beet', 'Potato'], | ||
charrandom = ['­', '‌']; | ||
|
||
function randomListItem(lis) { | ||
return lis[Math.floor(Math.random() * lis.length)]; | ||
return lis[Math.floor(Math.random() * lis.length)]; | ||
} | ||
|
||
function insertCharset(str) { | ||
return str.replace(/­|​|<wbr>/g, randomListItem(charrandom)); | ||
return str.replace(/­|​|<wbr>/g, randomListItem(charrandom)); | ||
} | ||
|
||
function insertCooking(str) { | ||
return str.replace(/<!-- IMPORTANT-HUCOOKINGINSERT-DONOTDELETE -->/g, '<span style="display: none;" data-cooking="' + randomListItem(vegetables) + '" data-ingredients="' + randomListItem(vegetables) + '">' + randomListItem(cookingInserts) + '</span>'); | ||
return str.replace(/<!-- IMPORTANT-HUCOOKINGINSERT-DONOTDELETE -->/g, '<span style="display: none;" data-cooking="' + randomListItem(vegetables) + '" data-ingredients="' + randomListItem(vegetables) + '">' + randomListItem(cookingInserts) + '</span>'); | ||
} | ||
|
||
function tryReadFile(file) { | ||
return fs.existsSync(file) ? fs.readFileSync(file, 'utf8') : text404; | ||
return fs.existsSync(file) ? fs.readFileSync(file, 'utf8') : text404; | ||
} | ||
|
||
// Local Alloy Proxy | ||
const localAlloy = new alloy({ | ||
prefix: '/fetch/', | ||
error: (proxy) => { proxy.res.send(tryReadFile(path.normalize(__dirname + '/views/error.html')).replace('%ERR%', proxy.error.info.message.replace(/<|>/g, ''))); }, | ||
request: [], | ||
response: [], | ||
injection: true | ||
}); | ||
|
||
app.use(localAlloy.app); | ||
localAlloy.ws(server); | ||
|
||
// Querystring navigation | ||
/* Querystring Navigation */ | ||
app.get('/', async(req, res) => res.send(insertCooking(insertCharset(tryReadFile(path.normalize(__dirname + '/views/' + (['/', '/?'].includes(req.url) ? siteIndex : pages[Object.keys(req.query)[0]]))))))); | ||
|
||
// Static files served | ||
/* Static Files Served */ | ||
app.use(char_insert.static(path.normalize(__dirname + '/views'))); | ||
|
||
// 404 Page | ||
app.use((req, res) => res.status(404, res.send(insertCooking(text404)))); | ||
|
||
server.listen(port); | ||
console.log('Public distribution of Holy Unblocker available on port ' + port + '!'); | ||
console.log('Public distribution of Holy Unblocker available on port ' + port + '!'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,21 @@ | ||
{ | ||
"name": "holyub", | ||
"version": "4.5.0", | ||
"repository": "https://github.com/QuiteAFancyEmerald/HolyUnblockerPublic", | ||
"description": "A pretty fancy website.", | ||
"main": "app.js", | ||
"scripts": { | ||
"start": "node app.js" | ||
}, | ||
"keywords": [ | ||
"proxy", | ||
"node.js", | ||
"unblocker" | ||
], | ||
"author": "Titanium Network", | ||
"license": "MIT", | ||
"dependencies": { | ||
"express": "^4.17.1", | ||
"express-session": "^1.17.1", | ||
"mime-types": "^2.1.27", | ||
"pm2": "^4.5.5" | ||
} | ||
"name": "holyub", | ||
"version": "4.5.0", | ||
"repository": "https://github.com/QuiteAFancyEmerald/HolyUnblockerPublic", | ||
"description": "A pretty fancy website.", | ||
"main": "app.js", | ||
"scripts": { | ||
"start": "node app.js" | ||
}, | ||
"keywords": [ | ||
"proxy", | ||
"node.js", | ||
"unblocker" | ||
], | ||
"author": "Titanium Network", | ||
"license": "MIT", | ||
"dependencies": { | ||
"express": "^4.17.1", | ||
"mime-types": "^2.1.27" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<iframe style="width:100%; height:100%; top:0; bottom:0; left:0; right:0; position:fixed; border-style: none;" src="https://play​er03.com/ru​n/3/b​eta"></iframe> | ||
<iframe style="width:100%; height:100%; top:0; bottom:0; left:0; right:0; position:fixed; border-style: none;" src="https://player03.com/run/3/beta"></iframe> |
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Oops, something went wrong.