diff --git a/README.md b/README.md index f1746554..0a184bcd 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ This open source server is in beta status. Use at your own risk. - Verify you are in the same directory as `app.js`, then run `npm install` - Check any configuration. Create your override `user_config.json`. Especally `service_ip`. See [user_config_README.md](user_config_README.md) and [user_config.example.json](zefie_wtvp_minisrv/user_config.example.json) for more information. - **Note:** The intended use is for all custom config to be in `user_config.json` and any custom service files to go in `UserServiceVault`. If you do not care about potential issues with future `git pull`, and will manually add new upstream `config.json` entries, you could use the standard `ServiceVault` and `config.json` -- Run `node app.js` +- Run `npm start` (note: if you are using node version 17 or newer, and are getting errors, try `npm start17`) - If you have trouble running it on Windows, try a Linux machine, Windows may need a full development enviroment or extra steps. - Test with a WebTV Viewer or connect with a real box - To connect with a real box, you will need to open ports in your firewall and have a way to connect your WebTV (and preferably reroute 10.0.0.1 to the server) diff --git a/docker-compose/minisrv/Dockerfile b/docker-compose/minisrv/Dockerfile index 919866f5..fba4b1fc 100644 --- a/docker-compose/minisrv/Dockerfile +++ b/docker-compose/minisrv/Dockerfile @@ -1,4 +1,4 @@ -FROM node:current-alpine +FROM node:lts-alpine3.11 RUN apk add git bash RUN npm install -g npm@latest 2>/dev/null > /dev/null diff --git a/zefie_wtvp_minisrv/ServiceVault/wtv-1800/preregister.js b/zefie_wtvp_minisrv/ServiceVault/wtv-1800/preregister.js index 20430b9c..ac6e516e 100644 --- a/zefie_wtvp_minisrv/ServiceVault/wtv-1800/preregister.js +++ b/zefie_wtvp_minisrv/ServiceVault/wtv-1800/preregister.js @@ -82,7 +82,7 @@ if (ssid_sessions[socket.ssid].data_store.wtvsec_login) { break; case "US-DTV-disk-0MB-32MB-softmodem-CPU5230": - if (wtvshared.isMiniBrowser()) { + if (wtvshared.isMiniBrowser(ssid_sessions[socket.ssid])) { prereg_contype = "text/tellyscript"; if (ssid_sessions[socket.ssid].get("wtv-open-access")) file_path = __dirname + "/ServiceDeps/premade_tellyscripts/LC2/LC2_OpenISP_56k.tok"; else file_path = __dirname + "/ServiceDeps/premade_tellyscripts/LC2/LC2_WTV_18006138199.tok"; @@ -93,8 +93,9 @@ if (ssid_sessions[socket.ssid].data_store.wtvsec_login) { } else { // todo OpenISP telly file_path = __dirname + "/ServiceDeps/premade_tellyscripts/UTV/utv_normal.tok"; - } - } + } + } + break; case "bf0app": prereg_contype = "text/tellyscript"; diff --git a/zefie_wtvp_minisrv/ServiceVault/wtv-chat/home.js b/zefie_wtvp_minisrv/ServiceVault/wtv-chat/home.js index e3602a33..bc8e4ca3 100644 --- a/zefie_wtvp_minisrv/ServiceVault/wtv-chat/home.js +++ b/zefie_wtvp_minisrv/ServiceVault/wtv-chat/home.js @@ -109,7 +109,7 @@ Chat Home (Testing) - + diff --git a/zefie_wtvp_minisrv/ServiceVault/wtv-flashrom/lc2-download-failed.js b/zefie_wtvp_minisrv/ServiceVault/wtv-flashrom/lc2-download-failed.js index 5008076c..703b8717 100644 --- a/zefie_wtvp_minisrv/ServiceVault/wtv-flashrom/lc2-download-failed.js +++ b/zefie_wtvp_minisrv/ServiceVault/wtv-flashrom/lc2-download-failed.js @@ -44,7 +44,7 @@ Content-type: text/html` data = ` - + Update failed diff --git a/zefie_wtvp_minisrv/WTVClientSessionData.js b/zefie_wtvp_minisrv/WTVClientSessionData.js index 1737eda2..8a6d6e1a 100644 --- a/zefie_wtvp_minisrv/WTVClientSessionData.js +++ b/zefie_wtvp_minisrv/WTVClientSessionData.js @@ -345,8 +345,7 @@ class WTVClientSessionData { } isMiniBrowser() { - if (this.data_store['wtv-need-upgrade'] || this.data_store['wtv-used-8675309']) return true; - return false; + return (this.data_store['wtv-need-upgrade'] || this.data_store['wtv-used-8675309']) ? true : false; } currentConnections() { diff --git a/zefie_wtvp_minisrv/WTVShared.js b/zefie_wtvp_minisrv/WTVShared.js index d22de387..a218e373 100644 --- a/zefie_wtvp_minisrv/WTVShared.js +++ b/zefie_wtvp_minisrv/WTVShared.js @@ -33,12 +33,11 @@ class WTVShared { } isMiniBrowser(ssid_session) { - return (ssid_session.get("wtv-need-upgrade") || ssid_session.get("wtv-used-8675309")); + return (ssid_session.get("wtv-need-upgrade") || ssid_session.get("wtv-used-8675309")) ? true : false; } isOldBuild(ssid_session) { - if (this.isMiniBrowser(ssid_session) || parseInt(ssid_session.get("wtv-system-version")) < 3500) return true; - return false; + return (this.isMiniBrowser(ssid_session) || parseInt(ssid_session.get("wtv-system-version")) < 3500) ? true : false; } readMiniSrvConfig(user_config = true, notices = true) { @@ -83,7 +82,9 @@ class WTVShared { } } } catch (e) { - if (minisrv_config.config.debug_flags.debug) console.error(" * Notice: Could not find user configuration (user_config.json). Using default configuration."); + if (minisrv_config.config.debug_flags) { + if (minisrv_config.config.debug_flags.debug) console.error(" * Notice: Could not find user configuration (user_config.json). Using default configuration."); + } } } diff --git a/zefie_wtvp_minisrv/package-lock.json b/zefie_wtvp_minisrv/package-lock.json index 4e98aa74..69a96f03 100644 --- a/zefie_wtvp_minisrv/package-lock.json +++ b/zefie_wtvp_minisrv/package-lock.json @@ -1,6 +1,6 @@ { "name": "zefie_wtvp_minisrv", - "version": "0.9.20", + "version": "0.9.21", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -238,16 +238,16 @@ } }, "mime-db": { - "version": "1.48.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.48.0.tgz", - "integrity": "sha512-FM3QwxV+TnZYQ2aRqhlKBMHxk10lTbMt3bBkMAp54ddrNeVSfcQYOOKuGuy3Ddrm38I04If834fOUSq1yzslJQ==" + "version": "1.50.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.50.0.tgz", + "integrity": "sha512-9tMZCDlYHqeERXEHO9f/hKfNXhre5dK2eE/krIvUjZbS2KPcqGDfNShIWS1uW9XOTKQKqK6qbeOci18rbfW77A==" }, "mime-types": { - "version": "2.1.31", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.31.tgz", - "integrity": "sha512-XGZnNzm3QvgKxa8dpzyhFTHmpP3l5YNusmne07VUOXxou9CqUqYa/HBy124RqtVh/O2pECas/MOcsDgpilPOPg==", + "version": "2.1.33", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.33.tgz", + "integrity": "sha512-plLElXp7pRDd0bNZHw+nMd52vRYjLwQjygaNg7ddJ2uJtTlmnTCjWuPKxVu6//AdaRuME84SvLW91sIkBqGT0g==", "requires": { - "mime-db": "1.48.0" + "mime-db": "1.50.0" } }, "ms": { diff --git a/zefie_wtvp_minisrv/package.json b/zefie_wtvp_minisrv/package.json index 0a7a1974..221a00b5 100644 --- a/zefie_wtvp_minisrv/package.json +++ b/zefie_wtvp_minisrv/package.json @@ -1,12 +1,13 @@ { "name": "zefie_wtvp_minisrv", - "version": "0.9.21", + "version": "0.9.22", "description": "WebTV Service (WTVP) Emulation Server", "main": "app.js", "homepage": "https://github.com/zefie/zefie_wtvp_minisrv", "license": "GPL3", "scripts": { "start": "node app.js", + "start17": "node --openssl-legacy-provider app.js", "test": "node test.js" }, "author": { @@ -29,7 +30,7 @@ "crypto-js": "^4.1.1", "easy-crc": "0.0.2", "endianness": "^8.0.2", - "mime-types": "^2.1.31", + "mime-types": "^2.1.33", "proxy-agent": "^5.0.0", "strftime": "^0.10.0" }
Server: