diff --git a/configuration.js b/configuration.js index 1346071..9b6e214 100644 --- a/configuration.js +++ b/configuration.js @@ -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' : [ diff --git a/schedule.js b/schedule.js index 1cdcb19..23808fc 100644 --- a/schedule.js +++ b/schedule.js @@ -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); diff --git a/spider.js b/spider.js index cdca2d8..5d41de3 100644 --- a/spider.js +++ b/spider.js @@ -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 = '';