ip logger works now
This commit is contained in:
parent
2ae6af38e0
commit
93b765db37
2 changed files with 10 additions and 13 deletions
|
@ -29,11 +29,11 @@
|
|||
<section>
|
||||
<h3>Grab an IP with the link below!</h3>
|
||||
<p>
|
||||
<a href="arrayinamatrix.xyz:3030">Grabber Link</a>
|
||||
<a href="http://surprise.arrayinamatrix.xyz">Grabber Link</a>
|
||||
</p>
|
||||
<br>
|
||||
<p class="aligncenter">
|
||||
<img src="/res/site/images/trollface.gif" alt="You mad bro?, Problem" />
|
||||
<img src="/res/site/images/trollface.gif" alt="You mad bro?, Problem?" />
|
||||
</p>
|
||||
</section>
|
||||
<!-- <section> -->
|
||||
|
|
|
@ -4,17 +4,16 @@ const file = require('fs');
|
|||
const requestIp = require('request-ip');
|
||||
const redirect = require('connect-redirection')
|
||||
|
||||
var httpsOptions = {
|
||||
key: fs.readFileSync('/path/to/HTTPS/server-key.pem'),
|
||||
cert: fs.readFileSync('/path/to/HTTPS/server-crt.pem')
|
||||
};
|
||||
let redirectURL = 'https://arrayinamatrix.xyz'
|
||||
if (process.argv[2] != undefined) {
|
||||
redirectURL = process.argv[2]
|
||||
}
|
||||
|
||||
let redirectURL = 'http://arrayinamatrix.xyz'
|
||||
let http_port = 3030
|
||||
let https_port = 3031
|
||||
let httpPort = 3030
|
||||
console.log(`Redirect: ${redirectURL}`);
|
||||
console.log(`Port: ${http_port}`)
|
||||
console.log(`Port: ${httpPort}`)
|
||||
console.log("########## IP LOGGER STARTED ##########");
|
||||
|
||||
const app = connect()
|
||||
.use(requestIp.mw())
|
||||
.use(redirect())
|
||||
|
@ -27,8 +26,6 @@ const app = connect()
|
|||
console.log(e);
|
||||
};
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
http.createServer(app).listen(http_port);
|
||||
https.createServer(httpsOptions, app).listen(https_port);
|
||||
http.createServer(app).listen(httpPort);
|
Loading…
Add table
Reference in a new issue