diff --git a/app.js b/app.js index 0a1d8325..c0a45436 100644 --- a/app.js +++ b/app.js @@ -4,7 +4,7 @@ * MIT license: http://opensource.org/licenses/MIT * ----------------------------------------------- */ const - corrosion = require('./src/Corrosion'), + corrosion = require('corrosion'), path = require('path'), config = require('./config.json'), fs = require('fs'), @@ -108,19 +108,31 @@ function tryReadFile(file) { return fs.existsSync(file) ? fs.readFileSync(file, 'utf8') : text404; } -// Local corrosion proxy -const localCorrosion = new corrosion({ - prefix: '/fetch/', - ws: true, - codec: 'plain' +// Local Corrosion Proxy + +const proxy = new corrosion({ + prefix: '/search/', + title: 'Untitled Document', + ws: true, + codec: 'xor', + requestMiddleware: [ + corrosion.middleware.blacklist([ + 'accounts.google.com', + ], 'Page is blocked'), + ], }); +proxy.bundleScripts(); + /* Querystring Navigation */ app.get('/', async(req, res) => res.send(insertAll(tryReadFile(path.normalize(__dirname + '/views/' + (['/', '/?'].includes(req.url) ? siteIndex : pages[Object.keys(req.query)[0]])))))); /* Static Files Served */ app.use(express.static(path.normalize(__dirname + '/views'))); -app.use((req, res) => {if (req.url.startsWith(localCorrosion.prefix)) return localCorrosion.request(req, res); res.status(404, res.send(insertAll(text404)))}); +app.use((req, res) => { + if (req.url.startsWith(proxy.prefix)) return proxy.request(req, res); + res.status(404, res.send(insertAll(text404))) +}); server.listen(port); -console.log('Holy Unblocker is listening on port ' + port + '. This is simply a public for Holy Unblocker. Certain functions may not work properly.'); +console.log('Holy Unblocker is listening on port ' + port + '. This is simply a public for Holy Unblocker. Certain functions may not work properly.'); \ No newline at end of file diff --git a/package.json b/package.json index 05c30ccc..a95105c3 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,7 @@ "author": "Titanium Network", "license": "MIT", "dependencies": { + "corrosion": "^1.0.0", "express": "^4.17.1", "mime-types": "^2.1.27", "ws": "^7.5.3" diff --git a/src/Corrosion b/src/Corrosion deleted file mode 160000 index 665c8b74..00000000 --- a/src/Corrosion +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 665c8b74838393e783b3ce61ae341e4b739100f1 diff --git a/views/expr/common.js b/views/expr/common.js index 3ee2ee4b..6a5b3ec7 100644 --- a/views/expr/common.js +++ b/views/expr/common.js @@ -34,8 +34,17 @@ xor = (str) => { goProx = { corrosion: function(url, stealth) { +<<<<<<< HEAD document.cookie = 'oldsmobile=badcar; expires=' + (Date.now() + 259200) + '; SameSite=Lax; domain=.' + getDomain() + '; path=/; Secure;'; goToUrl("https://" + getDomain() + "/fetch/" + xor(url), stealth); +======= + document.cookie = '__cor_auth=1; expires=' + (Date.now() + 259200) + '; SameSite=Lax; domain=.' + getDomain() + '; path=/; Secure;'; + goToUrl("https://" + getDomain() + "/search/gateway?url=" + url, stealth); + }, + alloy: function(url, stealth) { + document.cookie = '__incog_prox=1; expires=' + (Date.now() + 259200) + '; SameSite=Lax; domain=.' + getDomain() + '; path=/; Secure;'; + goToUrl("https://cdn." + getDomain() + "/fetch/" + url, stealth); +>>>>>>> fa9fd4bc41ab174f8cd2e113a026440b12326b40 }, womginx: function(url, stealth) { document.cookie = 'wgauth=yes; expires=' + (Date.now() + 259200) + '; SameSite=None; domain=.' + getDomain() + '; path=/; Secure;'; @@ -83,4 +92,4 @@ goProx = { function goToChatbox(stealth) { document.cookie = 'oldsmobile=badcar; expires=' + (Date.now() + 259200) + '; SameSite=Lax; domain=.' + getDomain() + '; path=/; Secure;'; goToUrl("https://c." + getDomain() + "/app", stealth); -} +} \ No newline at end of file diff --git a/views/expr/surf.js b/views/expr/surf.js index 399db537..5ff46382 100644 --- a/views/expr/surf.js +++ b/views/expr/surf.js @@ -13,15 +13,25 @@ try { } // Corrosion -tryGetElement('al').onclick = function(e) { +tryGetElement('q').onclick = function(e) { e.preventDefault(); if (url.value) goProx.corrosion(url.value, true); } -tryGetElement('albp').onclick = function(e) { +tryGetElement('qbp').onclick = function(e) { e.preventDefault(); if (url.value) goProx.corrosion(url.value); } +// Alloy +tryGetElement('al').onclick = function(e) { + e.preventDefault(); + if (url.value) goProx.alloy(url.value, true); +} +tryGetElement('albp').onclick = function(e) { + e.preventDefault(); + if (url.value) goProx.alloy(url.value); +} + // Womginx tryGetElement('wn').onclick = function(e) { e.preventDefault(); @@ -102,13 +112,17 @@ tryGetElement('wndpbp').onclick = function(e) { e.preventDefault(); goProx.womginx("https://discord.com/app"); } +tryGetElement('qdp').onclick = function(e) { + e.preventDefault(); + goProx.corrosion("https://discord.com/app", true); +} -// Links - YouTube (Broken until new pydodge is implemented :trol:) +// Links - YouTube tryGetElement('ytbtn').onclick = function(e) { e.preventDefault(); - // goProx.pydodge("https://youtube.com", true); + goProx.corrosion("https://youtube.com", true); } tryGetElement('ytbp').onclick = function(e) { e.preventDefault(); - // goProx.pydodge("https://youtube.com"); -} + goProx.corrosion("https://youtube.com"); +} \ No newline at end of file diff --git a/views/pages/proxnav/alloy.html b/views/pages/proxnav/alloy.html new file mode 100644 index 00000000..32a2d8e3 --- /dev/null +++ b/views/pages/proxnav/alloy.html @@ -0,0 +1,159 @@ + + + +
+ + +