mirror of
https://github.com/Dahlgren/arma-server-web-admin.git
synced 2024-08-30 17:22:10 +00:00
Use new built in public IP detection
This commit is contained in:
parent
9ec8e83090
commit
b3574552e2
@ -3,7 +3,6 @@ var events = require('events')
|
||||
var fs = require('fs.extra')
|
||||
var Gamedig = require('gamedig')
|
||||
var path = require('path')
|
||||
var publicIp = require('public-ip')
|
||||
var slugify = require('slugify')
|
||||
|
||||
var queryInterval = 5000
|
||||
@ -89,7 +88,7 @@ Server.prototype.makeServerConfig = function () {
|
||||
return {
|
||||
bindAddress: '',
|
||||
bindPort: this.port,
|
||||
publicAddress: this.ip,
|
||||
publicAddress: '',
|
||||
publicPort: this.port,
|
||||
a2s: {
|
||||
address: '127.0.0.1',
|
||||
@ -172,8 +171,6 @@ Server.prototype.start = function () {
|
||||
}
|
||||
|
||||
var self = this
|
||||
publicIp.v4().then(function (ip) {
|
||||
self.ip = ip
|
||||
var config = self.makeServerConfig()
|
||||
self.saveServerConfig(config, function (err) {
|
||||
if (err) {
|
||||
@ -205,7 +202,6 @@ Server.prototype.start = function () {
|
||||
|
||||
self.emit('state')
|
||||
})
|
||||
})
|
||||
|
||||
return this
|
||||
}
|
||||
|
@ -39,7 +39,6 @@
|
||||
"lodash": "^4.17.10",
|
||||
"morgan": "^1.8.1",
|
||||
"multer": "^1.3.0",
|
||||
"public-ip": "^4.0.4",
|
||||
"raw-loader": "^0.5.1",
|
||||
"serve-static": "^1.12.1",
|
||||
"slugify": "^1.1.0",
|
||||
|
Loading…
Reference in New Issue
Block a user