diff --git a/electron/index3.html b/electron/index3.html
index 24aba3e..5cc14a3 100644
--- a/electron/index3.html
+++ b/electron/index3.html
@@ -93,8 +93,6 @@
const {ipcRenderer} = require('electron');
const app = remote.app;
const dialog = remote.require('electron').dialog;
- const internalIp = require('internal-ip');
- const publicIpMod = require('public-ip');
const superagent = require('superagent');
const path = require('path');
const fs = require('fs');
@@ -106,11 +104,6 @@
var configFile = path.join(app.getPath('userData'), 'save/server-config.json');
var editThisUser;
var bootFlag = false;
- var publicIp;
-
- (async () => {
- publicIp = await publicIpMod.v4();
- })();
// Open a tags in OS browser
document.addEventListener('click', function (event) {
@@ -597,10 +590,6 @@
\
\
\
-
\
-
Local IP: {{networkIp}}
\
-
Public IP: {{pIp}}
\
-
\
\
\
\
@@ -638,15 +627,6 @@
\
\
',
- computed: {
- networkIp: function () {
- // `this` points to the vm instance
- return internalIp.v4.sync();
- },
- pIp: function() {
- return publicIp;
- }
- },
methods: {
updateConfig: function() {
fs.writeFileSync(configFile, JSON.stringify(loadJson), 'utf8');
@@ -755,22 +735,6 @@
}
});
- const securityViewLoggedIn = Vue.component('security-view-logged-in', {
- template: '\
- \
-
\
-

\
-
\
-
Logged In
\
-
Domain: LOADING... \
- IP Address: LOADING... \
- Certs: LOADING... \
-
\
-
\
-
\
-
'
- });
-
const securityViewSignup = Vue.component('security-view-signup', {
data: function() {
return {
diff --git a/modules/auto-port-forwarding.js b/modules/auto-port-forwarding.js
deleted file mode 100644
index a0634be..0000000
--- a/modules/auto-port-forwarding.js
+++ /dev/null
@@ -1,57 +0,0 @@
-const natupnp = require('nat-upnp');
-const winston = require('winston');
-
-var tunnelInterval;
-
-function set_gateway(gateIP) {
- gateway = gateIP;
-}
-
-
-function tunnel(port, protocol, callback) {
- tunnel_uPNP(port, callback);
-}
-
-
-function tunnel_uPNP(port, callback) {
- winston.info('Preparing to tunnel via upnp protocol');
- var client = natupnp.createClient();
-
- client.portMapping({
- public: port,
- private: port,
- ttl: 0
- }, function (err) {
- // Will be called once finished
- if (err) {
- winston.error(`uPNP failed: ${err}`);
-
- // Clear Interval
- if (tunnelInterval && callback) {
- clearInterval(tunnelInterval);
- }
-
- if (callback) {
- callback(false);
- }
- return;
- }
- if (callback) {
- callback(true);
- }
- });
-}
-
-exports.setup = function (program, callback) {
- if (program.tunnel.gateway) {
- set_gateway(args.gateway);
- }
-
- if (program.tunnel.refreshInterval) {
- tunnelInterval = setInterval(function () {
- tunnel(program.port, program.tunnel.protocol);
- }, program.tunnel.refreshInterval);
- }
-
- tunnel(program.port, program.tunnel.protocol, callback);
-}
diff --git a/modules/config/configure-commander.js b/modules/config/configure-commander.js
index aef407b..dc3b019 100644
--- a/modules/config/configure-commander.js
+++ b/modules/config/configure-commander.js
@@ -23,11 +23,6 @@ exports.setup = function (args) {
.option('-u, --user ', 'Set Username')
.option('-x, --password ', 'Set Password')
- // Port Forwarding
- .option('-t, --tunnel', 'Use nat-pmp to configure port forwarding')
- .option('-g, --gateway ', 'Manually set gateway IP for the tunnel option')
- .option('-r, --refresh ', 'Refresh rate', /^\d+$/i)
-
// lastFM
.option('-l, --luser ', 'Set LastFM Username')
.option('-z, --lpass ', 'Set LastFM Password')
diff --git a/mstream-electron.js b/mstream-electron.js
index 18c311b..2e55e2c 100644
--- a/mstream-electron.js
+++ b/mstream-electron.js
@@ -3,7 +3,6 @@ const fs = require('fs');
const fe = require('path');
const os = require('os');
const mkdirp = require('make-dir');
-const internalIp = require('internal-ip');
const AutoLaunch = require('auto-launch');
const mstreamAutoLaunch = new AutoLaunch({ name: 'mStream' });
@@ -163,11 +162,6 @@ function bootServer(program) {
shell.openExternal(protocol + '://localhost:' + program.port + '/winamp')
}
},
- {
- label: protocol + '://' + internalIp.v4.sync() + ':' + program.port, click: function () {
- shell.openExternal(protocol + '://' + internalIp.v4.sync() + ':' + program.port)
- }
- },
] },
{ type: 'separator' },
{
diff --git a/mstream.js b/mstream.js
index 32d6a3b..7590da9 100755
--- a/mstream.js
+++ b/mstream.js
@@ -132,26 +132,6 @@ exports.serveIt = function (program) {
let protocol = program.ssl && program.ssl.cert && program.ssl.key ? 'https' : 'http';
winston.info(`Access mStream locally: ${protocol + '://localhost:' + program.port}`);
winston.info(`Try the WinAmp Demo: ${protocol + '://localhost:' + program.port}/winamp`);
- require('internal-ip').v4().then(ip => {
- winston.info(`Access mStream on your local network: ${protocol + '://' + ip + ':' + program.port}`);
- });
-
- // Handle Port Forwarding
- if (program.tunnel) {
- try {
- require('./modules/auto-port-forwarding.js').setup(program, function (status) {
- if (status !== true) {
- throw new Error('Port Forwarding Failed');
- }
-
- require('public-ip').v4().then(ip => {
- winston.info(`Access mStream on the internet: ${protocol + '://' + ip + ':' + program.port}`);
- });
- });
- } catch (err) {
- winston.error('Port Forwarding Failed. The server is running but you will have to configure your own port forwarding');
- }
- }
dbModule.runAfterBoot(program);
ddns.setup(program);
diff --git a/package.json b/package.json
index 6968e28..45f51d1 100644
--- a/package.json
+++ b/package.json
@@ -26,16 +26,13 @@
"express": "^4.16.4",
"inquirer": "^6.2.2",
"inquirer-select-directory": "^1.2.0",
- "internal-ip": "^4.2.0",
"jsonwebtoken": "^8.5.0",
"lokijs": "^1.5.6",
"make-dir": "^2.1.0",
"mime-types": "^2.1.22",
"music-metadata": "^3.5.2",
"nanoid": "^2.0.1",
- "nat-upnp": "^1.1.0",
"portscanner": "^2.1.1",
- "public-ip": "^3.0.0",
"superagent": "^5.0.2",
"winston": "^3.2.1",
"ws": "^6.1.4"