NOVA_HAVEN Unblocker
h
AdCharity (174)

:(

This project will no longer be maintained and used due to complaints by the school and me not willing to make Nova Haven a reddit unblocker. DrivePortII and Nova Haven deployed to heroku will continue to run, as they are somewhat more limited in capabilities.

You are viewing a single comment. View All
roadkillsanta (0)

How did you do this? I am working on modifying node-unblocker as an app in express js on repl.it, but it isn't working properly and it gives too many redirects.

AdCharity (174)

@roadkillsanta mmm. the node unblocker isn't mine (pretty sure I explicitly sourced Nathan F. or something). Plus all I did was deploy it to heroku. An easy node unblocker could probably be
1) a proxy
2) something real simple like this:

const axios = require('axios');
const cheerio = require('cheerio');
var http = require('http');
var url = "https://bing.com";
axios.get(url)
	.then(response => {
		console.log(response.data);
		http.createServer(function (req, res) {
		res.write(response.data);
		}).listen(8000);
		console.log("Completion");
	})
	.catch(error => {
		console.log(error);
	})
roadkillsanta (0)

@AdCharity The node unblocker is from nathan, but he didn't include much documentation on how it worked (app-wise). The heroku deploy works out-of-the-box because it uses a gatlin server, but I'm not sure how to implement that in repl because it isn't a complete container solution. Thanks for the code example and libraries, I think I understand how express works now.

AdCharity (174)

@roadkillsanta yeah good luck programming :D

roadkillsanta (0)

@AdCharity yo do you have a discord or something that I can contact you with? I need some help with processing streams if you understand how they work in respect to writing them to res. I'm having trouble getting the proxy to render images and css.

AdCharity (174)

@roadkillsanta :( my school blocks discord even tho I'm in highschool. I think you could fix the images/css problem by replacing all links with input link (the one you wanted to unblock) + src. Idk if that would help tho since I haven't really tried doing it myself.

roadkillsanta (0)

@AdCharity thats an f in the chat for no discord :(
I used a library from the original node-unblocker to change all the links, but I need to implement read and write streams to get the CSS and images loaded. I'll just try different solutions and go on stackOverflow if I really can't fix the problem. Thanks for the help.

AdCharity (174)

@roadkillsanta yeah sorry :/ node.js really ain't my forte even though I program in web javascript literally every day