From 4414126977d712c0d296c0c701acbf05aa620988 Mon Sep 17 00:00:00 2001
From: TheEmeraldStarr <46467239+QuiteAFancyEmerald@users.noreply.github.com>
Date: Fri, 18 Sep 2020 12:50:21 -0700
Subject: [PATCH 01/17] Update README.md
---
README.md | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/README.md b/README.md
index 39eb54dd..544135ed 100644
--- a/README.md
+++ b/README.md
@@ -3,6 +3,12 @@ A website that can be used to bypass web filters; both extension and firewall. T
[](https://heroku.com/deploy?template=https://github.com/QuiteAFancyEmerald/HolyUnblockerPublic/)
+
+
+
+
+
+
## How to Install
Either use the button above to deploy to Heroku or do the below:
From 2f9b050d488eaea7724276e3faf77a682fe81f45 Mon Sep 17 00:00:00 2001
From: TheEmeraldStarr <46467239+QuiteAFancyEmerald@users.noreply.github.com>
Date: Fri, 18 Sep 2020 12:50:54 -0700
Subject: [PATCH 02/17] Update README.md
---
README.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/README.md b/README.md
index 544135ed..3d6d4043 100644
--- a/README.md
+++ b/README.md
@@ -1,8 +1,8 @@
# 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.
-[](https://heroku.com/deploy?template=https://github.com/QuiteAFancyEmerald/HolyUnblockerPublic/)
-
+
+
From 569a1b00208b8782eb74c46e930e682a4f9a85f6 Mon Sep 17 00:00:00 2001
From: TheEmeraldStarr <46467239+QuiteAFancyEmerald@users.noreply.github.com>
Date: Fri, 18 Sep 2020 13:34:52 -0700
Subject: [PATCH 03/17] Update app.js
---
app.js | 23 ++++++++++++++++-------
1 file changed, 16 insertions(+), 7 deletions(-)
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) {
From 2dd2e92518ccdd481905f4dc66be49a82b8aaf8a Mon Sep 17 00:00:00 2001
From: TheEmeraldStarr <46467239+QuiteAFancyEmerald@users.noreply.github.com>
Date: Fri, 18 Sep 2020 13:40:47 -0700
Subject: [PATCH 04/17] Update README.md
---
README.md | 2 ++
1 file changed, 2 insertions(+)
diff --git a/README.md b/README.md
index 3d6d4043..7d8ea269 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,8 @@
# 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.
+Official Site: https://www.holyubofficial.ml/
+
From fb5c048feea8bc8828436966036f5a9cbfbda0d5 Mon Sep 17 00:00:00 2001
From: TheEmeraldStarr <46467239+QuiteAFancyEmerald@users.noreply.github.com>
Date: Fri, 18 Sep 2020 13:43:17 -0700
Subject: [PATCH 05/17] Modified Description
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 7d8ea269..6b6fdb53 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,5 @@
# 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!
Official Site: https://www.holyubofficial.ml/
From e91adf8f1acd1df546b12c0b30006bfb4780aaad Mon Sep 17 00:00:00 2001
From: TheEmeraldStarr <46467239+QuiteAFancyEmerald@users.noreply.github.com>
Date: Fri, 18 Sep 2020 13:46:10 -0700
Subject: [PATCH 06/17] Update app.json
---
app.json | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
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"]
}
From db924750cbd0cac60da4b6846b1562be4c3dda80 Mon Sep 17 00:00:00 2001
From: kinglalu <56965132+kinglalu@users.noreply.github.com>
Date: Fri, 18 Sep 2020 15:50:19 -0500
Subject: [PATCH 07/17] Create gametest.html
---
public/gametest.html | 53 ++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 53 insertions(+)
create mode 100644 public/gametest.html
diff --git a/public/gametest.html b/public/gametest.html
new file mode 100644
index 00000000..4fd2575e
--- /dev/null
+++ b/public/gametest.html
@@ -0,0 +1,53 @@
+
+
+