- numerous bug fixes
This commit is contained in:
zefie
2021-10-27 08:29:59 -04:00
parent 245e126298
commit 3b761a495c
9 changed files with 25 additions and 23 deletions

View File

@@ -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` - 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. - 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` - **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. - 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 - 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) - 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)

View File

@@ -1,4 +1,4 @@
FROM node:current-alpine FROM node:lts-alpine3.11
RUN apk add git bash RUN apk add git bash
RUN npm install -g npm@latest 2>/dev/null > /dev/null RUN npm install -g npm@latest 2>/dev/null > /dev/null

View File

@@ -82,7 +82,7 @@ if (ssid_sessions[socket.ssid].data_store.wtvsec_login) {
break; break;
case "US-DTV-disk-0MB-32MB-softmodem-CPU5230": case "US-DTV-disk-0MB-32MB-softmodem-CPU5230":
if (wtvshared.isMiniBrowser()) { if (wtvshared.isMiniBrowser(ssid_sessions[socket.ssid])) {
prereg_contype = "text/tellyscript"; prereg_contype = "text/tellyscript";
if (ssid_sessions[socket.ssid].get("wtv-open-access")) file_path = __dirname + "/ServiceDeps/premade_tellyscripts/LC2/LC2_OpenISP_56k.tok"; 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"; 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 { } else {
// todo OpenISP telly // todo OpenISP telly
file_path = __dirname + "/ServiceDeps/premade_tellyscripts/UTV/utv_normal.tok"; file_path = __dirname + "/ServiceDeps/premade_tellyscripts/UTV/utv_normal.tok";
} }
} }
break;
case "bf0app": case "bf0app":
prereg_contype = "text/tellyscript"; prereg_contype = "text/tellyscript";

View File

@@ -109,7 +109,7 @@ Chat Home (Testing)
<table> <table>
<tr> <tr>
<td abswidth="120">Server:</td> <td abswidth="120">Server:</td>
<td><input width="240" bgcolor=262626 text=D6D6D6 cursor=cc9933 font=proportional type="text" name="host" value="${request_headers.query.host || "chat.irchat.tv"}"></td> <td><input width="240" bgcolor=262626 text=D6D6D6 cursor=cc9933 font=proportional type="text" name="host" value="${request_headers.query.host || "irc.libera.chat"}"></td>
</tr> </tr>
<tr> <tr>

View File

@@ -44,7 +44,7 @@ Content-type: text/html`
data = `<html> data = `<html>
<head> <head>
<display switchtowebmode nooptions nostatus skipback clearback> <display switchtowebmode nooptions nostatus>
<title>Update failed</title> <title>Update failed</title>
</head> </head>

View File

@@ -345,8 +345,7 @@ class WTVClientSessionData {
} }
isMiniBrowser() { isMiniBrowser() {
if (this.data_store['wtv-need-upgrade'] || this.data_store['wtv-used-8675309']) return true; return (this.data_store['wtv-need-upgrade'] || this.data_store['wtv-used-8675309']) ? true : false;
return false;
} }
currentConnections() { currentConnections() {

View File

@@ -33,12 +33,11 @@ class WTVShared {
} }
isMiniBrowser(ssid_session) { 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) { isOldBuild(ssid_session) {
if (this.isMiniBrowser(ssid_session) || parseInt(ssid_session.get("wtv-system-version")) < 3500) return true; return (this.isMiniBrowser(ssid_session) || parseInt(ssid_session.get("wtv-system-version")) < 3500) ? true : false;
return false;
} }
readMiniSrvConfig(user_config = true, notices = true) { readMiniSrvConfig(user_config = true, notices = true) {
@@ -83,7 +82,9 @@ class WTVShared {
} }
} }
} catch (e) { } 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.");
}
} }
} }

View File

@@ -1,6 +1,6 @@
{ {
"name": "zefie_wtvp_minisrv", "name": "zefie_wtvp_minisrv",
"version": "0.9.20", "version": "0.9.21",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {
@@ -238,16 +238,16 @@
} }
}, },
"mime-db": { "mime-db": {
"version": "1.48.0", "version": "1.50.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.48.0.tgz", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.50.0.tgz",
"integrity": "sha512-FM3QwxV+TnZYQ2aRqhlKBMHxk10lTbMt3bBkMAp54ddrNeVSfcQYOOKuGuy3Ddrm38I04If834fOUSq1yzslJQ==" "integrity": "sha512-9tMZCDlYHqeERXEHO9f/hKfNXhre5dK2eE/krIvUjZbS2KPcqGDfNShIWS1uW9XOTKQKqK6qbeOci18rbfW77A=="
}, },
"mime-types": { "mime-types": {
"version": "2.1.31", "version": "2.1.33",
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.31.tgz", "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.33.tgz",
"integrity": "sha512-XGZnNzm3QvgKxa8dpzyhFTHmpP3l5YNusmne07VUOXxou9CqUqYa/HBy124RqtVh/O2pECas/MOcsDgpilPOPg==", "integrity": "sha512-plLElXp7pRDd0bNZHw+nMd52vRYjLwQjygaNg7ddJ2uJtTlmnTCjWuPKxVu6//AdaRuME84SvLW91sIkBqGT0g==",
"requires": { "requires": {
"mime-db": "1.48.0" "mime-db": "1.50.0"
} }
}, },
"ms": { "ms": {

View File

@@ -1,12 +1,13 @@
{ {
"name": "zefie_wtvp_minisrv", "name": "zefie_wtvp_minisrv",
"version": "0.9.21", "version": "0.9.22",
"description": "WebTV Service (WTVP) Emulation Server", "description": "WebTV Service (WTVP) Emulation Server",
"main": "app.js", "main": "app.js",
"homepage": "https://github.com/zefie/zefie_wtvp_minisrv", "homepage": "https://github.com/zefie/zefie_wtvp_minisrv",
"license": "GPL3", "license": "GPL3",
"scripts": { "scripts": {
"start": "node app.js", "start": "node app.js",
"start17": "node --openssl-legacy-provider app.js",
"test": "node test.js" "test": "node test.js"
}, },
"author": { "author": {
@@ -29,7 +30,7 @@
"crypto-js": "^4.1.1", "crypto-js": "^4.1.1",
"easy-crc": "0.0.2", "easy-crc": "0.0.2",
"endianness": "^8.0.2", "endianness": "^8.0.2",
"mime-types": "^2.1.31", "mime-types": "^2.1.33",
"proxy-agent": "^5.0.0", "proxy-agent": "^5.0.0",
"strftime": "^0.10.0" "strftime": "^0.10.0"
} }