Added socksHosts and made configurable.
This commit is contained in:
parent
4a51022039
commit
f7e5eed37b
|
@ -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' : [
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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 = '';
|
||||
|
|
Loading…
Reference in a new issue