Added socksHosts and made configurable.

This commit is contained in:
Bram van der Veen 2015-06-24 17:10:12 +02:00
parent 4a51022039
commit f7e5eed37b
3 changed files with 4 additions and 0 deletions

View file

@ -9,6 +9,7 @@ module.exports = function () {
'env' : 'dev',
'database' : 'example.com/database',
'web_port' : 1024,
'tor_host' : 'example.com',
'tor_port' : 9050,
'amount_of_hours' : 7,
'hour_times' : [

View file

@ -17,6 +17,7 @@ function get(url, callback) {
var options = url.parse(url);
options.socksPort = config().tor_port;
options.socksHost = config().tor_host;
console.log(options);

View file

@ -24,6 +24,7 @@ function get() {
var options = url.parse('http://roosters5.gepro-osi.nl/roosters/rooster.php?school=' + school_id + '&type=' + scheduletype);
options.socksPort = config().tor_port;
options.socksHost = config().tor_host;
http.get(options, function (res) {
@ -62,6 +63,7 @@ function rip(data) {
(function (studentcategory) {
var options = url.parse('http://roosters5.gepro-osi.nl/roosters/rooster.php?school=' + school_id + '&type=' + data.type + '&afdeling=' + studentcategory);
options.socksPort = config().tor_port;
options.socksHost = config().tor_host;
http.get(options, function (res) {
var _download = '';