Added socksHosts and made configurable.
This commit is contained in:
parent
4a51022039
commit
f7e5eed37b
|
@ -9,6 +9,7 @@ module.exports = function () {
|
||||||
'env' : 'dev',
|
'env' : 'dev',
|
||||||
'database' : 'example.com/database',
|
'database' : 'example.com/database',
|
||||||
'web_port' : 1024,
|
'web_port' : 1024,
|
||||||
|
'tor_host' : 'example.com',
|
||||||
'tor_port' : 9050,
|
'tor_port' : 9050,
|
||||||
'amount_of_hours' : 7,
|
'amount_of_hours' : 7,
|
||||||
'hour_times' : [
|
'hour_times' : [
|
||||||
|
|
|
@ -17,6 +17,7 @@ function get(url, callback) {
|
||||||
|
|
||||||
var options = url.parse(url);
|
var options = url.parse(url);
|
||||||
options.socksPort = config().tor_port;
|
options.socksPort = config().tor_port;
|
||||||
|
options.socksHost = config().tor_host;
|
||||||
|
|
||||||
console.log(options);
|
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);
|
var options = url.parse('http://roosters5.gepro-osi.nl/roosters/rooster.php?school=' + school_id + '&type=' + scheduletype);
|
||||||
options.socksPort = config().tor_port;
|
options.socksPort = config().tor_port;
|
||||||
|
options.socksHost = config().tor_host;
|
||||||
|
|
||||||
http.get(options, function (res) {
|
http.get(options, function (res) {
|
||||||
|
|
||||||
|
@ -62,6 +63,7 @@ function rip(data) {
|
||||||
(function (studentcategory) {
|
(function (studentcategory) {
|
||||||
var options = url.parse('http://roosters5.gepro-osi.nl/roosters/rooster.php?school=' + school_id + '&type=' + data.type + '&afdeling=' + 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.socksPort = config().tor_port;
|
||||||
|
options.socksHost = config().tor_host;
|
||||||
|
|
||||||
http.get(options, function (res) {
|
http.get(options, function (res) {
|
||||||
var _download = '';
|
var _download = '';
|
||||||
|
|
Loading…
Reference in a new issue