diff --git a/README.md b/README.md
index 39eb54dd..6b6fdb53 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,15 @@
# Holy Unblocker
-A website that can be used to bypass web filters; both extension and firewall. This is the public source code for Holy Unblocker.
+A website that can be used to bypass web filters; both extension and firewall. This is the public source code for Holy Unblocker. Works on a large number of sites including YouTube (Full Quality Support), Discord, CoolMathGames and more!
-[](https://heroku.com/deploy?template=https://github.com/QuiteAFancyEmerald/HolyUnblockerPublic/)
+Official Site: https://www.holyubofficial.ml/
+
+
+
+
+
+
+
+
## How to Install
diff --git a/app.js b/app.js
index 4da5e731..a8ada1f1 100644
--- a/app.js
+++ b/app.js
@@ -105,7 +105,7 @@ function error(statusCode, info) {
}
return (fs.readFileSync('public/assets/error.html', 'utf8').toString().replace('%ERROR%', `An error has occurred!`))
}
-
+// Post data to set URl's for reverse proxy URL's, or safer redirecting to proxied websites.
app.post('/createSession', async (req, res) => {
if (req.body.url.startsWith('//')) {
req.body.url = 'http:' + req.body.url;
@@ -122,6 +122,7 @@ app.post('/createSession', async (req, res) => {
}
})
+// Custom prefix support will be in full effect soon!
var prefix = '/fetch';
app.use(prefix, async (req, res, next) => {
@@ -146,18 +147,21 @@ app.use(prefix, async (req, res, next) => {
var httpsAgent = new https.Agent({
keepAlive: true
});
-
+
+ // We are using the clients request headers as the headers to send the request so that headers such as Authorization will be passed through in a XML or fetch() request.
+ // The host header has to be set to the websites host and not the apps hostname so that there won't be issues.
var fetchHeaders = req.headers
fetchHeaders['referer'] = location.href
fetchHeaders['origin'] = location.origin
fetchHeaders['host'] = location.hostname
+ // Cookie header causing issues sometimes :cursed:
if (fetchHeaders['cookie']) {
delete fetchHeaders['cookie']
}
var options = {
method: req.method,
headers: fetchHeaders,
- redirect: 'manual',
+ redirect: 'manual',
agent: function(_parsedURL) {
if (_parsedURL.protocol == 'http:') {
return httpAgent;
@@ -168,7 +172,6 @@ app.use(prefix, async (req, res, next) => {
};
if (req.method == 'POST') {
- // Have to do try catch for this POST data parser until we create our own one that won't have a syntax error sometimes.
try {
// str_body is a string containing the requests body
options['body'] = req.str_body;
@@ -176,6 +179,7 @@ app.use(prefix, async (req, res, next) => {
return;
}
}
+ // Makes sure to use the session URL that is contained so RV mode works.
if (req.url.startsWith('/rv')) {
location.origin_encoded = 'rv'
}
@@ -186,6 +190,7 @@ app.use(prefix, async (req, res, next) => {
return;
}
}
+ // Custom fixes for websites such as Discord and Reddit.
if (location.href == 'https://discord.com' || location.href == 'https://discord.com/new') {
return res.redirect(307, `/fetch/${location.origin_encoded}/login`)
}
@@ -195,7 +200,8 @@ app.use(prefix, async (req, res, next) => {
return res.redirect(307, '/fetch/rv' + location.path)
}
return res.redirect(307, '/fetch/' + base64Encode('https://old.reddit.com') + location.path)
- }
+ }
+ // This is where I am making the request, and getting the buffer and headers.
const response = await fetch(location.href, options).catch(err => res.send(error('404', `"${xss(location.href)}" was not found!`)));
if(typeof response.buffer != 'function')return;
var resbody = await response.buffer();
@@ -209,17 +215,21 @@ app.use(prefix, async (req, res, next) => {
Object.entries(JSON.parse(JSON.stringify(response.headers.raw())))
.map(([key, val]) => [key, val[0]])
);
+ // Making sure redirects are proxied.
if (serverHeaders['location']) {
if (req.url.startsWith('/rv') && req.session.rvURL) {
req.session.rvURL = String(serverHeaders['location']).split('/').splice(0, 3).join('/')
return res.redirect(307, '/fetch/rv/' + String(serverHeaders['location']).split('/').splice(3).join('/'))
} else return res.redirect(307, '/fetch/' + rewriteURL(String(serverHeaders['location'])))
}
+ // These headers can be conflicting.
delete serverHeaders['content-encoding']
delete serverHeaders['x-frame-options']
delete serverHeaders['strict-transport-security']
delete serverHeaders['content-security-policy']
delete serverHeaders['location']
+
+ // Setting status, headers, and content-type.
res.status(response.status)
res.set(serverHeaders)
res.contentType(contentType)
@@ -300,7 +310,7 @@ app.use('/alloy/url/',function (req, res, next) {
res.redirect(307, '/fetch/' + fullURL)
})
-
+// Utils section. Where stuff such as inject scripts are found!
app.use('/alloy/',function (req, res, next) {
if (req.query.url) {
@@ -325,7 +335,6 @@ res.sendFile(__dirname + '/alloy' + req.url, function (err) {
})
-
app.use(function (req, res, next) {
res.sendFile(__dirname + '/public' + req.url, function (err) {
if (err) {
diff --git a/app.json b/app.json
index 7dcc9345..540a6b88 100644
--- a/app.json
+++ b/app.json
@@ -1,7 +1,7 @@
{
- "name": "Alloy Proxy",
- "description": "A node.js web proxy featuring URL encoding, and amazing compatablity!",
- "repository": "https://github.com/titaniumnetwork-dev/alloyproxy/",
- "logo": "https://avatars1.githubusercontent.com/u/47227492?s=200&v=4",
- "keywords": ["node", "proxy", "unblocker"]
+ "name": "Holy Unblocker",
+ "description": "A website that can be used to bypass web filters; both extension and firewall. Alloy Proxy hosted locally. (Can be used as a template.)",
+ "repository": "https://github.com/QuiteAFancyEmerald/HolyUnblockerPublic/",
+ "logo": "https://www.holyubofficial.ml/assets/img/i.png",
+ "keywords": ["node", "proxy", "unblocker" , "webproxy" , "games" , "holyunblocker" , "alloy"]
}
diff --git a/public/assets/img/2048.PNG b/public/assets/img/2048.PNG
new file mode 100644
index 00000000..c6b6f9d0
Binary files /dev/null and b/public/assets/img/2048.PNG differ
diff --git a/public/css/games.css b/public/css/games.css
index 88795e38..8344b5a5 100644
--- a/public/css/games.css
+++ b/public/css/games.css
@@ -1,24 +1,4 @@
-body{
- margin: 0;
- padding: 0;
- font-family: sans-serif;
-}
-header{
- overflow: hidden;
- background: #e74c3c;
- padding: 60px 0;
- text-align: center;
- color: white;
- text-transform: uppercase;
-}
-footer{
- overflow: hidden;
- background: #e74c3c;
- padding: 20px 0;
- text-align: center;
- color: white;
- text-transform: uppercase;
-}
+
.gallerys{
padding: 10px;
overflow: hidden;
diff --git a/public/gametest.html b/public/gametest.html
new file mode 100644
index 00000000..d7ebfb05
--- /dev/null
+++ b/public/gametest.html
@@ -0,0 +1,164 @@
+
+
+
+