mirror of
https://github.com/QuiteAFancyEmerald/Holy-Unblocker.git
synced 2025-05-13 03:50:02 -04:00
Fixed
This commit is contained in:
parent
a02f6e7e30
commit
55910ea89e
2 changed files with 219 additions and 223 deletions
14
app.js
14
app.js
|
@ -23,13 +23,8 @@
|
|||
key: fs.readFileSync('./ssl/default.key'),
|
||||
cert: fs.readFileSync('./ssl/default.crt')
|
||||
}
|
||||
if (config.ssl == true) {
|
||||
server = https.createServer(server_options, app);
|
||||
server_protocol = 'https://';
|
||||
} else {
|
||||
server = http.createServer(app);
|
||||
server_protocol = 'http://';
|
||||
};
|
||||
if (config.ssl == true) { server = https.createServer(server_options, app); server_protocol = 'https://';}
|
||||
else { server = http.createServer(app); server_protocol = 'http://';};
|
||||
|
||||
|
||||
console.log(`Alloy Proxy now running on ${server_protocol}0.0.0.0:${config.port}! Proxy prefix is "${config.prefix}"!`);
|
||||
|
@ -99,9 +94,10 @@
|
|||
|
||||
app.post(`${config.prefix}session/`, async(req, res, next) => {
|
||||
let url = querystring.parse(req.raw_body).url;
|
||||
if (url.startsWith('//')) { url = 'http:' + url; } else if (url.startsWith('https://') || url.startsWith('http://')) { url = url } else { url = 'http://' + url };
|
||||
if (url.startsWith('//')) { url = 'http:' + url; }
|
||||
else if (url.startsWith('https://') || url.startsWith('http://')) { url = url }
|
||||
else {url = 'http://' + url};
|
||||
return res.redirect(config.prefix + rewrite_url(url));
|
||||
|
||||
});
|
||||
|
||||
app.use(config.prefix, async(req, res, next) => {
|
||||
|
|
10
app.json
10
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"]
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue