diff --git a/.gitignore b/.gitignore index e1b59f99..8694ade3 100644 --- a/.gitignore +++ b/.gitignore @@ -365,6 +365,7 @@ FodyWeavers.xsd /zefie_wtvp_minisrv/user_config.json /zefie_wtvp_minisrv/ServiceVault/wtv-home/home.zefie.html /zefie_wtvp_minisrv/UserServiceVault/*-*/ +/zefie_wtvp_minisrv/UserTemplates/*-*/ /zefie_wtvp_minisrv/ServiceLogPost/*.log /zefie_wtvp_minisrv/SessionStore/*.json /zefie_wtvp_minisrv/SessionStore/*/ diff --git a/README.md b/README.md index 9ffb9e45..56454b04 100644 --- a/README.md +++ b/README.md @@ -18,12 +18,20 @@ This open source server is in beta status. Use at your own risk. - Custom Tellyscripts *(not yet customizable though)* - Flat file client session store and registration system - wtv-lzpf compression support by eMac (99.9%) +- wtv-favorites support +- wtv-news support (WIP) +- wtv-mail (within same server only) +- "PC Services" (node express with minisrv custom script processing) +- "ViewerGen" Generate "WebTV Viewer" (Windows WebTV Sim) with unique SSIDs ### Current issues: - Mis-configuring wtv-disk:/sync DiskMaps may cause units to delete contents of partitions (need more info) ### Feature Todo: - TellyScript generation and/or manipulation without external dependancies +- Finish wtv-news, complete with upstream integration support (cross-minisrv usenet) +- Finish wtv-guide +- Add wtv-author (Pagebuilder) - ~~wtv-setup and bgm support~~ ***Done [v0.9.23](https://github.com/zefie/zefie_wtvp_minisrv/releases/tag/v0.9.23)*** - ~~wtv-cookie full support~~ ***Done [v0.9.13](https://github.com/zefie/zefie_wtvp_minisrv/releases/tag/v0.9.13)*** - ~~Flashrom flashing for bf0app old classic~~ ***Done [v0.9.9](https://github.com/zefie/zefie_wtvp_minisrv/releases/tag/v0.9.9)*** @@ -32,14 +40,15 @@ This open source server is in beta status. Use at your own risk. - ~~Implement HTTP proxy (needs to be able to defluff most of the web, think retro WAP converter)~~ ***Done [v0.7.1](https://github.com/zefie/zefie_wtvp_minisrv/releases/tag/v0.7.1)*** ### How To Use: -- Install [node.js](https://nodejs.org/en/download/). Be sure to say `Yes` when asked about `Chocolatey`. +- Install [node.js](https://nodejs.org/en/download/). If on Windows, be sure to say `Yes` when asked about `Chocolatey`. +- Install git (if on Windows, install from [Git for Windows](https://gitforwindows.org/) - Download a snapshot (either of master, or of any commit/branch/relase/tag etc) - Extract zip somewhere and enter that directory with a command prompt - Enter `zefie_wtvp_minisrv` subdirectory - 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 `npm start` (note: if you are using node version 17 or newer, and are getting errors, try `npm start17`) +- 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) @@ -49,4 +58,11 @@ This open source server is in beta status. Use at your own risk. - [Report Bugs](https://github.com/zefie/zefie_wtvp_minisrv/issues) - [Add a Feature and send a Pull Request](https://github.com/zefie/zefie_wtvp_minisrv/pulls) - Write and submit better documentation than I created (see Pull Request above) -- [Support financially on Patreon](https://www.patreon.com/zefie) +- **Content Creators**: Shout out this project, and my YouTube Channel (https://www.youtube.com/zefievideo) +- Financially Support: + - **Companies**: Reach out to biz@zefie.net to sponsor this project + - [Subscribe on Patreon](https://www.patreon.com/zefie) + - One-Time Support: + - [CashApp $altimit](https://cash.app/$altimit) + - Chime: $zefie + - [Credit Card or PayPal (powered by StreamElements)](https://zef.pw/ttv-tip) diff --git a/minisrv_logo.xcf b/minisrv_logo.xcf new file mode 100644 index 00000000..91238220 Binary files /dev/null and b/minisrv_logo.xcf differ diff --git a/zefie_wtvp_minisrv/.gitignore b/zefie_wtvp_minisrv/.gitignore index 6803f7b4..9e819338 100644 --- a/zefie_wtvp_minisrv/.gitignore +++ b/zefie_wtvp_minisrv/.gitignore @@ -371,4 +371,8 @@ MigrationBackup/ FodyWeavers.xsd # minisrv error log file -errors.log \ No newline at end of file +errors.log + +# PageBuilder Vault +PageBuilderVault/http_pb/* +!PageBuilderVault/http_pb/clipart \ No newline at end of file diff --git a/zefie_wtvp_minisrv/PageBuilderVault/http_pb/WebTV_88150/Cat/clipart/Animals/Cats_n_Dogs/an00891_.gif b/zefie_wtvp_minisrv/PageBuilderVault/http_pb/WebTV_88150/Cat/clipart/Animals/Cats_n_Dogs/an00891_.gif new file mode 100644 index 00000000..61c15086 Binary files /dev/null and b/zefie_wtvp_minisrv/PageBuilderVault/http_pb/WebTV_88150/Cat/clipart/Animals/Cats_n_Dogs/an00891_.gif differ diff --git a/zefie_wtvp_minisrv/PageBuilderVault/http_pb/WebTV_88150/Cat/clipart/styleMedia/CAT.gif b/zefie_wtvp_minisrv/PageBuilderVault/http_pb/WebTV_88150/Cat/clipart/styleMedia/CAT.gif new file mode 100644 index 00000000..1e25336b Binary files /dev/null and b/zefie_wtvp_minisrv/PageBuilderVault/http_pb/WebTV_88150/Cat/clipart/styleMedia/CAT.gif differ diff --git a/zefie_wtvp_minisrv/PageBuilderVault/http_pb/WebTV_88150/Cat/index.html b/zefie_wtvp_minisrv/PageBuilderVault/http_pb/WebTV_88150/Cat/index.html new file mode 100644 index 00000000..ef40c76e --- /dev/null +++ b/zefie_wtvp_minisrv/PageBuilderVault/http_pb/WebTV_88150/Cat/index.html @@ -0,0 +1,70 @@ + + + +Cat + + + +
+Cat
+ + + + +

+ + + + + + +
+ +

+Cat +

+
+
+ +
+
is cool +
+

 

+ + + + + + + + + + + + + + +
+ + + + + +
+
+
+ + + +
+ +Powered by WebTV +
+
+ + +
+
+ + +
\ No newline at end of file diff --git a/zefie_wtvp_minisrv/PageBuilderVault/http_pb/WebTV_88150/index.html b/zefie_wtvp_minisrv/PageBuilderVault/http_pb/WebTV_88150/index.html new file mode 100644 index 00000000..06ac68f3 --- /dev/null +++ b/zefie_wtvp_minisrv/PageBuilderVault/http_pb/WebTV_88150/index.html @@ -0,0 +1,56 @@ + + + +WebTV_88150 + + + + + + + +
+
+
+Pages of WebTV_88150 +
+
+ + + + +
+test + +
+test description +
+
+
+ + + + +
+Cat + +
+meow +
+
+
+ + \ No newline at end of file diff --git a/zefie_wtvp_minisrv/PageBuilderVault/http_pb/WebTV_88150/test/clipart/Business/BS00095_.gif b/zefie_wtvp_minisrv/PageBuilderVault/http_pb/WebTV_88150/test/clipart/Business/BS00095_.gif new file mode 100644 index 00000000..aafd41cd Binary files /dev/null and b/zefie_wtvp_minisrv/PageBuilderVault/http_pb/WebTV_88150/test/clipart/Business/BS00095_.gif differ diff --git a/zefie_wtvp_minisrv/PageBuilderVault/http_pb/WebTV_88150/test/clipart/styleMedia/spacefield.gif b/zefie_wtvp_minisrv/PageBuilderVault/http_pb/WebTV_88150/test/clipart/styleMedia/spacefield.gif new file mode 100644 index 00000000..37901d66 Binary files /dev/null and b/zefie_wtvp_minisrv/PageBuilderVault/http_pb/WebTV_88150/test/clipart/styleMedia/spacefield.gif differ diff --git a/zefie_wtvp_minisrv/PageBuilderVault/http_pb/WebTV_88150/test/index.html b/zefie_wtvp_minisrv/PageBuilderVault/http_pb/WebTV_88150/test/index.html new file mode 100644 index 00000000..ab48305d --- /dev/null +++ b/zefie_wtvp_minisrv/PageBuilderVault/http_pb/WebTV_88150/test/index.html @@ -0,0 +1,111 @@ + + + +test + +
+ +test + +

+ + + +
+ +
+

+ + + +
+ + + + +
+ +

+my test list +

+
+
    +
  • +this is a test +
  • +
+
    +
  • +listing 2 +
  • +
+
    +
  • +whoa its 3 +
  • +
+
    +
  • +fuck its 4! +
  • +
+
+

+ + + + + + +
+ +

+my ancient pc +

+
+
+ +
+
my webtv is better +
+

+ + + + + + + + + + + + + + + +
+ + + + + +
+
+
+ + + +
+ +Powered by WebTV +
+
+ + +
+
+ + + +

\ No newline at end of file diff --git a/zefie_wtvp_minisrv/ServiceDeps/viewergen/AppData--2.5-HE.zip b/zefie_wtvp_minisrv/ServiceDeps/viewergen/AppData--2.5-HE.zip index 76f8c5f1..36a9a7be 100644 Binary files a/zefie_wtvp_minisrv/ServiceDeps/viewergen/AppData--2.5-HE.zip and b/zefie_wtvp_minisrv/ServiceDeps/viewergen/AppData--2.5-HE.zip differ diff --git a/zefie_wtvp_minisrv/ServiceDeps/viewergen/HackTV_min.zip b/zefie_wtvp_minisrv/ServiceDeps/viewergen/HackTV_min.zip new file mode 100644 index 00000000..a22b3f2a Binary files /dev/null and b/zefie_wtvp_minisrv/ServiceDeps/viewergen/HackTV_min.zip differ diff --git a/zefie_wtvp_minisrv/ServiceDeps/viewergen/WebTVIntel--2.5-HE.exe.gz b/zefie_wtvp_minisrv/ServiceDeps/viewergen/WebTVIntel--2.5-HE.exe.gz index 2770bc8c..e8bec938 100644 Binary files a/zefie_wtvp_minisrv/ServiceDeps/viewergen/WebTVIntel--2.5-HE.exe.gz and b/zefie_wtvp_minisrv/ServiceDeps/viewergen/WebTVIntel--2.5-HE.exe.gz differ diff --git a/zefie_wtvp_minisrv/ServiceDeps/wtv-news/localserver_ca.pem b/zefie_wtvp_minisrv/ServiceDeps/wtv-news/localserver_ca.pem index 6a5fbe67..2c2718c4 100644 --- a/zefie_wtvp_minisrv/ServiceDeps/wtv-news/localserver_ca.pem +++ b/zefie_wtvp_minisrv/ServiceDeps/wtv-news/localserver_ca.pem @@ -1,23 +1,21 @@ -----BEGIN CERTIFICATE----- -MIID1TCCAr2gAwIBAgIUQzfMpYgezM0u/aOpBIYzCTSNuSgwDQYJKoZIhvcNAQEL -BQAwejELMAkGA1UEBhMCVVMxCzAJBgNVBAgMAk5ZMRcwFQYDVQQKDA5aZWZpZSBO -ZXR3b3JrczEQMA4GA1UECwwHbWluaXNydjETMBEGA1UEAwwKbWluaXNydl9jYTEe -MBwGCSqGSIb3DQEJARYPemVmaWVAemVmaWUubmV0MB4XDTIyMTAxMjAzMzQzOVoX -DTIyMTExMTAzMzQzOVowejELMAkGA1UEBhMCVVMxCzAJBgNVBAgMAk5ZMRcwFQYD -VQQKDA5aZWZpZSBOZXR3b3JrczEQMA4GA1UECwwHbWluaXNydjETMBEGA1UEAwwK -bWluaXNydl9jYTEeMBwGCSqGSIb3DQEJARYPemVmaWVAemVmaWUubmV0MIIBIjAN -BgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzo8+u/9kJcQY+mOKLxYNOtNSWqlu -fwSKpo/kCMbCkM4TCJiaKHWwtXeT5tgrYPqg6s3nHpG2arwI/sxX6fy86s9i8bu5 -NEaO6/Czii0gQLXznURPaCPKp2dJEpcrFvqsB/Ej7Bm2cZH4BaOW9CeaMdrSXK1e -Tlwem1XHPeFnIPGQr3sYp2CNcB3TWzNkGGDPB2CBcR+qB2Fnjb7aEcd5t4imJqT6 -BPTiDB234v3glcEaDBIr3bT/YGZuRn7Ou8qAVKlfT4iDsgHkpW+V7RYRocfAynPF -mSxQf2i4hIfvK2mGhdpcQGH5WTOp6K9xIv/lGIZcb29xoAeICplq3/u24wIDAQAB -o1MwUTAdBgNVHQ4EFgQUG8IOPoOiwIA1GI/3pANtftkD7BwwHwYDVR0jBBgwFoAU -G8IOPoOiwIA1GI/3pANtftkD7BwwDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0B -AQsFAAOCAQEAaG63vM/KbOfx/wzg8dZE6j/h8Ai0wJ1iXXvBLa23+fpZwfHIMH/A -uvkap+OzX3oI8fdalReY11+WONfzA4pyuNPtluwkngSLjT8YSfHfM3MUM6LKt5x4 -rRNBNN74H8A7q5UDA/SD2M1HjcOkFNlH4XrE6Uy/ColCVV9cYGPdx1rKwiQiKK7Q -Nr+6awAYHzQ2kdrZ4kneBZqAWAuIzjjWMxcgVwCHpb4rV0u3j/uhIos/8Q6NtLA7 -EqW0qMWmpJ9DlqfhLXqVCgfPyxGNpvTom0lw6J8OL8U6d+oaeVTZW44/3A8wNjJ+ -Gd2qQMxupodfV3LVyREvDpM+cowW6q+qHA== +MIIDeTCCAmGgAwIBAgIUObgvDtDTX7MTcGb7D1QCB2ezqv0wDQYJKoZIhvcNAQEL +BQAwSzELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRcwFQYDVQQKDA5a +ZWZpZSBOZXR3b3JrczEQMA4GA1UECwwHbWluaXNydjAgFw0yMjExMTQwMTE3MDNa +GA8yMTIyMTAyMTAxMTcwM1owSzELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZ +b3JrMRcwFQYDVQQKDA5aZWZpZSBOZXR3b3JrczEQMA4GA1UECwwHbWluaXNydjCC +ASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL6xkPAnKJntwd+k0GzprJYw +P5WSGTtB3V2B7aVJJhXbck3z/ko1g73nMdbReH9ruRQzHgYOiTGVLUI76RkfCqts +VjJiYbGuNREcIq6LMO4boMzfAH7K/0va7VV1K5aL7v/ZXIq61xvSuef61kJpeTAT +T411eeWCTsHgqBNqcHLLf1qDoRugUpJk8dz9aWeG4LSDKTSigA4+kj9hXicyiQn0 +ZQdgXw1G0FDXdb+lnFZKpVTRne7gXL4WegwLlAQV453228u97WQmd0+OujH9gm89 +tlk8WZqrVcren1vdbyJ9+zRPnUkwH53C08/fuwu7vYT+/AR0unQ8VWaQ/+3BW6MC +AwEAAaNTMFEwHQYDVR0OBBYEFOP1MtW6WNC+ang1Q2AFjN5hfVLtMB8GA1UdIwQY +MBaAFOP1MtW6WNC+ang1Q2AFjN5hfVLtMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZI +hvcNAQELBQADggEBAK+IOv9w/fekp70FZ1G48ftQUYR02ezn+9EyGbfPfkZSdUyW +kE8T0iYzZBcDvf/qd6XxhlN5KMOJXDBzbGpZeg5bQa4jBsbdSLLaq7f0WcFUGGyk ++LQdwwzd2jnEq826ZQvjJcR/tn4lyxAuoalfm0C5/45vz6c0E/U4sh6XHga8dVAj +T2TZMtLoAAB/k3uAc4S6SShfoR/l88XzaIN112kLfZ8HINRhnR4Lgs6jhnUqmPdB +KGd0M0XBZG9XEWMbic9j0FP5CoVzmSJJV8OYnFaXfGkNLOb4kOQikA+xj8HttQwI +CPPmtu8YdMTAfQ/I2c163EXpxbFJ2wYS2KKLQmQ= -----END CERTIFICATE----- diff --git a/zefie_wtvp_minisrv/ServiceDeps/wtv-news/localserver_cert.pem b/zefie_wtvp_minisrv/ServiceDeps/wtv-news/localserver_cert.pem index 83c6dd06..0ab15ddb 100644 --- a/zefie_wtvp_minisrv/ServiceDeps/wtv-news/localserver_cert.pem +++ b/zefie_wtvp_minisrv/ServiceDeps/wtv-news/localserver_cert.pem @@ -1,22 +1,22 @@ -----BEGIN CERTIFICATE----- -MIIDnDCCAoSgAwIBAgIULCdoiUdXwTXF3qsxau5hOdxSiKQwDQYJKoZIhvcNAQEL -BQAwejELMAkGA1UEBhMCVVMxCzAJBgNVBAgMAk5ZMRcwFQYDVQQKDA5aZWZpZSBO -ZXR3b3JrczEQMA4GA1UECwwHbWluaXNydjETMBEGA1UEAwwKbWluaXNydl9jYTEe -MBwGCSqGSIb3DQEJARYPemVmaWVAemVmaWUubmV0MCAXDTIyMTAxMzAwNTIwMFoY -DzIxMjIwOTE5MDA1MjAwWjB/MQswCQYDVQQGEwJVUzERMA8GA1UECAwITmV3IFlv -cmsxFzAVBgNVBAoMDlplZmllIE5ldHdvcmtzMRAwDgYDVQQLDAdtaW5pc3J2MRIw -EAYDVQQDDAlsb2NhbGhvc3QxHjAcBgkqhkiG9w0BCQEWD3plZmllQHplZmllLm5l -dDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAN5R/V1oF69ZvKyz0toA -1f2+b1BUkYivtiVYlSavAqS2EiqhKCNZdreFIuIMHo8v0npir3VxXxwwVBM2+DPQ -sp08wUCu9nLidYYBMl4qlRRANmd5i6uQ0ErLceSPv/KfkDeVfd63rrKvQCxBqhFi -OI/ZI+bxkK+P7fAntKJ35abKDQyJ4NblAb+AUXvxo+HsCaX8Gyox8cbLFGrkNICY -Pe9YcuY899OhuY/vBLTkkLXKyynG7nLaGYc39uNGg/SI0ZWcAEC1q0uRVB5ed3X7 -BfpIlP60wxLi8eX7DANDyoRJ/vOSF5RIilmrPM6bXnAMYRmsUb+Z3Wjc8NRBZCC/ -5a0CAwEAAaMTMBEwDwYDVR0RBAgwBocEfwAAATANBgkqhkiG9w0BAQsFAAOCAQEA -nFPOU9HRjf/i5r8qS8VodNbZRVD0+aemdJobdvmlBbNn+Uh2k4sYcBse9dI2ZGbB -5Z0sxAAJXdynVqzrhIQzZUDsZFi1mBI8rpo6hGdL7QU2aepiDDb4dBpt3Xc8XcmT -SeXV5sPTZC4wT8t/IJh6wAynPKmBl1BveTtml4BHiNS2YKYK3LrTkpxRhoAiBatf -km4+UiL/6nskBhLuKkLLYTgA1VwrbnzSMjGWkJ8F9E9xsXrcK29eyCYhKJXETO5T -Npdk7Hl8qbbe8/a99XRxZzi/rcf5VjnQ3CmxE/+jV99efhrCyc1l0EwS04qfjUhA -mRVCPS3bpgPbKkCHe7TGXw== +MIIDnjCCAoagAwIBAgIUMq37VqD3bJeWGUGJWRbFRoJY1v0wDQYJKoZIhvcNAQEL +BQAwSzELMAkGA1UEBhMCVVMxETAPBgNVBAgMCE5ldyBZb3JrMRcwFQYDVQQKDA5a +ZWZpZSBOZXR3b3JrczEQMA4GA1UECwwHbWluaXNydjAgFw0yMjExMTQwMTE4NTBa +GA8yMTIyMTAyMTAxMTg1MFoweTELMAkGA1UEBhMCVVMxCzAJBgNVBAgMAk5ZMRcw +FQYDVQQKDA5aZWZpZSBOZXR3b3JrczEQMA4GA1UECwwHbWluaXNydjESMBAGA1UE +AwwJbG9jYWxob3N0MR4wHAYJKoZIhvcNAQkBFg96ZWZpZUB6ZWZpZS5uZXQwggEi +MA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC1csdxdUTf50Zwk7VYCE1riTSM +siq3iqO3obh8SFbsIO+WKTfTatU+fmqby2eVmT6XNKJzLKil9QMWPFp6WcWSRCcg +v2hc13OJDk1/Zb3psWOPU0jSXAfdrE2IzdlG6lLgj91GViN/PJEgaq74GZcIhXf5 +UiUyxUP/jpP41AXwJYgD1ZL19r3qY6XG3DjmQjDROzkvTohDZQJxYd82bahVAp2H +Jx5omm6uQ1x17o5OcUY2kqAAqs6ChKHg435jCi7/B+caWMqhNpubPb2mykLZGVlv +1oVyT/nr06UgU6NLNC2HW8tKinhxzPAtSgMY9PltGXLdkto0Br9FkgF/xSN/AgMB +AAGjSjBIMB8GA1UdIwQYMBaAFOP1MtW6WNC+ang1Q2AFjN5hfVLtMAkGA1UdEwQC +MAAwGgYDVR0RBBMwEYIJbG9jYWxob3N0hwR/AAABMA0GCSqGSIb3DQEBCwUAA4IB +AQCgZePBrgXb3eOH6HQlOJ2hB0gjb9EmkGTFC9eMJs/2ggl9E6pb5r3vsmyMnfbP +tA7KCm6A6WMbMq89wTy6vcRfVrr2TaQgUTJRApkvEtx2sAR5uPICPZPJNRVt7lVT +SnsWYLiI5IC5Omu+lCeEyFhi0XZIF0JofU2XfZN1lv1VTOUHTpfRngAxLk2cyvmY +xIeRwOBgM4C1Qyb6OSM8C/b6i/j7nVFZ9SyD/ryI8qeouTd/kzz02NElKtrAIgp3 +nGapIKcvFxKu5SyUV+T+KOXCD/JArfAgwLEP+fMg821p/MpbSpx8aeCdAmYYrInM +4w7wJR4XLq1S/UYZM9Ryw7Bu -----END CERTIFICATE----- diff --git a/zefie_wtvp_minisrv/ServiceDeps/wtv-news/localserver_key.pem b/zefie_wtvp_minisrv/ServiceDeps/wtv-news/localserver_key.pem index f16d54f5..4fef5385 100644 --- a/zefie_wtvp_minisrv/ServiceDeps/wtv-news/localserver_key.pem +++ b/zefie_wtvp_minisrv/ServiceDeps/wtv-news/localserver_key.pem @@ -1,27 +1,27 @@ -----BEGIN RSA PRIVATE KEY----- -MIIEpAIBAAKCAQEA3lH9XWgXr1m8rLPS2gDV/b5vUFSRiK+2JViVJq8CpLYSKqEo -I1l2t4Ui4gwejy/SemKvdXFfHDBUEzb4M9CynTzBQK72cuJ1hgEyXiqVFEA2Z3mL -q5DQSstx5I+/8p+QN5V93reusq9ALEGqEWI4j9kj5vGQr4/t8Ce0onflpsoNDIng -1uUBv4BRe/Gj4ewJpfwbKjHxxssUauQ0gJg971hy5jz306G5j+8EtOSQtcrLKcbu -ctoZhzf240aD9IjRlZwAQLWrS5FUHl53dfsF+kiU/rTDEuLx5fsMA0PKhEn+85IX -lEiKWas8zptecAxhGaxRv5ndaNzw1EFkIL/lrQIDAQABAoIBAH8A+aulrnom2okS -hW6ysYyugKq0VRtvva9iBnq92dW8iW4++E4Raqd2cDIQWFjWKfhubeu6o2nYFf+Q -FISNQaxfq8rG6NVCl37BKkPvMZELCclc/zQ4mzVPObYnhLEXBG0sgmZ8Klm7kf52 -WLBrmwJaOo9RCqWwpG3gUOnLcq8vhvqKEXRzqaHqPtWJEuU09FgXt55/8eydykvE -JqP9W1iLpwYgknSkC65QKxpWrKx1h9JbkKUzOx4H51WzR2qVDT3VVK+5J7LvonSI -p1eEDGH8g3kWp6T0qwaUTkVINS4hhg/l5XPEqKkTNayKIJeSrEkfgs0sL/D9cxTI -gswml6ECgYEA/E7RJa8xXDqthtw/Uxss5wfANquufBxl9c0Spp2M1SfMSXGTQ+SQ -6mUGsWdiFhv98vPVv4JDfjvOSonppG9+cd2+kSignCeEt33hMb6cgp9QpG0PC22C -B2JqWtN4YuS8D+Hms5ZwC1XSavXCD8gPspXlo6jM6Q/3fPZxZr+xvzkCgYEA4ZLV -rOwODiPRB3DL+Y01KJZQvHGbU9QRAjAfqpdJ6UagueKQB6I/GxCKwtZbG1l2RreM -vjhvDf8oWW4Oe+Ff9PXp/A4C42RbPKTKIUNLiDd+qVsn9yT2dypibb3W6pzLQru7 -gT72ERCwb/yAoIbwLSUpudarRxASOBiCxgJO5hUCgYAdQE4DHnKMjMj9b59v1SC5 -kC56qCDMhsZTXvkgk/d15u1KPn6iSmd6pUfHXYMDqS8h8Z8AWuvUQL7D6YVK6Rox -vVGQprMoJ3S9iTyIdd7TTgEdbv9lhcajcIeADDBS1s3u0XPbsj8/MS359JARIFKh -k7tR5AoNoypANJolHWhQEQKBgQC8iPV+6m109AqppWVW1ucvXTNtzaZ9kioFIiPV -eU2VZCrCMtMfDkSgYlsYLgFIAqYQxSkldBWeJT2cQZhpgh2pqEBBI5TWafK35SPs -WUqwN3HuKvpkXsiBITPTdXBD93kL9czqYa1Y5hISB4Gaqi3kDcOqR/owEwanTBVB -WnyHYQKBgQChNn7uvIIUzQKoxYyvXk5NVIb1xey64deOVnayg66s6oHF9UHtynay -equq5maSgyF3Ft597koiG7ylMkcXkdsmUPos26ZSDlgqYC9v+VopqQB3T06ltyGA -lOjjVjzofTSzMvQ1UFbDoogelpnZNn8koKrgrUuZL+A0VLEYQTFITg== +MIIEpAIBAAKCAQEAtXLHcXVE3+dGcJO1WAhNa4k0jLIqt4qjt6G4fEhW7CDvlik3 +02rVPn5qm8tnlZk+lzSicyyopfUDFjxaelnFkkQnIL9oXNdziQ5Nf2W96bFjj1NI +0lwH3axNiM3ZRupS4I/dRlYjfzyRIGqu+BmXCIV3+VIlMsVD/46T+NQF8CWIA9WS +9fa96mOlxtw45kIw0Ts5L06IQ2UCcWHfNm2oVQKdhyceaJpurkNcde6OTnFGNpKg +AKrOgoSh4ON+Ywou/wfnGljKoTabmz29pspC2RlZb9aFck/569OlIFOjSzQth1vL +Sop4cczwLUoDGPT5bRly3ZLaNAa/RZIBf8UjfwIDAQABAoIBAQCSqFoyB1ILE5jo +p0rdA6Dn+TdDPUKvpVxcsVc3BRVUt+5O1bPsqx3+7BjpIcfwr7Nabc2cAA20TcwX +7eJHoEXDylhB7NPCrtYQgkH7ZdXRjHJnRy7F8GLfNkRY/eDPo9gm78Eu97KrRd4b +cH9Jww1DcvWczFuKpM0oQyqw5VaDWcUGK7VWuLYLMX2E9wlqwjrE+F2uyEAW2qB4 +Nef+UvjyW3nGLlGEyUTLNo+P+dWERwFEHObkBykVgWl7BTY62S4RJbtrIFiULnzc +UzngvJHTX24zCCDUQlfVPGAcF7PAhK0JFrNnmQPBIvlXixj+cKtR2SzusoD8q6g6 +JNrvttlRAoGBAOmHnlZqtKO5Qj8IypSxL7+Lex7/LGwbG6+479k+4XEge+i/5k5m +i+AIcD4EkKzoon/35PWXEtdkRfNobRPCAKSAfUEg0wBl0imLl7+zK1K8GGIHnMKS +jUt+9dtOe97l1EUIza4Xp4nkldkgmoz0bUTHfxciohHD0UYQYWhgLLgpAoGBAMbo +Rj1vm/1DVoeyAiBOSCRxprUakIuxnhlf+AqnWhLdkmLw2BYkQAwmNkZ1/96r4tev +mzu1BPboOJZfON+/ZShMmZ4i82emOgXSMZUjKMW/u9M9pZPbv5Z/++ohN9vwxBcT +B9xDbV3cVvNaDBl3N3egAkyTOOPudDCMDgYOvBNnAoGAa1Aq7sMyJ1pmmtjLXvDd +ZEQQW/oey77ZRjLR5R8EMhwfVKF6j+SHunemPJmUciClK/EagdDek6Q8kNIX7dBk +wzNYW6ldzPz9SqIfJbSL4AUXn1SoMLFvxJWfHRw/x/oNRXv6KFouXytvwMs+ui9I +VyblvBfqKge2D2BPossvQaECgYABVd3i27T4ZlNWZeONw/jIBdtQq/T8exzMntBT +gfwg1Ev/Tg6lV2j2q+sBXhlxrUXAnPU12WlHHxgCKnF/TxGmy5zcau+nan5JO7gJ +gErtyPPB31AVRgxrPkC6ua5eU6d9YCtVVz6MusX6rEgYg6xjqTdavEJNhXRSPx54 ++/BXUQKBgQCCNSXWhCZFmsWXsLc0X6d+NXhzqmSJjeey05cQY2uGkGGtQLooLzEQ +xHjptVFaQ76m3LwO7c9bk02RUpX4fDxA4r/Hk8JcaJsvSS+BkgYCFC9qYxi7wVjq +eSYDbGxIpK5TDk3Y9VXZqGZvfRcqhj3KSMvetovUUY9eJ5bXVQO65A== -----END RSA PRIVATE KEY----- diff --git a/zefie_wtvp_minisrv/ServiceVault/http_pc/viewergen/index.js b/zefie_wtvp_minisrv/ServiceVault/http_pc/viewergen/index.js index f31c7f7a..3ffe4ade 100644 --- a/zefie_wtvp_minisrv/ServiceVault/http_pc/viewergen/index.js +++ b/zefie_wtvp_minisrv/ServiceVault/http_pc/viewergen/index.js @@ -18,7 +18,8 @@ var logos = { } var disksets = { - 0: null + 0: null, + 98: "HackTV_min.zip" } var viewer_stock_md5s = { @@ -26,7 +27,7 @@ var viewer_stock_md5s = { "WebTVIntel--1.1.exe": "ce7b6d1734b5e3d1cbd5f068609223d1", "WebTVIntel--2.5.exe": "4c5754bb8b69739b6f414c2d159051da", "WebTVIntel--1.0-HE.exe": "391f303fd70034e69d3a50583de72c89", - "WebTVIntel--2.5-HE.exe": "f0207865693a45ba76b9057dcb8ea672" + "WebTVIntel--2.5-HE.exe": "64edab977ec19a663c5842176bec306a" } @@ -334,6 +335,8 @@ if (request_headers.query.viewer && client_ssid = generateSSID(); var viewer_file = viewers[request_headers.query.viewer]; + var needs_hacktv_mini = (viewer_file === "WebTVIntel--2.5-HE.exe") ? true : false + console.log('needs_hacktv_mini', needs_hacktv_mini) if (!viewer_file) { errpage = wtvshared.doErrorPage("500", null, socket.minisrv_pc_mode) headers = errpage[0]; @@ -378,7 +381,7 @@ Content-Disposition: attachment; filename="${viewer_file.replace(".exe", ".zip") var zip = new AdmZip(); zip.addZipComment("Viewer SSID: " + client_ssid); - zip.addFile(viewer_file, patched_file); + zip.addFile(viewer_file.replace("--", "-" + client_ssid + "-"), patched_file); if (!request_headers.query.viewer_only) { var romset_zip = new AdmZip(viewergen_resource_dir + viewer_file.replace(".exe", "").replace("WebTVIntel", "AppData") + ".zip"); var zipEntries = romset_zip.getEntries(); @@ -396,8 +399,10 @@ Content-Disposition: attachment; filename="${viewer_file.replace(".exe", ".zip") zip.addFile(zipEntry.entryName, zipEntry.getData()); } }); - if (request_headers.query.diskset) { - var diskset_file = disksets[parseInt(request_headers.query.diskset) || 0]; + if (request_headers.query.diskset || needs_hacktv_mini) { + var diskset_file = 0; + if (needs_hacktv_mini) diskset_file = disksets[98]; + else diskset_file = disksets[parseInt(request_headers.query.diskset) || 0]; if (diskset_file) { var diskset_zip = new AdmZip(viewergen_resource_dir + diskset_file); var zipEntries = diskset_zip.getEntries(); diff --git a/zefie_wtvp_minisrv/ServiceVault/wtv-1800/preregister.js b/zefie_wtvp_minisrv/ServiceVault/wtv-1800/preregister.js index 78341d1f..c87548a6 100644 --- a/zefie_wtvp_minisrv/ServiceVault/wtv-1800/preregister.js +++ b/zefie_wtvp_minisrv/ServiceVault/wtv-1800/preregister.js @@ -2,7 +2,8 @@ var minisrv_service_file = true; var gourl = "wtv-head-waiter:/login?"; -if (socket.ssid) { + +if (session_data) { if (session_data.loadSessionData() == true) { console.log(" * Loaded session data from disk for", wtvshared.filterSSID(socket.ssid)) session_data.setSessionData("registered", (session_data.getSessionData("registered") == true) ? true : false); @@ -58,10 +59,12 @@ if (session_data.data_store.wtvsec_login) { var file_path = null; var bf0app_update = false; var romtype = session_data.get("wtv-client-rom-type"); - var send_tellyscript = (minisrv_config.services[service_name].send_tellyscripts && !request_headers.query.relogin && !request_headers.query.guest_login); + var bootrom = parseInt(session_data.get("wtv-client-bootrom-version")); + var send_tellyscript = (minisrv_config.services[service_name].send_tellyscripts && !request_headers.query.relogin && !request_headers.query.guest_login && !bootrom !== 0); var wtv_script_id = parseInt(session_data.get("wtv-script-id")); - var bootrom = session_data.get("wtv-client-bootrom-version"); + var wtv_script_mod = parseInt(session_data.get("wtv-script-mod")); if ((request_headers.query.reconnect || request_headers.query.relogin) && wtv_script_id != 0) send_tellyscript = false; + if (wtv_script_id !== 0 && wtv_script_mod !== 0) send_tellyscript = false; if (send_tellyscript) { if (minisrv_config.services[service_name].send_tellyscript_ssid_whitelist) { var send_telly_to_ssid = (minisrv_config.services[service_name].send_tellyscript_ssid_whitelist.findIndex(element => element == socket.ssid) != -1) diff --git a/zefie_wtvp_minisrv/ServiceVault/wtv-admin/operatortweaks.js b/zefie_wtvp_minisrv/ServiceVault/wtv-admin/operatortweaks.js index 3e9e8117..f18a9454 100644 --- a/zefie_wtvp_minisrv/ServiceVault/wtv-admin/operatortweaks.js +++ b/zefie_wtvp_minisrv/ServiceVault/wtv-admin/operatortweaks.js @@ -7,7 +7,6 @@ var auth = wtva.isAuthorized(); function generateFormField(type, confvar, options = null) { if (confvar.indexOf('.') > 0) { var confvar_split = confvar.split('.'); - console.log(confvar_split) // not operater error resistant, be mindful if you modify this page if (user_config.config[confvar_split[0]]) var confvar_value = user_config.config[confvar_split[0]][confvar_split[1]] || minisrv_config.config[confvar_split[0]][confvar_split[1]] @@ -125,9 +124,9 @@ contact the server operator (eg. email, Discord, Twitter, etc...) service_name
The name of the service (eg. WebTV) -service_logo
The logo for the service. Filename only. Must exist in the SharedROMCache service vault. - -service_splash_logo
The splash page logo for the service. Absolute path. Can be file:// or wtv url. +service_logo
The logo for the service. Absolute URL, or file name in the Shared ROMCache. + +service_splash_logo
The splash page logo for the service. Absolute URL, or file name in the Shared ROMCache. show_detailed_splash
Show service information and client connection speed on the splash page. @@ -163,7 +162,7 @@ When disabled, accounts will not be able to use passwords, if they had a passwor The size of the field on the login password page - +
@@ -182,13 +181,13 @@ ${generateFormField('input', 'service_owner_contact')} - - - -
${generateFormField('input', 'service_owner_contact_method')}
+ ${generateFormField('input', 'service_name')}
+ ${generateFormField('input', 'service_logo')}
+ ${generateFormField('input', 'service_splash_logo')}
@@ -197,7 +196,7 @@ ${generateFormField('checkbox', 'show_detailed_splash')} ${generateFormField('checkbox', 'hide_ssid_in_logs')}
+ ${generateFormField('checkbox', 'filter_passwords_in_logs')}
diff --git a/zefie_wtvp_minisrv/ServiceVault/wtv-admin/validate-operator-tweaks.js b/zefie_wtvp_minisrv/ServiceVault/wtv-admin/validate-operator-tweaks.js index ec25ce06..a1d6ef5f 100644 --- a/zefie_wtvp_minisrv/ServiceVault/wtv-admin/validate-operator-tweaks.js +++ b/zefie_wtvp_minisrv/ServiceVault/wtv-admin/validate-operator-tweaks.js @@ -18,9 +18,18 @@ if (auth === true) { Object.keys(request_headers.query).forEach((k) => { if (k === "autosubmit") return; var v = request_headers.query[k]; - if (!isNaN(parseInt(v))) v = parseInt(v); + + // enable_multi_query may send ["false", "on"] for checkboxes due to webtvism + if (isArray(v)) v = v[(v.length - 1)]; + + // convert numbers back to int before writing to config + if (!isNaN(parseInt(v))) v = parseInt(v); + + // convert string back to boolean before writing to config if (v === "on" || v === "true" || v === "false") v = wtvshared.parseBool(v); + if (k.indexOf("-") > 0) { + // handle sub-config items var s = k.split("-"); if (!user_config.config[s[0]]) user_config.config[s[0]] = {} user_config.config[s[0]][s[1]] = v; diff --git a/zefie_wtvp_minisrv/ServiceVault/wtv-favorite/ROMCache/LeftBottom.gif b/zefie_wtvp_minisrv/ServiceVault/wtv-favorite/ROMCache/LeftBottom.gif index 10d41b58..81986fec 100644 Binary files a/zefie_wtvp_minisrv/ServiceVault/wtv-favorite/ROMCache/LeftBottom.gif and b/zefie_wtvp_minisrv/ServiceVault/wtv-favorite/ROMCache/LeftBottom.gif differ diff --git a/zefie_wtvp_minisrv/ServiceVault/wtv-favorite/ROMCache/LeftMiddle.gif b/zefie_wtvp_minisrv/ServiceVault/wtv-favorite/ROMCache/LeftMiddle.gif index 2de8a99b..2449c2ba 100644 Binary files a/zefie_wtvp_minisrv/ServiceVault/wtv-favorite/ROMCache/LeftMiddle.gif and b/zefie_wtvp_minisrv/ServiceVault/wtv-favorite/ROMCache/LeftMiddle.gif differ diff --git a/zefie_wtvp_minisrv/ServiceVault/wtv-favorite/ROMCache/LeftMiddleTabOnly.gif b/zefie_wtvp_minisrv/ServiceVault/wtv-favorite/ROMCache/LeftMiddleTabOnly.gif index 77a09d19..0e44a905 100644 Binary files a/zefie_wtvp_minisrv/ServiceVault/wtv-favorite/ROMCache/LeftMiddleTabOnly.gif and b/zefie_wtvp_minisrv/ServiceVault/wtv-favorite/ROMCache/LeftMiddleTabOnly.gif differ diff --git a/zefie_wtvp_minisrv/ServiceVault/wtv-favorite/ROMCache/LeftTop.gif b/zefie_wtvp_minisrv/ServiceVault/wtv-favorite/ROMCache/LeftTop.gif index 5689eed9..9310b273 100644 Binary files a/zefie_wtvp_minisrv/ServiceVault/wtv-favorite/ROMCache/LeftTop.gif and b/zefie_wtvp_minisrv/ServiceVault/wtv-favorite/ROMCache/LeftTop.gif differ diff --git a/zefie_wtvp_minisrv/ServiceVault/wtv-favorite/ROMCache/LeftTopWithPreviousTab.gif b/zefie_wtvp_minisrv/ServiceVault/wtv-favorite/ROMCache/LeftTopWithPreviousTab.gif index f0bb48d1..9a42c64b 100644 Binary files a/zefie_wtvp_minisrv/ServiceVault/wtv-favorite/ROMCache/LeftTopWithPreviousTab.gif and b/zefie_wtvp_minisrv/ServiceVault/wtv-favorite/ROMCache/LeftTopWithPreviousTab.gif differ diff --git a/zefie_wtvp_minisrv/ServiceVault/wtv-favorite/commit-add-folder.js b/zefie_wtvp_minisrv/ServiceVault/wtv-favorite/commit-add-folder.js index bb440e03..2a139bd8 100644 --- a/zefie_wtvp_minisrv/ServiceVault/wtv-favorite/commit-add-folder.js +++ b/zefie_wtvp_minisrv/ServiceVault/wtv-favorite/commit-add-folder.js @@ -14,17 +14,17 @@ if (foldername) { if (folder_array.length < minisrv_config.services[service_name].max_folders) { - //if (session_data.favstore.checkFolderName(foldername) == true) - //{ + if (session_data.favstore.checkFolderName(foldername) == true) + { session_data.favstore.createFolder(foldername); headers = `300 OK Connection: Keep-Alive Content-Type: text/html Location: wtv-favorite:/favorite wtv-expire-all: wtv-favorite:` - //} else { - // headers = `400 That folder name is not valid. Choose a different name and try again.` - //} + } else { + headers = `400 That folder name is not valid. Choose a different name and try again.` + } } else { headers = `400 You can only have ${minisrv_config.services[service_name].max_folders} folders at one time. Delete some folders and try again.` } diff --git a/zefie_wtvp_minisrv/ServiceVault/wtv-favorite/favorite.js b/zefie_wtvp_minisrv/ServiceVault/wtv-favorite/favorite.js index feadfbb1..98e74418 100644 --- a/zefie_wtvp_minisrv/ServiceVault/wtv-favorite/favorite.js +++ b/zefie_wtvp_minisrv/ServiceVault/wtv-favorite/favorite.js @@ -26,30 +26,28 @@ data = ` Favorite folders - - - - + + -
+
- +
- +
- +
-
+
@@ -57,98 +55,99 @@ Favorite folders
-
+
-
+
-
+
Add folder   -
-
+
+
-
+
-
+
-
+
-
+
Remove      -
-
+
+ - + -
+
-
+
-
+
Help            -
-
+
+ - - - + + + -
+
-
+ - + + - +
-
+
Favorite folders for ${session_data.getSessionData("subscriber_username") || "You"} -
+
- + -
+
-
+
-
+
-
` +
` var kval = 0; // process evens Object.keys(folder_array).forEach(function (k) { @@ -158,14 +157,14 @@ for ${session_data.getSessionData("subscriber_username") || "You"} // Left Middle data += `
-
+
-
`; +
`; kval = k; } }); @@ -175,10 +174,10 @@ for ${session_data.getSessionData("subscriber_username") || "You"} if (folder_array.length % 2 == 0) { data += ` -
+
-
`; +`; } } @@ -186,40 +185,40 @@ for ${session_data.getSessionData("subscriber_username") || "You"} if (folder_array.length == 1) { // no folder 2 data += ` -
+
-
- + + -
+
-
+
-
` +
` } else { // process folder 2 (id 1) data += ` -
+
-
- + + -
+
-
+
-
`; +
`; } // process odds @@ -230,14 +229,14 @@ for ${session_data.getSessionData("subscriber_username") || "You"} // Right Middle data += ` -
+
-
`; +`; } }); @@ -246,20 +245,19 @@ for ${session_data.getSessionData("subscriber_username") || "You"} if (folder_array.length % 2 != 0) { data += ` -
+
-
`; +`; } } data += ` - - + + -
-
- + + diff --git a/zefie_wtvp_minisrv/ServiceVault/wtv-flashrom/content/content-serve.js b/zefie_wtvp_minisrv/ServiceVault/wtv-flashrom/content/content-serve.js index e0dbb27a..e39e6741 100644 --- a/zefie_wtvp_minisrv/ServiceVault/wtv-flashrom/content/content-serve.js +++ b/zefie_wtvp_minisrv/ServiceVault/wtv-flashrom/content/content-serve.js @@ -1,5 +1,6 @@ var minisrv_service_file = true; -request_is_async = true; + +var request_is_async = true; var bf0app_update = false; var request_path = request_headers.request_url.replace(service_name + ":/", ""); diff --git a/zefie_wtvp_minisrv/ServiceVault/wtv-flashrom/current-noflash.js b/zefie_wtvp_minisrv/ServiceVault/wtv-flashrom/current-noflash.js index af6f82d8..854b6a16 100644 --- a/zefie_wtvp_minisrv/ServiceVault/wtv-flashrom/current-noflash.js +++ b/zefie_wtvp_minisrv/ServiceVault/wtv-flashrom/current-noflash.js @@ -1,6 +1,5 @@ var minisrv_service_file = true; -const WTVFlashrom = require(classPath + "/WTVFlashrom.js"); request_is_async = true; // this build can be local or on zefie's server diff --git a/zefie_wtvp_minisrv/ServiceVault/wtv-flashrom/get-by-path.js b/zefie_wtvp_minisrv/ServiceVault/wtv-flashrom/get-by-path.js index 4f480948..b9194f66 100644 --- a/zefie_wtvp_minisrv/ServiceVault/wtv-flashrom/get-by-path.js +++ b/zefie_wtvp_minisrv/ServiceVault/wtv-flashrom/get-by-path.js @@ -1,6 +1,5 @@ var minisrv_service_file = true; -const WTVFlashrom = require(classPath + "/WTVFlashrom.js"); request_is_async = true; var bf0app_update = false; diff --git a/zefie_wtvp_minisrv/ServiceVault/wtv-flashrom/get-lc2-page.js b/zefie_wtvp_minisrv/ServiceVault/wtv-flashrom/get-lc2-page.js index f4ab9230..1d86f5fb 100644 --- a/zefie_wtvp_minisrv/ServiceVault/wtv-flashrom/get-lc2-page.js +++ b/zefie_wtvp_minisrv/ServiceVault/wtv-flashrom/get-lc2-page.js @@ -1,7 +1,5 @@ var minisrv_service_file = true; -const WTVFlashrom = require(classPath + "/WTVFlashrom.js"); -var wtvflashrom; request_is_async = true; if (!request_headers.query.path) { @@ -13,15 +11,23 @@ if (!request_headers.query.path) { var request_path = request_headers.query.path; // read flashrom header info into array using WTVFlashrom class - wtvflashrom.getFlashromMeta(request_path, function (data) { - processLC2DownloadPage(request_headers.query.path, data, (request_headers.query.numparts ? request_headers.query.numparts : null)); + wtvflashrom.getFlashromMeta(request_path, function (data, headers) { + processLC2DownloadPage(data, headers, (request_headers.query.numparts ? request_headers.query.numparts : null)); }); } -async function processLC2DownloadPage(path, flashrom_info, numparts = null) { +async function processLC2DownloadPage(flashrom_info, headers, numparts = null) { + if (typeof flashrom_info === 'string') { + // zefie_flashrom_server error + data = flashrom_info; + headers += "\nminisrv-no-mail-count: true"; + headers += "\nwtv-expire-all: wtv-flashrom:/get-lc2-page?"; + headers += "\nwtv-expire-all: wtv-flashrom:/content"; + sendToClient(socket, headers, data); + return false; + } if (numparts != null) flashrom_info.part_count = parseInt(numparts); if (!flashrom_info.part_count) flashrom_info.part_count = parseInt(flashrom_info.message.substring(flashrom_info.message.length - 4).replace(/\D/g, '')); - console.log(flashrom_info); if (parseInt(flashrom_info.part_number) >= 0 && flashrom_info.rompath && flashrom_info.next_rompath) { if (!flashrom_info.message && flashrom_info.is_bootrom) { flashrom_info.message = "BootRom Part " + (flashrom_info.part_number + 1) + " of " + flashrom_info.part_count; @@ -31,7 +37,8 @@ async function processLC2DownloadPage(path, flashrom_info, numparts = null) { } headers = `200 OK -Content-type: text/html` +Content-type: text/html +minisrv-no-mail-count: true` data = ` @@ -97,16 +104,10 @@ data += ` +curblock="${(flashrom_info.part_number + 1)}"${(flashrom_info.part_count) ? ` +totalblocks="${flashrom_info.part_count}">` : `>`}

@@ -150,6 +151,9 @@ ${flashrom_info.message} } else { var errpage = wtvshared.doErrorPage(400) headers = errpage[0]; + headers += "\nminisrv-no-mail-count: true"; + headers += "\nwtv-expire-all: wtv-flashrom:/get-lc2-page?"; + headers += "\nwtv-expire-all: wtv-flashrom:/content"; data = errpage[1]; } sendToClient(socket, headers, data); diff --git a/zefie_wtvp_minisrv/ServiceVault/wtv-flashrom/initiate-lc2-download.js b/zefie_wtvp_minisrv/ServiceVault/wtv-flashrom/initiate-lc2-download.js index a757e999..90b8d7de 100644 --- a/zefie_wtvp_minisrv/ServiceVault/wtv-flashrom/initiate-lc2-download.js +++ b/zefie_wtvp_minisrv/ServiceVault/wtv-flashrom/initiate-lc2-download.js @@ -10,6 +10,7 @@ var romtype = session_data.get("wtv-client-rom-type"); if (request_headers.query.numparts) url += "&numparts=" + request_headers.query.numparts; } headers = "300 OK\n"; + headers += "minisrv-no-mail-count: true\n"; headers += "wtv-visit: " + url + "\n"; headers += "Location: " + url + "\n"; headers += "Content-type: text/html"; diff --git a/zefie_wtvp_minisrv/ServiceVault/wtv-flashrom/lc2-download-complete.js b/zefie_wtvp_minisrv/ServiceVault/wtv-flashrom/lc2-download-complete.js index fbf033c8..09af9e9a 100644 --- a/zefie_wtvp_minisrv/ServiceVault/wtv-flashrom/lc2-download-complete.js +++ b/zefie_wtvp_minisrv/ServiceVault/wtv-flashrom/lc2-download-complete.js @@ -1,7 +1,8 @@ var minisrv_service_file = true; headers = `200 OK -Content-type: text/html` +Content-type: text/html +minisrv-no-mail-count: true` data = ` diff --git a/zefie_wtvp_minisrv/ServiceVault/wtv-flashrom/noflash.js b/zefie_wtvp_minisrv/ServiceVault/wtv-flashrom/noflash.js index d3ba940f..bcfa0c22 100644 --- a/zefie_wtvp_minisrv/ServiceVault/wtv-flashrom/noflash.js +++ b/zefie_wtvp_minisrv/ServiceVault/wtv-flashrom/noflash.js @@ -1,6 +1,5 @@ var minisrv_service_file = true; -const WTVFlashrom = require(classPath + "/WTVFlashrom.js"); request_is_async = true; // this build can be local or on zefie's server diff --git a/zefie_wtvp_minisrv/ServiceVault/wtv-head-waiter/ValidateLogin.js b/zefie_wtvp_minisrv/ServiceVault/wtv-head-waiter/ValidateLogin.js index 323ad9f2..4cfc138b 100644 --- a/zefie_wtvp_minisrv/ServiceVault/wtv-head-waiter/ValidateLogin.js +++ b/zefie_wtvp_minisrv/ServiceVault/wtv-head-waiter/ValidateLogin.js @@ -86,7 +86,7 @@ minisrv-no-mail-count: true Content-Type: text/html`; if (client_challenge_response) { headers += ` -wtv-encrypted: true`; +wtv-encrypted: ${(request_headers['wtv-encrypted']) ? wtvshared.parseBool(request_headers['wtv-encrypted']) : true}`; if (wtvsec_login) session_data.data_store.wtvsec_login.update_ticket = true; } if (limitedLoginRegistered && session_data.getUserPasswordEnabled()) gourl = "wtv-head-waiter:/password?"; diff --git a/zefie_wtvp_minisrv/ServiceVault/wtv-head-waiter/login-stage-two.js b/zefie_wtvp_minisrv/ServiceVault/wtv-head-waiter/login-stage-two.js index 4618e857..a9d8d7f1 100644 --- a/zefie_wtvp_minisrv/ServiceVault/wtv-head-waiter/login-stage-two.js +++ b/zefie_wtvp_minisrv/ServiceVault/wtv-head-waiter/login-stage-two.js @@ -1,17 +1,19 @@ var minisrv_service_file = true; var gourl = null; +var bootrom = parseInt(session_data.get("wtv-client-bootrom-version")); + if (!session_data.isRegistered() && (!request_headers.query.guest_login || !minisrv_config.config.allow_guests)) gourl = "wtv-register:/splash?"; var home_url = "wtv-home:/home?"; if (gourl) { - headers = `200 OK -wtv-open-isp-disabled: false -`; + headers = "200 OK\n"; + if (bootrom !== 0) headers += "wtv-open-isp-disabled: false\n"; + if (!session_data.isRegistered() && (!request_headers.query.guest_login || !minisrv_config.config.allow_guests)) { // fake logged in for reg session_data.setUserLoggedIn(true); - headers += `wtv-encrypted: true + headers += `wtv-encrypted: ${(request_headers['wtv-encrypted']) ? wtvshared.parseBool(request_headers['wtv-encrypted']) : true} ${getServiceString('wtv-register')} ${getServiceString('wtv-head-waiter')} ${getServiceString('wtv-star')} @@ -91,13 +93,16 @@ wtv-client-date: `+ strftime("%a, %d %b %Y %H:%M:%S", new Date(new Date().toUTCS wtv-country: US wtv-language-header: en-US,en wtv-noback-all: wtv- -wtv-visit: client:closeallpanels -wtv-expire-all: client:closeallpanels wtv-transition-override: off wtv-smartcard-inserted-message: Contacting service wtv-ssl-timeout: 240 wtv-login-timeout: 7200 `; + if (bootrom !== 0) { + headers += `wtv-visit: client:closeallpanels +wtv-expire-all: client:closeallpanels +`; + } if (!limitedLogin && !limitedLoginRegistered) { session_data.assignMailStore(); headers += getServiceString('all', { "exceptions": ["wtv-register"] }); @@ -175,11 +180,11 @@ wtv-inactive-timeout: 1440 wtv-show-time-enabled: true wtv-allow-dsc: true wtv-tourist-enabled: true -wtv-open-isp-disabled: false wtv-offline-mail-enable: false wtv-demo-mode: 0 wtv-wink-deferrer-retries: 3 wtv-name-server: 8.8.8.8`; + if (bootrom !== 0) { headers += "\nwtv-open-isp-disabled: false" } } } if (!request_headers.query.reconnect) headers += "\nwtv-visit: " + gourl; diff --git a/zefie_wtvp_minisrv/ServiceVault/wtv-head-waiter/login.js b/zefie_wtvp_minisrv/ServiceVault/wtv-head-waiter/login.js index 4a971720..e3680980 100644 --- a/zefie_wtvp_minisrv/ServiceVault/wtv-head-waiter/login.js +++ b/zefie_wtvp_minisrv/ServiceVault/wtv-head-waiter/login.js @@ -9,7 +9,8 @@ if (request_headers.query.relogin) gourl += "relogin=true"; else if (request_headers.query.reconnect) gourl += "reconnect=true"; else gourl += "initial_login=true" -if (request_headers.query.guest_login) { +var bootrom = parseInt(session_data.get("wtv-client-bootrom-version")); +if (request_headers.query.guest_login || bootrom === 0) { if (gourl.substr(-1) != "?") gourl += "&"; gourl += "guest_login=true"; if (request_headers.query.skip_splash) gourl += "&skip_splash=true"; diff --git a/zefie_wtvp_minisrv/ServiceVault/wtv-home/home.js b/zefie_wtvp_minisrv/ServiceVault/wtv-home/home.js index 93b41609..e298f413 100644 --- a/zefie_wtvp_minisrv/ServiceVault/wtv-home/home.js +++ b/zefie_wtvp_minisrv/ServiceVault/wtv-home/home.js @@ -1,392 +1,302 @@ var minisrv_service_file = true; - -if (request_headers.query.url) { - headers = `300 OK -Location: ${request_headers.query.url}`; -} else { - headers = `200 OK +headers =`200 OK Connection: Keep-Alive wtv-expire-all: wtv-home:/splash -wtv-expire-all: wtv-flashrom: Content-type: text/html` - var cryptstatus = (wtv_encrypted ? "Encrypted" : "Not Encrypted") - var comp_type = wtvmime.shouldWeCompress(session_data, 'text/html'); - var compstatus = "uncompressed"; - switch (comp_type) { - case 1: - compstatus = "wtv-lzpf"; - break; - case 2: - compstatus = "gzip (level 9)"; - break; - } +var cryptstatus = (wtv_encrypted ? "Encrypted" : "Not Encrypted") +var comp_type = wtvmime.shouldWeCompress(socket.ssid,'text/html'); +var compstatus = "uncompressed"; +switch (comp_type) { + case 1: + compstatus = "wtv-lzpf"; + break; + case 2: + compstatus = "gzip (level 9)"; + break; +} - var unread_mailcount = session_data.mailstore.countUnreadMessages(0) - var mailbox_gif_num = 0; // no messages - if (unread_mailcount > 0) { - if (unread_mailcount == 1) mailbox_gif_num = 1; - else mailbox_gif_num = 2; - } +var wtv_system_sysconfig = session_data.get("wtv-system-sysconfig"); +var wtv_client_bootrom_version = session_data.get("wtv-client-bootrom-version"); +var wtv_system_chipversion_str = session_data.get("wtv-system-chipversion"); +var notImplementedAlert = new clientShowAlert({ + 'image': minisrv_config.config.service_logo, + 'message': "This feature is not available.", + 'buttonlabel1': "Okay", + 'buttonaction1': "client:donothing", + 'noback': true, +}).getURL(); - data = ` - +var notAdminAlert = new clientShowAlert({ + 'image': minisrv_config.config.service_logo, + 'message': "Sorry, you are not configured as an admin on this server.

If you are the server operator, please
see user_config.example.json
for an example on how to configure yourself as an administrator.", + 'buttonlabel1': "Ugh, fine.", + 'buttonaction1': "client:donothing", + 'noback': true, +}).getURL(); - Home for ${session_data.getSessionData("subscriber_username") || "minisrv"} - - +var ownMinisrv = new clientShowAlert({ + 'image': minisrv_config.config.service_logo, + 'message': "To run your own minisrv, please visit the following link on your PC:

https://zef.pw/minisrv", + 'buttonlabel1': "Okay", + 'buttonaction1': "client:donothing", + 'noback': true, +}).getURL(); - +var supportZefieAlert = new clientShowAlert({ + 'image': minisrv_config.config.service_logo, + 'message': "If you would like to support zefie or minisrv, please visit the following link on your PC:

https://zef.pw/helpminisrv", + 'buttonlabel1': "Okay", + 'buttonaction1': "client:donothing", + 'noback': true, +}).getURL(); - - - - - - - - - -
-
+data =`\0 + + + +Home for ${session_data.getSessionData("subscriber_username") || "minisrv"} + + + + + + + + +
+ + + + + + + + + - - - - + - - +
+
+
+
+ WebTV URL, FILE, and CLIENT Access: + + + + +
+ +  + + +
- -
- - - - -
- -
-
- -
- +
+ - -
- - - -
-
- - - -
- - -
- Login -
-
-
-
+
+
+ + +
+Mail + +Favorites + +Music + +Search + +ROMs + +Settings + +Help +
- -
- - - - -
- -
-
- -
- - - -
- - - -
-
- - - - - -
- - -
- Setup -
-
-
-
- - -
- - - - -
- -
-
- -
- - - - -
- - - -
-
- - - - -
- - -
- Discuss -
-
- -
-
- - - - - -
- - - - -
- -
-
- -
- + + +
+ + + +
+ + + + + + + + + +
+» Community « +
+
+€ Chat +
+
+€ Discuss + +
+
+€ Messenger + +
+
+
+ + + + + + + + + + + + + - - - - -
+» Account « +
+
+€ Relogin + +
+
+€ Configure + +
+
+€ Password + +
+
+€ Add User + +
+
`; - data += ` - -
- - - -
-
- - - - -
- - -
- Help (WIP) -
-
- -
-
- - -
- - - - - -
- -
-
- -
- - - -
- -
- - -
- -
- - - - - - - - - - - - - -
- -
- - - -
- - - - - - - -
-
- -
-
- - -
- Mail -
-
- - -
- - - - - - -
-
- -
-
- - -
- Favorites -
-
- - -
- - - - - - -
-
- -
-
- - -
- Flashroms -
-
- - -
- - - - - - -
-
- -
-
- - -
- Search -
-
-
-
- -
- - - - - - - -
-Welcome to ${minisrv_config.config.service_name}`; - if (session_data.getSessionData("registered")) data += ", " + session_data.getSessionData("subscriber_username") + "!"; - data += ` +if (session_data.getSessionData("registered")) data += `€ Unregister`; +else data += `€ Register` +data += ` +
-
-Status: ${cryptstatus} (${compstatus}) -
-
-
-

  Main Menu

-
    -
  • wtv-admin new!
  • -`; - if (session_data.hasCap("client-can-do-chat")) { - data += "
  • IRC Chat Test
  • \n" - } - if (session_data.hasCap("client-has-disk")) { - // only show disk stuff if client has disk - data += "
  • DiskHax ~ VFatHax
  • \n"; - if (session_data.hasCap("client-can-do-macromedia-flash2")) { - // only show demo if client can do flash2 - data += "
  • Old DealerDemo: Download ~ Access
  • \n"; - } - } - data += `
`; - // for development - if (fs.existsSync(service_vaults[0] + "/" + service_name + "/home.zefie.html")) { - data += fs.readFileSync(service_vaults[0] + "/" + service_name + "/home.zefie.html", { 'encoding': 'utf8' }); - } - data += `
-
-
-
-Connection Speed: &rate; -
-
-minisrv v${minisrv_config.version}${(minisrv_config.config.git_commit) ? ' git-' + minisrv_config.config.git_commit : ''}, hosted by ${minisrv_config.config.service_owner}  
-
+
- -` -} \ No newline at end of file +
+ + + + + +
+ + + + +
+ € Welcome to zefie's minisrv ${minisrv_version_string.split(" ")[3]} +
+
+This server is operated by ${minisrv_config.config.service_owner}. +
+ +
+ + + + + +
+ € minisrv Latest Updates +
+
+•  Added a WebTV Character Map
+•  Redesigned homepage based on MattMan69's HackTV
+•  Added a new minisrv logo
+
+
+ +
+ + + + + +
+ + + + + + + + + + + + +
+ +» Tools « +
+
+€ WTV Tricks + +
+
+€ WTV Admin + +
+
+€ Clear Cache + +
+
+
+ + + + + + + + + + + +
+ +» More Stuff « +
+ +
+€ Switch
   server
+
+
+
+€ Run your
   own server
+
+
+
+€ Midnight
   Archives
+
+
+
+€ Help zefie + +
+
+
+
+` +data += "\n"; \ No newline at end of file diff --git a/zefie_wtvp_minisrv/ServiceVault/wtv-home/images/proto3/HomeColumn1Header.gif b/zefie_wtvp_minisrv/ServiceVault/wtv-home/images/proto3/HomeColumn1Header.gif new file mode 100644 index 00000000..b051c153 Binary files /dev/null and b/zefie_wtvp_minisrv/ServiceVault/wtv-home/images/proto3/HomeColumn1Header.gif differ diff --git a/zefie_wtvp_minisrv/ServiceVault/wtv-home/images/proto3/HomeColumn2Header.gif b/zefie_wtvp_minisrv/ServiceVault/wtv-home/images/proto3/HomeColumn2Header.gif new file mode 100644 index 00000000..a172a988 Binary files /dev/null and b/zefie_wtvp_minisrv/ServiceVault/wtv-home/images/proto3/HomeColumn2Header.gif differ diff --git a/zefie_wtvp_minisrv/ServiceVault/wtv-home/images/proto3/HomeColumn3Header.gif b/zefie_wtvp_minisrv/ServiceVault/wtv-home/images/proto3/HomeColumn3Header.gif new file mode 100644 index 00000000..838ee8c5 Binary files /dev/null and b/zefie_wtvp_minisrv/ServiceVault/wtv-home/images/proto3/HomeColumn3Header.gif differ diff --git a/zefie_wtvp_minisrv/ServiceVault/wtv-home/images/proto3/HomeColumn3Top.gif b/zefie_wtvp_minisrv/ServiceVault/wtv-home/images/proto3/HomeColumn3Top.gif new file mode 100644 index 00000000..7602e538 Binary files /dev/null and b/zefie_wtvp_minisrv/ServiceVault/wtv-home/images/proto3/HomeColumn3Top.gif differ diff --git a/zefie_wtvp_minisrv/ServiceVault/wtv-home/images/proto3/HomeMainSearchButton.gif b/zefie_wtvp_minisrv/ServiceVault/wtv-home/images/proto3/HomeMainSearchButton.gif new file mode 100644 index 00000000..26fb14aa Binary files /dev/null and b/zefie_wtvp_minisrv/ServiceVault/wtv-home/images/proto3/HomeMainSearchButton.gif differ diff --git a/zefie_wtvp_minisrv/ServiceVault/wtv-home/images/proto3/HomeShoppingSearchButton.gif b/zefie_wtvp_minisrv/ServiceVault/wtv-home/images/proto3/HomeShoppingSearchButton.gif new file mode 100644 index 00000000..2cf085e7 Binary files /dev/null and b/zefie_wtvp_minisrv/ServiceVault/wtv-home/images/proto3/HomeShoppingSearchButton.gif differ diff --git a/zefie_wtvp_minisrv/ServiceVault/wtv-home/images/proto3/HomeTaskBar.gif b/zefie_wtvp_minisrv/ServiceVault/wtv-home/images/proto3/HomeTaskBar.gif new file mode 100644 index 00000000..d7d27ba1 Binary files /dev/null and b/zefie_wtvp_minisrv/ServiceVault/wtv-home/images/proto3/HomeTaskBar.gif differ diff --git a/zefie_wtvp_minisrv/ServiceVault/wtv-home/images/proto3/HomeTaskBar1.gif b/zefie_wtvp_minisrv/ServiceVault/wtv-home/images/proto3/HomeTaskBar1.gif new file mode 100644 index 00000000..ab5280e3 Binary files /dev/null and b/zefie_wtvp_minisrv/ServiceVault/wtv-home/images/proto3/HomeTaskBar1.gif differ diff --git a/zefie_wtvp_minisrv/ServiceVault/wtv-home/images/proto3/HomeTaskBarDividers.gif b/zefie_wtvp_minisrv/ServiceVault/wtv-home/images/proto3/HomeTaskBarDividers.gif new file mode 100644 index 00000000..63dc1b57 Binary files /dev/null and b/zefie_wtvp_minisrv/ServiceVault/wtv-home/images/proto3/HomeTaskBarDividers.gif differ diff --git a/zefie_wtvp_minisrv/ServiceVault/wtv-home/images/proto3/HomeTopEdge.gif b/zefie_wtvp_minisrv/ServiceVault/wtv-home/images/proto3/HomeTopEdge.gif new file mode 100644 index 00000000..d144ea13 Binary files /dev/null and b/zefie_wtvp_minisrv/ServiceVault/wtv-home/images/proto3/HomeTopEdge.gif differ diff --git a/zefie_wtvp_minisrv/ServiceVault/wtv-home/images/proto3/HomeTopLeftEdge.gif b/zefie_wtvp_minisrv/ServiceVault/wtv-home/images/proto3/HomeTopLeftEdge.gif new file mode 100644 index 00000000..57031832 Binary files /dev/null and b/zefie_wtvp_minisrv/ServiceVault/wtv-home/images/proto3/HomeTopLeftEdge.gif differ diff --git a/zefie_wtvp_minisrv/ServiceVault/wtv-home/images/proto3/HomeTopLeftEdgeBLANK.gif b/zefie_wtvp_minisrv/ServiceVault/wtv-home/images/proto3/HomeTopLeftEdgeBLANK.gif new file mode 100644 index 00000000..29610d07 Binary files /dev/null and b/zefie_wtvp_minisrv/ServiceVault/wtv-home/images/proto3/HomeTopLeftEdgeBLANK.gif differ diff --git a/zefie_wtvp_minisrv/ServiceVault/wtv-home/images/proto3/circlearrow.gif b/zefie_wtvp_minisrv/ServiceVault/wtv-home/images/proto3/circlearrow.gif new file mode 100644 index 00000000..8df8ba7c Binary files /dev/null and b/zefie_wtvp_minisrv/ServiceVault/wtv-home/images/proto3/circlearrow.gif differ diff --git a/zefie_wtvp_minisrv/ServiceVault/wtv-mail/get-signature.js b/zefie_wtvp_minisrv/ServiceVault/wtv-mail/get-signature.js index 647c8a7f..73b1ac49 100644 --- a/zefie_wtvp_minisrv/ServiceVault/wtv-mail/get-signature.js +++ b/zefie_wtvp_minisrv/ServiceVault/wtv-mail/get-signature.js @@ -20,9 +20,14 @@ if (request_headers.query.sanitize) { if (data.indexOf("") >= 0) { data = wtvshared.sanitizeSignature(data).replace("", ``); } else { - data = `\n${data}`; + data = `\n${wtvshared.sanitizeSignature(data)}`; + } + if (request_headers.query.showdemotext) { + data += `
+
This is a preview of your signature. The text below the line will not appear in your outgoing messages. +It is provided to demonstrate what a message composed with this signature may look like. +This is what a link looks like`; } - if (request_headers.query.demotext) data += "
" + request_headers.query.demotext; } if (!errpage) { headers = `200 OK diff --git a/zefie_wtvp_minisrv/ServiceVault/wtv-mail/listmail.js b/zefie_wtvp_minisrv/ServiceVault/wtv-mail/listmail.js index 0a46007b..9e78f93d 100644 --- a/zefie_wtvp_minisrv/ServiceVault/wtv-mail/listmail.js +++ b/zefie_wtvp_minisrv/ServiceVault/wtv-mail/listmail.js @@ -302,7 +302,7 @@ ${message_font_close}
${message_font_open} -${(message.subject) ? message.subject : "(No Subject)"} +${(message.subject) ? wtvshared.htmlEntitize(message.subject) : "(No Subject)"} ${message_font_close} diff --git a/zefie_wtvp_minisrv/ServiceVault/wtv-mail/readmail.js b/zefie_wtvp_minisrv/ServiceVault/wtv-mail/readmail.js index 863b1114..87b98853 100644 --- a/zefie_wtvp_minisrv/ServiceVault/wtv-mail/readmail.js +++ b/zefie_wtvp_minisrv/ServiceVault/wtv-mail/readmail.js @@ -274,7 +274,7 @@ ${(message.subject) ? wtvshared.htmlEntitize(message.subject) : '(No subject)'} if (typeof message.body === "object" && message.body) { message.body = wtvshared.decodeBufferText(message.body); } - message.body = message.body.replace(/\n/g, "

"); + if (message.body) message.body = message.body.replace(/\n/g, "

"); data += `${(message.allow_html) ? message.body : wtvshared.htmlEntitize(message.body, true)}

`; diff --git a/zefie_wtvp_minisrv/ServiceVault/wtv-mail/sendmail.js b/zefie_wtvp_minisrv/ServiceVault/wtv-mail/sendmail.js index b0509cd3..5e91e2c8 100644 --- a/zefie_wtvp_minisrv/ServiceVault/wtv-mail/sendmail.js +++ b/zefie_wtvp_minisrv/ServiceVault/wtv-mail/sendmail.js @@ -6,6 +6,7 @@ var intro_seen = session_data.mailstore.checkMailIntroSeen(); if (!intro_seen && !request_headers.query.intro_seen) { // user is trying to bypass the intro screen headers = "300 OK\nLocation: wtv-mail:/DiplomaMail?came-from=" + encodeURIComponent(request_headers.request_url); +} else if (request_headers.query.clear == "true") { } else if (request_headers.query.clear == "true") { if (request_headers.Referer) gourl = request_headers.Referer.replace(/[\?\&]clear\=true/, ''); @@ -62,8 +63,8 @@ Location: ${gourl}`; reply_message = session_data.mailstore.getMessageByID(request_headers.query.message_reply_id); if (reply_message) { msg_subject = "Re: " + reply_message.subject; - to_addr = reply_message.to_addr; - to_name = reply_message.to_name; + to_addr = reply_message.from_addr; + to_name = reply_message.from_name; } } } @@ -125,7 +126,7 @@ Content-Type: audio/wav`; var username = session_data.getSessionData("subscriber_username"); var userdisplayname = wtvshared.htmlEntitize(session_data.getSessionData("subscriber_name")); - var address = username + "@" + minisrv_config.config.domain_name + var address = username + "@" + minisrv_config.config.service_name //minisrv_config.config.domain_name var notImplementedAlert = new clientShowAlert({ 'image': minisrv_config.config.service_logo, 'message': "This feature is not available.", diff --git a/zefie_wtvp_minisrv/ServiceVault/wtv-news/news.js b/zefie_wtvp_minisrv/ServiceVault/wtv-news/news.js index f484a392..77d8876c 100644 --- a/zefie_wtvp_minisrv/ServiceVault/wtv-news/news.js +++ b/zefie_wtvp_minisrv/ServiceVault/wtv-news/news.js @@ -252,7 +252,6 @@ ${page_start}-${page_end}
` if (NGCount > 0) { - Object.keys(messages).forEach(function (k) { var message = messages[k].article; var has_relation = (messages[k].relation !== null) ? true : false; @@ -267,7 +266,7 @@ ${page_start}-${page_end} ${(has_relation) ? `•` : ''} -${(message.headers.SUBJECT) ? message.headers.SUBJECT : "(No Subject)"} +${(message.headers.SUBJECT) ? wtvshared.htmlEntitize(message.headers.SUBJECT) : "(No Subject)"} @@ -335,6 +334,7 @@ wtv-expire-all: wtv-news:/news?group=${group}&article=`; var message_body = message.text; var attachments = null; var signature_index = null; + wtvnews.debug(message); if (message.attachments) attachments = message.attachments; if (attachments) { if (Object.keys(attachments).length > 0) { @@ -345,7 +345,7 @@ wtv-expire-all: wtv-news:/news?group=${group}&article=`; return false; } }); - attachments.splice(signature_index, 1); + if (signature_index) attachments.splice(signature_index, 1); } } if (signature) message_colors = session_data.mailstore.getSignatureColors(signature); diff --git a/zefie_wtvp_minisrv/ServiceVault/wtv-register/FinishRegistration.js b/zefie_wtvp_minisrv/ServiceVault/wtv-register/FinishRegistration.js index 34d684cd..b1360686 100644 --- a/zefie_wtvp_minisrv/ServiceVault/wtv-register/FinishRegistration.js +++ b/zefie_wtvp_minisrv/ServiceVault/wtv-register/FinishRegistration.js @@ -1,4 +1,5 @@ var minisrv_service_file = true; +session_data.data_store.wtvsec_login.PrepareTicket(); headers = `300 Moved Connection: Close diff --git a/zefie_wtvp_minisrv/ServiceVault/wtv-register/ValidateReviewAccountInfo.js b/zefie_wtvp_minisrv/ServiceVault/wtv-register/ValidateReviewAccountInfo.js index bbb94b33..3eb76532 100644 --- a/zefie_wtvp_minisrv/ServiceVault/wtv-register/ValidateReviewAccountInfo.js +++ b/zefie_wtvp_minisrv/ServiceVault/wtv-register/ValidateReviewAccountInfo.js @@ -1,5 +1,6 @@ var minisrv_service_file = true; + if (!request_headers.query.registering || !request_headers.query.subscriber_name || !request_headers.query.subscriber_username || @@ -8,40 +9,52 @@ if (!request_headers.query.registering || !session_data.session_store || !session_data || !socket.ssid - ) { +) { var errpage = wtvshared.doErrorPage(400); headers = errpage[0]; data = errpage[1]; } else { - session_data.setSessionData("subscriber_name", request_headers.query.subscriber_name); - session_data.setSessionData("subscriber_username", request_headers.query.subscriber_username); - session_data.setSessionData("subscriber_contact", request_headers.query.subscriber_contact); - session_data.setSessionData("subscriber_contact_method", request_headers.query.subscriber_contact_method); - session_data.setSessionData("subscriber_userid", 0); - session_data.setSessionData("registered", true); - var mailstore_exists = session_data.mailstore.mailstoreExists(); - var mailbox_exists = false; - if (!mailstore_exists) mailstore_exists = session_data.mailstore.createMailstore(); - if (mailstore_exists) { - if (!session_data.mailstore.mailboxExists(0)) { - // mailbox does not yet exist, create it - mailbox_exists = session_data.mailstore.createMailbox(0); - } - if (mailbox_exists) { - // Just created Inbox for the first time, so create the welcome message - session_data.mailstore.createWelcomeMessage(); - } - } - if (!session_data.saveSessionData(true, true)) { - var errpage = wtvshared.doErrorPage(400); + var errpage = null; + const WTVRegister = require(classPath + "/WTVRegister.js") + var wtvr = new WTVRegister(minisrv_config, SessionStore); + if (!request_headers.query.subscriber_username) errpage = wtvshared.doErrorPage(400, "Please enter a username."); + else if (request_headers.query.subscriber_username.length < minisrv_config.config.user_accounts.min_username_length) errpage = wtvshared.doErrorPage(400, "Please choose a username with " + minisrv_config.config.user_accounts.min_username_length + " or more characters."); + else if (request_headers.query.subscriber_username.length > minisrv_config.config.user_accounts.max_username_length) errpage = wtvshared.doErrorPage(400, "Please choose a username with " + minisrv_config.config.user_accounts.max_username_length + " or less characters."); + else if (!wtvr.checkUsernameSanity(request_headers.query.subscriber_username)) errpage = wtvshared.doErrorPage(400, "The username you have chosen contains invalid characters. Please choose a username with only letters, numbers, _ or -. Also, please be sure your username begins with a letter."); + else if (!wtvr.checkUsernameAvailable(request_headers.query.subscriber_username)) errpage = wtvshared.doErrorPage(400, "The username you have selected is already in use. Please select another username."); + if (errpage) { headers = errpage[0]; data = errpage[1]; } else { + session_data.setSessionData("subscriber_name", request_headers.query.subscriber_name); + session_data.setSessionData("subscriber_username", request_headers.query.subscriber_username); + session_data.setSessionData("subscriber_contact", request_headers.query.subscriber_contact); + session_data.setSessionData("subscriber_contact_method", request_headers.query.subscriber_contact_method); + session_data.setSessionData("subscriber_userid", 0); + session_data.setSessionData("registered", true); + var mailstore_exists = session_data.mailstore.mailstoreExists(); + var mailbox_exists = false; + if (!mailstore_exists) mailstore_exists = session_data.mailstore.createMailstore(); + if (mailstore_exists) { + if (!session_data.mailstore.mailboxExists(0)) { + // mailbox does not yet exist, create it + mailbox_exists = session_data.mailstore.createMailbox(0); + } + if (mailbox_exists) { + // Just created Inbox for the first time, so create the welcome message + session_data.mailstore.createWelcomeMessage(); + } + } + if (!session_data.saveSessionData(true, true)) { + var errpage = wtvshared.doErrorPage(400); + headers = errpage[0]; + data = errpage[1]; + } else { - headers = `200 OK + headers = `200 OK Content-Type: text/html`; - data = ` + data = ` Finished signing up @@ -110,5 +123,6 @@ connect to the Internet by choosing </body> </html> `; + } } } \ No newline at end of file diff --git a/zefie_wtvp_minisrv/ServiceVault/wtv-setup/add-user-password.js b/zefie_wtvp_minisrv/ServiceVault/wtv-setup/add-user-password.js index c61e257c..3153b76b 100644 --- a/zefie_wtvp_minisrv/ServiceVault/wtv-setup/add-user-password.js +++ b/zefie_wtvp_minisrv/ServiceVault/wtv-setup/add-user-password.js @@ -1,7 +1,6 @@ var minisrv_service_file = true; var errpage = null; -const WTVRegister = require(classPath + "/WTVRegister.js") const wtvr = new WTVRegister(minisrv_config, SessionStore); if (session_data.user_id != 0) errpage = wtvshared.doErrorPage(400, "You are not authorized to add users to this account."); diff --git a/zefie_wtvp_minisrv/ServiceVault/wtv-setup/edit-user-begin.js b/zefie_wtvp_minisrv/ServiceVault/wtv-setup/edit-user-begin.js index 75155bdb..85b6e3d9 100644 --- a/zefie_wtvp_minisrv/ServiceVault/wtv-setup/edit-user-begin.js +++ b/zefie_wtvp_minisrv/ServiceVault/wtv-setup/edit-user-begin.js @@ -19,7 +19,9 @@ if (session_data.user_id != 0 && session_data.user_id != request_headers.query.u if (user_id != null) { headers = `200 OK Connection: Keep-Alive -Content-Type: text/html` +Content-Type: text/html +wtv-expire-all: wtv-setup:/edit-user +wtv-noback-all: wtv-setup:/edit-user` var userSession = null; if (session_data.user_id == request_headers.query.user_id) userSession = session_data; else { @@ -83,7 +85,7 @@ ${(user_id == 0) ? 'Subscriber' : 'User'} information <td> <td absheight=244 valign=top align=left> <form -action="wtv-setup:/serve-billing-overview" +action="client:goback" > <P> <table cellspacing=0 cellpadding=0 border=0> diff --git a/zefie_wtvp_minisrv/ServiceVault/wtv-setup/mail-signature.js b/zefie_wtvp_minisrv/ServiceVault/wtv-setup/mail-signature.js index 1a99ac39..e5826494 100644 --- a/zefie_wtvp_minisrv/ServiceVault/wtv-setup/mail-signature.js +++ b/zefie_wtvp_minisrv/ServiceVault/wtv-setup/mail-signature.js @@ -117,7 +117,7 @@ ${(request_headers.query.preview) ? "<tr><td><td colspan=3><b>Signature Preview: <tr> <TD> <td colspan=3 valign=top align=left bgcolor="${(request_headers.query.preview) ? message_colors.bgcolor : "0D0D0D"}"> -${(request_headers.query.preview) ? `<embed src="wtv-mail:/get-signature?sanitize=true&demotext=${encodeURIComponent(`<hr>This is a preview of your signature. The text below the line will not appear in your outgoing messages. It is provided to demonstrate what a message composed with this signature may look like. <a href="client:donothing">This is what a link looks like</a>.`)}" height=40></embed><br><br>` : ''} +${(request_headers.query.preview) ? `<embed src="wtv-mail:/get-signature?sanitize=true&showdemotext=true" height=40></embed><br><br>` : ''} <tr> <td> <td colspan=3 height=2 valign=top align=left> diff --git a/zefie_wtvp_minisrv/ServiceVault/wtv-setup/messenger-info.js b/zefie_wtvp_minisrv/ServiceVault/wtv-setup/messenger-info.js index 52d99377..ea9dbbee 100644 --- a/zefie_wtvp_minisrv/ServiceVault/wtv-setup/messenger-info.js +++ b/zefie_wtvp_minisrv/ServiceVault/wtv-setup/messenger-info.js @@ -83,7 +83,7 @@ setTimeout("clearAllLists();", 2*1000); <tr> <td width=5 height=26> <td width=93> -<table width=93 cellspacing=0 cellpadding=0 href=wtv-guide:/help?topic=Messenger&subtopic=Index> +<table width=93 cellspacing=0 cellpadding=0 href=wtv-guide:/help?topic=Index&subtopic=Glossary> <tr> <td> <table cellspacing=0 cellpadding=0> diff --git a/zefie_wtvp_minisrv/ServiceVault/wtv-setup/messenger.js b/zefie_wtvp_minisrv/ServiceVault/wtv-setup/messenger.js index 368baae9..6114f350 100644 --- a/zefie_wtvp_minisrv/ServiceVault/wtv-setup/messenger.js +++ b/zefie_wtvp_minisrv/ServiceVault/wtv-setup/messenger.js @@ -26,7 +26,7 @@ function ShowMessengerPanel() <tr> <td abswidth=6> <td abswidth=92 absheight=76> -<table absheight=76 cellspacing=0 cellpadding=0> +<table href="wtv-home:/home" absheight=76 cellspacing=0 cellpadding=0> <tr> <td align=right> <img src="${minisrv_config.config.service_logo}" width=87 height=67> diff --git a/zefie_wtvp_minisrv/ServiceVault/wtv-setup/sound.js b/zefie_wtvp_minisrv/ServiceVault/wtv-setup/sound.js index 6b2f0e43..70319276 100644 --- a/zefie_wtvp_minisrv/ServiceVault/wtv-setup/sound.js +++ b/zefie_wtvp_minisrv/ServiceVault/wtv-setup/sound.js @@ -76,31 +76,62 @@ Music if (canDoMuzac) { data += `<p>Turn on background music to have songs play continually in -the background. -<p>Remember to adjust the +the background.<p>Remember to adjust the volume on your TV so you can -hear the music.`; -} else { - data += `Your client reports it does -not support background music. -<p>However, you can still browse, -and listen to the music in the foreground.`; -} -data += ` +hear the music. <TD WIDTH=20> <TD WIDTH=198 VALIGN=top ALIGN=left> -<spacer type=block height=20 width=1> -<form action="client:ConfirmPhoneSetup"> +<spacer type=block height=16 width=1> +<form> <table cellspacing=0 cellpadding=0> <tr> <td valign=top> +Background music<p> <input type=hidden name=autosubmit value=true autosubmit=onleave> <INPUT TYPE="checkbox" NAME="setup-play-bgm" VALUE="1" action="client:SetSetupValue" selected &wtv-muzac-on;${canDoMuzac ? '' : 'disabled'}> -<td abswidth=4> -<td valign=top> -<font size=-1>Background<br>music</font> -<tr><td absheight=10> +<INPUT TYPE="hidden" NAME="current_volume" ID="current_volume" value="&vol;"> + +<tr><td absheight=38> + +<tr> +<td> +<p> +BGM Volume +<p> +<INPUT TYPE="radio" ID="vol_soft" NAME="setup-bgm-volume" VALUE="soft" action="client:SetSetupValue"> Soft<br> +<INPUT TYPE="radio" ID="vol_medium" NAME="setup-bgm-volume" VALUE="medium" action="client:SetSetupValue"> Medium<br> +<INPUT TYPE="radio" ID="vol_loud" NAME="setup-bgm-volume" VALUE="loud" action="client:SetSetupValue"> Loud +<script type="text/javascript"> +var volume=document.forms[0].current_volume.value +var radio = null; +if (volume == "soft") { + radio = document.forms[0]['setup-bgm-volume'][0]; +} else if (volume == "medium") { + radio = document.forms[0]['setup-bgm-volume'][1]; +} else if (volume == "loud") { + radio = document.forms[0]['setup-bgm-volume'][2]; +} + +if (radio) { + radio.checked = true; +} +</script> +</td> +`; +} else { + data += `<p>Your client reports it does +not support background music. +<p>However, you can still browse, +and listen to the music in the foreground. +<TD WIDTH=20> +<TD WIDTH=198 VALIGN=top ALIGN=left> +<spacer type=block height=16 width=1> +<form> +<table cellspacing=0 cellpadding=0> +`; +} +data += ` <tr> <td valign=top> </table> diff --git a/zefie_wtvp_minisrv/ServiceVault/wtv-setup/validate-add-user-done.js b/zefie_wtvp_minisrv/ServiceVault/wtv-setup/validate-add-user-done.js index 62bf5571..671ae6ec 100644 --- a/zefie_wtvp_minisrv/ServiceVault/wtv-setup/validate-add-user-done.js +++ b/zefie_wtvp_minisrv/ServiceVault/wtv-setup/validate-add-user-done.js @@ -16,9 +16,17 @@ if (!errpage) { } if (!errpage) { + var wtvr = new WTVRegister(minisrv_config, SessionStore); + if (session_data.getNumberOfUserAccounts() > minisrv_config.config.user_accounts.max_users_per_account) errpage = wtvshared.doErrorPage(400, "You are not authorized to add more than " + minisrv_config.config.user_accounts.max_users_per_account + ` account${minisrv_config.config.user_accounts.max_users_per_account > 1 ? 's' : ''}.`); + if (!request_headers.query.user_name) errpage = wtvshared.doErrorPage(400, "Please enter a username."); + else if (request_headers.query.user_name.length < minisrv_config.config.user_accounts.min_username_length) errpage = wtvshared.doErrorPage(400, "Please choose a username with <b>" + minisrv_config.config.user_accounts.min_username_length + "</b> or more characters."); + else if (request_headers.query.user_name.length > minisrv_config.config.user_accounts.max_username_length) errpage = wtvshared.doErrorPage(400, "Please choose a username with <b>" + minisrv_config.config.user_accounts.max_username_length + "</b> or less characters."); + else if (!wtvr.checkUsernameSanity(request_headers.query.user_name)) errpage = wtvshared.doErrorPage(400, "The username you have chosen contains invalid characters. Please choose a username with only <b>letters</b>, <b>numbers</b>, <b>_</b> or <b>-</b>. Also, please be sure your username begins with a letter."); + else if (!wtvr.checkUsernameAvailable(request_headers.query.user_name)) errpage = wtvshared.doErrorPage(400, "The username you have selected is already in use. Please select another username."); } + if (errpage) { headers = errpage[0]; data = errpage[1]; diff --git a/zefie_wtvp_minisrv/ServiceVault/wtv-setup/validate-bg-song-category.js b/zefie_wtvp_minisrv/ServiceVault/wtv-setup/validate-bg-song-category.js index 79c2f9e1..d48c3017 100644 --- a/zefie_wtvp_minisrv/ServiceVault/wtv-setup/validate-bg-song-category.js +++ b/zefie_wtvp_minisrv/ServiceVault/wtv-setup/validate-bg-song-category.js @@ -1,5 +1,7 @@ var minisrv_service_file = true; +const wtvbgm = new WTVBGMusic(minisrv_config, session_data); + if (request_headers.query && session_data) { if (request_headers.request_url.indexOf('?') >= 0) { diff --git a/zefie_wtvp_minisrv/ServiceVault/wtv-tricks/cSetup.js b/zefie_wtvp_minisrv/ServiceVault/wtv-tricks/cSetup.js new file mode 100644 index 00000000..0f1a96cb --- /dev/null +++ b/zefie_wtvp_minisrv/ServiceVault/wtv-tricks/cSetup.js @@ -0,0 +1,211 @@ +var minisrv_service_file = true; + +if (request_headers.query.machine && request_headers.query.port) { + headers = `200 OK +Content-Type: text/html +Connection: close +wtv-connection-close: true +wtv-service: reset +wtv-service: name=wtv-1800 host=${request_headers.query.machine} port=${request_headers.query.port} flags=0x00000004 connections=1 +wtv-boot-url: wtv-1800:/preregister +` + data = `<html> +<head> +<title>Connect Setup v2.2-minisrv + + + +

Connecting...

+Please wait while we connect you to ${request_headers.query.machine}:${request_headers.query.port} ... + + + +`; + +} else { + + headers = `200 OK +Content-Type: text/html` + + data = ` + +Connect Setup v2.2-minisrv + + + + + + + + + +

+ +
+

+  Connection Setup v2.2-minisrv +

+

+
+
+ + + + +
+ + + +
+  Presets: + + +
+
+
+ + + + + + + +
+
+  Service: +
+
+
+ + + +  Custom:    + + Address: + +    Port: + +
+ + +
+ + + + +
+
+  Description:

+
+ + + + + + +
+   +   + +
+ +   + +   + + + +
+ + + +`; +} \ No newline at end of file diff --git a/zefie_wtvp_minisrv/ServiceVault/wtv-tricks/cSetup/Pattern_Games.gif b/zefie_wtvp_minisrv/ServiceVault/wtv-tricks/cSetup/Pattern_Games.gif new file mode 100644 index 00000000..07bffdd6 Binary files /dev/null and b/zefie_wtvp_minisrv/ServiceVault/wtv-tricks/cSetup/Pattern_Games.gif differ diff --git a/zefie_wtvp_minisrv/ServiceVault/wtv-tricks/cSetup/cSetupShadowLogo.gif b/zefie_wtvp_minisrv/ServiceVault/wtv-tricks/cSetup/cSetupShadowLogo.gif new file mode 100644 index 00000000..b70846da Binary files /dev/null and b/zefie_wtvp_minisrv/ServiceVault/wtv-tricks/cSetup/cSetupShadowLogo.gif differ diff --git a/zefie_wtvp_minisrv/ServiceVault/wtv-tricks/charmap.js b/zefie_wtvp_minisrv/ServiceVault/wtv-tricks/charmap.js new file mode 100644 index 00000000..8651a768 --- /dev/null +++ b/zefie_wtvp_minisrv/ServiceVault/wtv-tricks/charmap.js @@ -0,0 +1,49 @@ +var minisrv_service_file = true; + +var num_per_line = 4 +var legend_every = 6; + +function getLegend() { + d = "\n"; + for (var i = 0; i < num_per_line; i++) { + d += "Code\nChar\n"; + } + d += "\n"; + return d; +} + + +headers = `200 OK +Content-Type: text/html`; + +data = ` + + +WebTV Character Map + + + + +
+
+

WebTV Character Map

+
+`; + + +for (var i = 0; i <= 255; i++) { + if (i % num_per_line === 0) { + if (i % (num_per_line * legend_every) === 0) { + data += getLegend(); + } else { + data += "" + } + } + data += "
&#" + i + ";\n"; + data += "&#" + i + ";\n"; +} + +data += `
+ + +` \ No newline at end of file diff --git a/zefie_wtvp_minisrv/ServiceVault/wtv-tricks/images/Favorites_bg2.jpg b/zefie_wtvp_minisrv/ServiceVault/wtv-tricks/images/Favorites_bg2.jpg new file mode 100644 index 00000000..47a90b3f Binary files /dev/null and b/zefie_wtvp_minisrv/ServiceVault/wtv-tricks/images/Favorites_bg2.jpg differ diff --git a/zefie_wtvp_minisrv/SharedROMCache/minisrv.gif b/zefie_wtvp_minisrv/SharedROMCache/minisrv.gif new file mode 100644 index 00000000..275e5c84 Binary files /dev/null and b/zefie_wtvp_minisrv/SharedROMCache/minisrv.gif differ diff --git a/zefie_wtvp_minisrv/SharedROMCache/splash_minisrv.gif b/zefie_wtvp_minisrv/SharedROMCache/splash_minisrv.gif new file mode 100644 index 00000000..a1e58b2d Binary files /dev/null and b/zefie_wtvp_minisrv/SharedROMCache/splash_minisrv.gif differ diff --git a/zefie_wtvp_minisrv/UserTemplates/anything you put in here has priority.txt b/zefie_wtvp_minisrv/UserTemplates/anything you put in here has priority.txt new file mode 100644 index 00000000..e69de29b diff --git a/zefie_wtvp_minisrv/UserTemplates/wtv-guide/glossary.json b/zefie_wtvp_minisrv/UserTemplates/wtv-guide/glossary.json deleted file mode 100644 index 0824c1c1..00000000 --- a/zefie_wtvp_minisrv/UserTemplates/wtv-guide/glossary.json +++ /dev/null @@ -1,863 +0,0 @@ -{ - "A": { - "accessnumber": { - "word": "access number", - "definition": "The phone number your dials to connect to the WebTV service.The access number is displayed on your TV screen each time you turn yourterminal on. If you are unsure whether the connection to your access number is local or toll, contact your phone company." - }, - "accessrestriction": { - "word": "access restriction", - "definition": "A feature that lets parents limit what a young viewer can see on the Internet. WebTV provides two restrictive services for kids: Kidfriendly,recommended for children under age 11, and Surfwatch, recommended for older children. Access restrictions can only be set up on secondary accounts and are controlled by the Primary user." - }, - "address": { - "word": "address", - "definition": "Web page address

The Internet address of a Web page, also called a URL (Universal Resource Locator).

E-mail address

The address of an Internet user's e-mail account. An e-mail address includes a user name, as well as the domain that sponsors the address. To send someone e-mail, you need to know their e-mail address." - }, - "addressbook": { - "word": "Address book", - "definition": "The Address book is feature that allows you to store e-mail addresses. Your Address book can hold up to 140 different e-mail addresses." - }, - "altkey": { - "word": "alt key", - "definition": "The Alt key, when pressed simultaneously with other specific keys, creates various symbols. For example, the Alt key can be used to insert accent marks when writing in a foreign language." - }, - "americaonline": { - "word": "America Online", - "definition": "An Online Service Provider for personal computer users. WebTV subscriberscannot connect to any portion of America Online's service, as it is notcompatible with WebTV. You can, however, send e-mailto AOL subscribers, as well as chat with them in non-AOL chat rooms." - }, - "analog": { - "word": "analog", - "definition": "A process by which information is transmitted from one location to another. Most phone communication is conducted over an analog connection. Yourterminal is compatible with analog lines only." - }, - "artemisresearch": { - "word": "Artemis Research", - "definition": "The name of the original research group that developed WebTV Networks." - }, - "attachments": { - "word": "attachments", - "definition": "Files or documents that are sent with e-mail messages. To read an attachment, the e-mail program you are using must support the program in which the attachment was created. WebTV's e-mail system supports someattachments but not others. At this time, attachments created with Microsoft's Word and Excel do not work with WebTV." - }, - "audibledialing": { - "word": "audible dialing", - "definition": "A feature that allows you to listen to your dial in and connect to WebTV.

To activate audible dialing, follow these steps:

  1. Choose Settings from Web Home.
  2. Choose Dialing.
  3. Choose Advanced.
  4. Put a check in the box next to Audible dialing.
  5. Choose Done.
" - }, - "audiocontrolpanel": { - "word": "audio control panel", - "definition": "An on-screen panel that allows you to control audio files. To make the audio panel appear, simply press the Options button while listening to an audio file." - }, - "autoretrieval": { - "word": "auto retrieval", - "definition": "A feature that automatically downloads new television listings to your during the night.

To manually activate the Auto retrieval feature, Choose Settings from TV Home, choose Listings setup from the next page, then follow the on-screen instructions.", - "plusonly": true - - }, - "autoselect": { - "word": "auto select", - "definition": "The Auto select feature improves your channel surfing by filtering out all unviewable TV channels. When you use the Auto select feature, only the TV channels that come in clearly are viewable.

To activate Auto select:

  1. Choose Settings from your TV Home page
  2. Choose Channels
  3. Choose Auto Select
  4. After the Auto Select is complete, choose Done
" - } - }, - "B": { - "backbutton": { - "word": "Back button", - "definition": "A button on your remote control that returns you to the last Web page you visited." - }, - "baud": { - "word": "baud", - "definition": "Measurement describing the amount of information a modem sends or receives per second." - }, - "bulletinboards": { - "word": "bulletin boards (BBs)", - "definition": "Please see newsgroup." - }, - "beta": { - "word": "beta", - "definition": "Testing stage that software goes through before it is released to the general public. During Beta testing, testers attempt to identify all bugs in the software." - }, - "bitmap": { - "word": "bitmap", - "definition": "A type of image file on the Internet. Bitmaps are complex rows and columns of bits, or dots, that connect to form a larger, graphical image." - }, - "blindcarboncopy": { - "word": "blind carbon copy (BCC)", - "definition": "A feature that allows computer users to send e-mail to someone without that person's e-mail address appearing on the message.If you have ever received e-mail that does not contain your e-mail address, you may have been blind carbon copied. does not allow users to send messages using Blind carbon copy." - }, - "bookmark": { - "word": "bookmark", - "definition": "(Verb) To save the Internet address (URL) of a Web page so it can be easily accessed later.

(Noun) On , bookmarks are referred to as Favorites." - }, - "bounce": { - "word": "bounce", - "definition": "Any time an e-mail message cannot reach its intended destination,it is returned, or bounced, to the original sender. An e-mail messagecan be bounced for any of the following reasons:

  • The sender typed the e-mail address incorrectly
  • The e-mail address no longer exists
  • The recipient's mail box is full
  • There may be server problems.
" - }, - "bps": { - "word": "BPS (Bits Per Second)", - "definition": "The amount of information traveling within an area of space in any given second." - }, - "browser": { - "word": "browser", - "definition": "A program used to access Web pages on the World Wide Web.Your comes equipped with its own browser that is specifically designed to view Web pages on a television screen." - }, - "bug": { - "word": "bug", - "definition": "An error in the software or hardware that causes a program to perform abnormally." - }, - "byte": { - "word": "byte", - "definition": "A measure of computer memory. One thousand bytes is equal to one kilobyte and one million bytes is equal to one megabyte." - } - }, - "C": { - "cablemodem": { - "word": "cable modem", - "definition": "A modem that transmits data over television cable lines.A standard analog modem transmits data over telephone lines.Cable modems process data much faster than analog modems.At this time, the majority of cable providers do not providecable modem Internet access." - }, - "cache": { - "word": "cache", - "definition": "A type of memory used to temporarily store Web pages.Cached Web pages load more quickly because they are stored locally in your terminal.

If your cache memory fills up, you may experience slower Web surfing,or receive an error message that says, This page is too big to beshown completely. To clear your cache memory, simply power off your terminaland turn it on again." - }, - "callwaiting": { - "word": "call waiting", - "definition": "A service provided by your phone company that lets you receive incomingphone calls while your phone line is in use.If you subscribe to a call waiting service, follow these steps:

  1. Log on as the Primary user.
  2. Choose Settings from ,
  3. Choose Dialing.
  4. Choose Call waiting.
  5. Choose the box next to Accept calls.
  6. Choose Done.
" - }, - "carboncopy": { - "word": "carbon copy (cc)", - "definition": "A feature that allows you to send an e-mail message to both a primaryrecipient and multiple secondary recipients at the same time." - }, - "casesensitive": { - "word": "case sensitive", - "definition": "When letters typed in uppercase are read differently thanletters typed in lowercase.

For example, your e-mail address is notcase sensitive. If your e-mail address is yourname@webtv.net,someone can send a message to YoUrNaMe@webtv.net, and it will stillget to you.

Your password is case sensitive. For example, if yourpassword is Surfwatch, you must type it in exactly that way." - }, - "cd-rom": { - "word": "CD-ROM", - "definition": "(Compact Disc-Read-Only Memory)

A small disc capable of storing large amounts of information." - }, - "chat": { - "word": "chat", - "definition": "A forum on the Internet where people communicate by exchanging typedmessages in real time.`; supports both HTML chat and real time IRC (Internet Relay Chat).At this time, we do not support Java-based chat." - }, - "client": { - "word": "client", - "definition": "A program or device that relies on a larger computer, or server,to perform the majority of its functions. Your can be thoughtof as a client, and so can some of the programs that run within it (e.g. 's e-mail system)." - }, - "commandkey": { - "word": "Command key", - "definition": "The Command key (Cmd), when pressed simultaneously withspecific keys on the keyboard, activates a number of features.For example, pressing Cmd and the < b>R keyat the same time reloads the page you're viewing." - }, - "cookies": { - "word": "cookies", - "definition": "Cookies are electronic packets of information that a Web page givesout to visiting Internet users. Cookies have many uses, the mostcommon of which lets Web pages offer custom information to its visitors.For example, while viewing a specific Web page, you may be askedto provide your name and a few comments about your personal interests.The next time you visit that page, you may be presented with a welcomemessage that includes your name and content specific to your personal interests." - }, - "crossoverlink": { - "word": "Crossover link", - "definition": "A hyperlink in the form of a small circled i thatsometimes appears on your screen during a television program.If selected, a crossover link will take you to a Web pagerelated to the TV program you are viewing.", - "plusonly": true - }, - "cross-post": { - "word": "cross-post", - "definition": "To submit a single post to several different newsgroups. To cross-posta message, simply add the newsgroup names to the post you have written,separating each name with a comma. Posts should only be cross-posted ifthey are relevant to all receiving newsgroups. Doing otherwise isconsidered bad netiquette." - }, - "cursor": { - "word": "cursor", - "definition": "A blinking symbol on the screen that indicates where typed letters and words will go or appear.

The cursor can be moved from one text-entry field to another by using the Tab key." - }, - "cutcopyandpaste": { - "word": "Cut, Copy, and Paste", - "definition": "A feature that lets you copy text from one place, such as a Web page, and pasteit somewhere else, such as in an e-mail message you're writing." - } - }, - "D": { - "deletekey": { - "word": "Delete key", - "definition": "Removes text from a text field. Pressing the Delete key removes text one character at a time, while pressing the Cmd key and the Delete key at the same time deletes an entire line of text." - }, - "dialingoptions": { - "word": "Dialing options", - "definition": "The place to make adjustments to your dialing settings. From the Dialing Options page, you can choose a dialing prefix, set up your terminal to work with a call waiting service,and activate audible dialing. Only the primary user can access and modify Dialing options.

To access Dialing options:

  1. Choose Settings from .
  2. Choose Dialing.
" - }, - "discuss": { - "word": "Discuss", - "definition": "WebTV's newsgroup section, which contains a list of featured newsgroups,a moderated newsgroup especially for WebTV users, and a search featureto help you find groups on specific discussion topics.To access Discuss:
  1. Choose Community from
  2. Choose Discuss.
" - }, - "discussiongroup": { - "word": "discussion group", - "definition": "Please see newsgroup." - }, - "dishplayer": { - "word": "DISHPlayer", - "definition": "The DISHPlayer is a satellite receiver that has the ability to access the WebTV service." - }, - "domainname": { - "word": "domain name", - "definition": "The part of a URL or e-mail address that indicates where a Web page or mail box resides.For example, the webtv.net portion of the URL http://www.webtv.netlets you know that this URL belongs to the WebTV domain. The same applies tothe webtv.net part of your e-mail address." - }, - "download": { - "word": "download", - "definition": "To move information from a host computer or server to a personal computer or device. For example, when an upgrade is available for, our host computers move the upgrade information toyour .

We maintain all of the information that is downloaded to your terminal. Therefore, it is not possible for you to download programs on your own." - }, - "dpi": { - "word": "dpi", - "definition": "The number of \"dots per inch\" in an image or Web page. Regardless of the dpi of a particular image, your terminal's maximum printing capability with most printers is 72 dpi .Because of this, the items you print may not appear exactly as they do on your television screen. If you're using an HP printer that has Smart Focus technology, however, yourmaximum printing capability is increased to 144 dpi." - } - }, - "E": { - "editkey": { - "word": "Edit key", - "definition": "Modifies what you have written in a text entry field. After highlighting a text entry field, pressing the Edit key onyour keyboard allows you to move the cursor within that text field." - }, - "e-mail": { - "word": "e-mail", - "definition": "Short for electronic mail, e-mail is a message sent from one Internet user to another. To send e-mail to another Internet user,you need that user's e-mail address. Likewise, someone will need your e-mail address to send e-mail to you." - }, - "e-mailaddress": { - "word": "e-mail address", - "definition": "The address of an Internet user's e-mail account. An e-mail address includes a user name, as well as a domain name, which is thename of the company, organization that sponsors the address.

For example, in the e-mail address yourname@webtv.net,yourname is the user name, while webtv.net is the domain name." - }, - "emoticons": { - "word": "emoticons", - "definition": "Combinations of letters and symbols used to convey emotion in an e-mail message or newsgroup post.

The following are a few of the more popular emoticons (Rotate your head to the left to view them properly):

:-) Joking

;-) Winking

:-( Sad" - }, - "encryption": { - "word": "encryption", - "definition": "A coding method used to help protect information on the Internet.Encrypted information is translated into a secret code, sentover the Internet, then translated back to its original form when it reaches its destination. supports a very high level of encryption." - }, - "extras": { - "word": "Extras", - "definition": "Mail features that are available only when activated in Settings. The following features are Extras:

  • Reply to All
  • Attach
  • CC (Carbon Copy)" - } - }, - "F": { - "faq": { - "word": "FAQ", - "definition": "(Frequently Asked Questions)

    A list of questions and answers relating to a particular topic." - }, - "favorite": { - "word": "Favorite", - "definition": "A Web page you save in order to return to it easily at a later time. Saving Web pages as Favorites allows you to keep track of the pages you visit most often and allows you to access them quickly. Each user can save a total of 640 Favorites." - }, - "favoritesfolders": { - "word": "Favorites folders", - "definition": "A feature that allows you to organizes the Web pages you save as Favorites.You can name your Favorite folders anything you'd like, and can store yourFavorites accordingly. For example, you might store your favorite sports-related Web page in a folder named Sports. Each user can create up to 20 Favorites folders." - }, - "file": { - "word": "File", - "definition": "A collection of information that is stored in one location. Files are used by computers and other devices to easily transfer large amounts of information. One example of a file is a document created with Microsoft Word." - }, - "fileformats": { - "word": "File formats", - "definition": "The particular method by which information is put into a file.Every file is created using a particular computer program. The following is a complete listing of the file formats supported by :

    • AIFF AU SND WAV
    • GIF GSM JPEG
    • Macromedia Flash 1.0
    • MIDI + Karaoke
    • MOD MPEG Video
    • MPEG-2, 3 Audio
    • QuickTime Audio RealAudio 1.0, 2.0, 3.0
    • Shockwave Audio" - }, - "findkey": { - "word": "Find key", - "definition": "A key on your keyboard that lets you look for specific words or phrases on a Web page. For example, if you wanted to find the word astronaut on NASA's Web page, you could use the Find keyto quickly locate that word. You can use the Find key on your keyboard, or press the Options button on your remote and choose find from the on-screen panel that appears." - }, - "flame": { - "word": "Flame", - "definition": "Term used to describe a malicious e-mail message or newsgroup post, often sent without provocation." - }, - "forward": { - "word": "forward", - "definition": "To send an e-mail message you've received to someone else." - }, - "frames": { - "word": "frames", - "definition": "An HTML feature that divides your screen into a set of smaller windows. Frames are often used on the Internet to keep a table of contents or a directory on the screen at all times." - }, - "freeware": { - "word": "freeware", - "definition": "Copyrighted computer software that can be obtained free of charge when using a computer." - }, - "ftp": { - "word": "FTP", - "definition": "A method by which files are transferred over the Internet from one Internet device to another. In order to FTP a file, you need to use an FTP program." - }, - "fuck": { - "word": "fuck", - "definition": "A word used by zefie frequently when developing minisrv." - } - }, - "G": { - "gif": { - "word": "GIF", - "definition": "A file format used to make pictures and images on the World Wide Web." - }, - "goto": { - "word": "Go To", - "definition": "You can use the Go To feature to go directly to a Web page. If you know the Internet address (URL) of a Web page, press Go To on your keyboard, or press Options on your remote and choose go to from the on-screen Options panel. Type in the URL, then choose Go to Page." - } - }, - "H": { - "hangupoption": { - "word": "Hang up option", - "definition": "An advanced option that allows you to temporarily disconnect your terminal from the service. When you're ready to connect again, select Reconnect. You'll be taken to the page you were viewing prior to hanging up. The Hang up feature does not power off your it simply disconnects it, freeing up your phone line." - }, - "harddrive": { - "word": "hard drive", - "definition": "A storage device used to store files, software, and/or programs." - }, - "hardware": { - "word": "hardware", - "definition": "Any physical object used in the computer/technology environment. Your , remote, and/or keyboard are examples of hardware." - }, - "header": { - "word": "header", - "definition": "The \"travel information\" for a particular e-mail message. Headers indicate who sent the e-mail message, to whom the message is being sent, and the time it was sent." - }, - "hoaxes": { - "word": "hoaxes", - "definition": "Messages purposefully crafted to fool or trick other Internet users. Hoaxes can be sent by e-mail and posted in newsgroups. One popular hoax attempts to fool people into thinking they have just downloaded a virus.If you encounter a hoax message such as this, it is best to simply ignore it." - }, - "homepage": { - "word": "Home page", - "definition": "The first Web page you are taken to when you connect to the Internet.To get to at any time, press the Home button on your remote or keyboard." - }, - "hotlink": { - "word": "hot link", - "definition": "Words or symbols on a Web page that, when selected, take you to a new location on the Internet. Hot links can take you to a different spot on the page you are viewing, or to a new page altogether. Hot links are typically a different color or design than the rest of the text on a given page. On , any word or image that you can highlight with the yellow box is a hot link." - }, - "html": { - "word": "HTML", - "definition": "The computer programming language used to make all Web pages. users can use HTML to add graphics and sound to their e-mail, as well as produce their own Web sites." - }, - "http": { - "word": "http", - "definition": "(Hypertext Transfer Protocol)

      The format by which Web pages are transferred back and forth on the Internet.You'll notice that the Internet address, or URL, of every Web page you view begins with http://" - }, - "hyperlink": { - "word": "hyperlink", - "definition": "Words or symbols on a Web page that, when selected, take you to a new location on the Internet. Hyperlinks can take you to a different spot on the page you are viewing , or to a new page altogether. Hyperlinks are typically a different color or design than the rest of the text on a given page. On , any word or image you can highlight with the yellowbox is a hyperlink." - } - }, - "I": { - "icon": { - "word": "icon", - "definition": "A selectable symbol or small picture on a Web page that, when selected,takes you to a different location on the Internet." - }, - "icq": { - "word": "ICQ", - "definition": "(I Seek You)

      A program that informs Internet users when a specified person is online.ICQ can also be used to send real time messages. At this time, does not support ICQ." - }, - "imagemap": { - "word": "image map", - "definition": "An image on a Web page that, when selected, takes you to a different location on the Internet. A single image map usually contains several hyperlinks. When you highlight and select an image map, a small yellow arrow will appear, allowing you to select a specific hyperlink within the image map." - }, - "infobutton": { - "word": "Info button", - "definition": "Used to find the Internet address (URL) of a Web page. Selecting the Info buttonwhile viewing a Web page will indicate the URL of that Web page. The Info button can be found on both the keyboard and the on-screen Options panel." - }, - "instantmessenger": { - "word": "Instant Messenger", - "definition": "A program that lets Internet users send messages to each other in real time." - }, - "internet": { - "word": "Internet", - "definition": "A large network of computers that enables people to communicate and exchange information across the globe. Also referred to as \"the Net.\"" - }, - "internetaddress": { - "word": "Internet address", - "definition": "Web pages are identified by their Internet addresses, or URLs. An Internet address is to a Web page what a street address is to a residence. If you know the Internet address of a Web page you can access it directly by using the Go to feature. To find the URL of a Web page while viewing it, press the Info key on your keyboard, or press Options on your remote and then choose info from the on-screen Options panel." - }, - "internetexplorer": { - "word": "Internet Explorer", - "definition": "An Internet browser created by Microsoft Corporation for computer users to surf the World Wide Web." - }, - "internettraffic": { - "word": "Internet traffic", - "definition": "The result of too many people connecting to the Internet at the same time. Just as automobile traffic may delay your commute to work, Internet traffic may slow down your Internet connection." - }, - "irblaster": { - "word": "IR blaster", - "definition": "A device that lets you control your VCR, satellite receiver, or cable box with the WebTV remote control and keyboard. IR stands for Infra-red." - }, - "irc": { - "word": "IRC", - "definition": "A program that allows Internet users to participate in live chat conversations." - }, - "irkeyboard": { - "word": "IR keyboard", - "definition": "A wireless keyboard you can use to control your . IR stands for Infra-red." - }, - "isp": { - "word": "ISP", - "definition": "A company that provides Internet access." - } - }, - "J": { - "jarhead": { - "word": "JarHead (aka JarHead4)", - "definition": "One of the developers of the WebTV minisrv project. JarHead has done a lot of work to create a service that recreates the experience of the original production WebTV Service.See also: zefie" - }, - "java": { - "word": "Java", - "definition": "A multipurpose computer language developed by Sun Microsystems Inc.Among other applications, Java is used to create animated graphics for Web pages. does not currently support Java." - }, - "javascript": { - "word": "Javascript", - "definition": "A scripting language that adds functionality to Web pages. For example,Javascript is used to create drop down menus on many Web pages.Javascript is often confused with Java, but the two languages are not related. supports Javascript." - }, - "jpeg": { - "word": "JPEG", - "definition": "A format used to create images and pictures on the World Wide Web. supports JPEGs." - } - }, - "K": { - "keywordsearch": { - "word": "keyword search", - "definition": "Some databases and Web sites can be searched by keyword. With a keyword search, you can search for information on a general topic by inputting a single word, like "pork."" - }, - "kid-friendly": { - "word": "Kid-Friendly", - "definition": "Software that reduces the chance of children accessing adult material on the Internet. Kid-Friendly provides content that is both educational and appropriate for children under the age of eleven. Once set up, thisservice helps to filter out inappropriate material on the Internet and allowsonly pre-approved content to be viewed. The option to set up Kid-Friendly accounts is provided to customers free of charge." - }, - "kilobyte": { - "word": "kilobyte", - "definition": "A measure of computer memory. One kilobyte is equal to one thousand bytes." - } - }, - "L": { - "link": { - "word": "link", - "definition": "Words or symbols on a Web page that, when selected, take you to a new location on the Internet. Links (also called hyperlinks) can take you to a different spot on the page you are viewing, or to a new page altogether. Links are typically a different color or design than the rest of the text on a given page. On , any word or image you can highlight with the yellow box is a link." - }, - "load": { - "word": "load", - "definition": "To move information from a host-computer or server to a personal computer or device. For example, when a service update is available, (the server) loads the update information to your . Because maintains all of the information that is loaded to your terminal, it is not possible for you to download programs on your own." - }, - "login": { - "word": "login", - "definition": "The act of connecting to a remote system or network. Every time you connect to , you are \"logging in.\"" - }, - "logon": { - "word": "logon", - "definition": "See login" - }, - "lurk": { - "word": "lurk", - "definition": "The act of reading posts in a newsgroup (Discuss) without responding. Newsgroup lurking is a perfectly normal Internet activity." - } - }, - "M": { - "macromediaflash": { - "word": "Macromedia Flash", - "definition": "A file format used to add animation to Web pages." - }, - "mailinglist": { - "word": "mailing list", - "definition": "A list of e-mail addresses compiled for wide-scale distribution. In general, people sign up for mailing lists in order to receive up-to-date information on a particular subject." - }, - "mattman69": { - "word": "MattMan69", - "definition": "A user who was notorious for hacking the service. MattMan69 created a Web site to expose all of the service secrets.

      To this day, MattMan69's Web site, found at
      http://turdinc.kicks-ass.net/Msntv/index2.html, is still one of the largest and most comprehensive archives of
      service history." - }, - "megabytes": { - "word": "megabytes", - "definition": "A measure of computer memory. One megabyte is equal to one million bytes or one thousand kilobytes." - }, - "messagelight": { - "word": "Message light", - "definition": "A small red light on the front of your that illuminates when a user has new e-mail. The message light is activated when you connect to the service and new e-mail is available. It canalso be activated by setting up the Message watch feature." - }, - "messagewatch": { - "word": "Message watch", - "definition": "A feature that lets you program your to automatically check for new e-mail, even while the terminal is off.

      To change the time Message watch checks for messages:

      1. Choose Settings from
      2. Choose Mail.
      3. Choose Message light.
      4. Follow the on-screen directions.
      " - }, - "mime": { - "word": "MIME", - "definition": "MIME protocol makes it possible to transfer non-text information, such as images, audio, and video, over the Internet. 's e-mail system is MIME compliant, so it can send and receive e-mail messages that are MIME encapsulated." - }, - "minisrv": { - "word": "minisrv", - "definition": "An open-source product written in nodejs designed to replicate the propritary comminucations between a WebTV client and the server. minisrv is the server software that provides the user experience. This page was sent to you via minisrv!" - }, - "modem": { - "word": "modem", - "definition": "A device or program that enables two computers or Internet devices to communicate over a telephone line." - }, - "moderatednewsgroup": { - "word": "moderated newsgroup", - "definition": "A newsgroup that lists only pre-approved posts. Because every post is reviewed by a moderator, moderated newsgroups are typically more organized and civilized than un-moderated newsgroups." - }, - "moderator": { - "word": "moderator", - "definition": "A person or program that reviews newsgroup submissions before they are posted. The job of a moderator is to keep newsgroup conversations focused and non-inflammatory." - }, - "mosaic": { - "word": "Mosaic", - "definition": "The first Internet browser used to navigate the World Wide Web.The Mosaic browser was developed at the National Center for Supercomputing Applications (NCSA) at the University of Illinois." - }, - "mouse": { - "word": "mouse", - "definition": "The mating device utilized by personal computer users." - }, - "mpeg": { - "word": "MPEG", - "definition": "A file format used to make animated video clips. supports MPEG video files, which are widely available on the Internet." - }, - "mud": { - "word": "MUD", - "definition": "A multi-player text-based game that is played on the Internet. The concept of MUD was developed in 1980 in the tradition of Dungeons and Dragons and other role-playing games. does not support MUDs." - } - }, - "N": { - "navigate": { - "word": "navigate", - "definition": "To move from one location to another on the Internet." - }, - "net": { - "word": "Net", - "definition": "Short for Internet." - }, - "netiquette": { - "word": "netiquette", - "definition": "Short for Internet etiquette, netiquette is a set of unwritten rules or guidelines that Internet users follow when posting to a newsgroup or using a chat room. For example, it is considered bad netiquette to type in all capital letters when posting to a newsgroup. This is equivalent to SHOUTING!" - }, - "netscapenavigator": { - "word": "Netscape Navigator", - "definition": "An Internet browser created by Netscape Communications Corporation for computer users to surf the World Wide Web." - }, - "newbie": { - "word": "newbie", - "definition": "A slang term used to describe someone new to the Internet." - }, - "newsgroup": { - "word": "newsgroup", - "definition": "A forum where Internet users gather to exchange ideas on a broad range of topics. So the conversation is easy to follow, newsgroup messages, or posts, are organized categorically by threads." - }, - "noob": { - "word": "noob", - "definition": "Please see newbie" - } - }, - "O": { - "on-screenkeyboard": { - "word": "On-screen keyboard", - "definition": "The on-screen keyboard lets you type letters and words using the hand-held remote control. To activate the on-screen keyboard, select a text entry field and then press the center button on your remote." - }, - "optionspanel": { - "word": "Options panel", - "definition": "An on-screen panel that appears after you press the OPTIONS button on your remote or keyboard." - } - }, - "P": { - "pagebuilder": { - "word": "Page Builder", - "definition": "Page Builder is a tool that helps you create your own Web pages and publish them on the World Wide Web." - }, - "pap": { - "word": "PAP", - "definition": "(Password Authentication Protocol)

      A protocol used to authenticate passwords. PAP is like a two-way handshaking procedure that validates a password every time you log on." - }, - "parallelport": { - "word": "parallel port", - "definition": "A port on a personal computer or Internet device used to connect external devices. WebTV Plus receivers and DISHPlayers have a built-in parallel port that can be used to connect a compatible printer." - }, - "pip": { - "word": "PIP", - "definition": "(Picture-in-Picture)

      Also known as the TV Window. A feature that lets you watch television while surfing the Web. To activate PIP, select TV windowfrom the Options panel, or press the Cmd key and the W key on your keyboard at the same time.", - "plusonly": true - }, - "pop": { - "word": "POP", - "definition": "(Point Of Presence)

      A phone number used to connect a computer or Internet device to the Internet." - }, - "post": { - "word": "post", - "definition": "(verb) To submit a message to a newsgroup.

      (noun) A message that can be read on a newsgroup." - }, - "ppp": { - "word": "PPP", - "definition": "(Point to Point Protocol)

      Communication protocol used over standard phone lines to support Internet connectivity. PPP allows computers to communicate with each other." - }, - "primaryuser": { - "word": "Primary user", - "definition": "Subscriber who originally registered for the service. The Primary user is responsible for payment of the service and for the actions of all secondary users.Additionally, only the Primary user can add or remove users,adjust dialing options, and set up access restrictions, such as SurfWatch and Kid Friendly." - }, - "printeradapter": { - "word": "printer adapter", - "definition": "A device needed to connect a printer to a WebTV Classic Internet terminal. You can find printer adapters in most stores that carry WebTV terminals. The WebTV Plus receiver comes with a built-in printer adapter." - }, - "printercable": { - "word": "printer cable", - "definition": "A cable that is used to connect a printer to a computer or Internet device.You must use an IEEE-1284 compliant bi-directional cable to print with yourterminal." - }, - "privateroom": { - "word": "private room", - "definition": "A chat room not listed on a chat service's list of public rooms. Private rooms are only available in IRC and are temporary.Once all participants have left a private room, the room no longer exists." - }, - "programinformation": { - "word": "program information", - "definition": "Information that is related to the television program you are viewing.Program information gives you:

      • A brief description of a television program
      • The amount of time remaining in the program
      • The rating of the television program (if available)
      • Closed captioning information
      ", - "plusonly": true - }, - "protocol": { - "word": "protocol", - "definition": "A standard format computers use to communicate.One popular protocol is http, the underlying format of the World Wide Web." - } - }, - "Q": { - "quicktime": { - "word": "Quicktime", - "definition": "A file format used to produce sound and video clips on the Internet. currently supports the audio portion of Quicktime files, butdoes not support Quicktime video." - } - }, - "R": { - "ram": { - "word": "RAM", - "definition": "A type of temporary computer memory. RAM is used to temporarily store the Web content you access during an Internet session. This type of memory makes content you recently viewed more quickly accessible." - }, - "realaudio": { - "word": "Real Audio", - "definition": "Software developed by Progressive Networks Inc. used to transmit, receive, and play audio on the Internet." - }, - "recent": { - "word": "Recent", - "definition": "The Recent feature allows you to see a list of the Web pages that you've just visited. To see this list, press Recent on yourkeyboard or remote." - }, - "reload": { - "word": "Reload", - "definition": "The Reload feature allows you to view the most recent version of a Web page. This is useful for Web pages that are updated frequently, such as sports and weather pages, and newsgroups.

      To reload a page, press Options on your remote or keyboard, then choose Reload from the on-screen Options panel." - }, - "reply": { - "word": "reply", - "definition": "To respond to a person who has sent you an e-mail message." - }, - "replyall": { - "word": "reply all", - "definition": "To respond to all of the original recipients of an e-mail message you have received. Reply all can only be used when an e-mail message contains multiple recipients and you've activated the Extras feature in the Settings section of Mail." - }, - "rfadapter": { - "word": "RF adapter", - "definition": "Used to connect devices, such as video game consoles and Internet set-top boxes, to TV sets that are not equipped with cable and/or audio-video jacks.

      RF stands for Radio Frequency." - }, - "rom": { - "word": "ROM", - "definition": "A type of computer memory that cannot be changed by an end user. If you disconnect from , the ROM memory will not be affected." - } - }, - "S": { - "save": { - "word": "Save", - "definition": "To store something in order to be able to access it later. You might save a Web page in a Favorites folder, an e-mail message in Storage, or an e-mail address in the Address book." - }, - "screensaver": { - "word": "screen saver", - "definition": "A program that prevents damage to a TV screen or PC monitor by maintaining the constant movement of images. If a stationary image remains on a screen for an extended period of time, the image may burn into the screen. The screen saver is activated when you stop using your terminal, but do not turn it off." - }, - "scrollbuttons": { - "word": "Scroll buttons", - "definition": "To move up and down on a Web page. Both the keyboard and the remote haveScroll up and Scroll down buttons." - }, - "search": { - "word": "Search", - "definition": "A service used to locate information on the Internet. To search for information, select Search from and type what you're looking for. The more descriptive words you use in a search, the better." - }, - "searchengine": { - "word": "search engine", - "definition": "A program used to find specific information on the Internet. Excite, Yahoo, and Alta Vista are all examples of popular search engines. features Infoseek as its Internet search engine." - }, - "send": { - "word": "Send", - "definition": "A feature that lets you send an e-mail message or a URL to another Internet user while you are surfing the Internet. The Send feature can also be used to forward newsgroup posts." - }, - "server": { - "word": "server", - "definition": "A computer on the Internet that is used to store information, such as your e-mail and Favorites. Each time you turn your on, you are connected to a server. That server then connects to other servers to access information." - }, - "serviceprovider": { - "word": "service provider", - "definition": "A company that provides Internet access." - }, - "shockwave": { - "word": "Shockwave", - "definition": "A program used to create animations and sounds on the Internet. does not support the video segments of Shockwave, but does support Shockwave audio." - }, - "shortcuts": { - "word": "shortcuts", - "definition": "Programmable keys (F1-F7) on the IR keyboard that, when set up, allow you to access Favorites with one keystroke." - }, - "site": { - "word": "site", - "definition": "A set of Web pages that together represent one specific location on the World Wide Web. A Web site is like a book, and the Web pages within it are like pages in a book. Web sites typically have a main page, where the idea, story, or purpose of the site is clearly defined." - }, - "smartcards": { - "word": "Smart cards", - "definition": "Smart cards are a new technology still in development. Your includes a smart card slot in anticipation of their widespread use. In the future, smart cards will be used to store information, including financial data for banking and other online transactions." - }, - "spam": { - "word": "spam", - "definition": "An unsolicited e-mail message or newsgroup post, often advertising a useless product or service. It is a violation of 's Terms of Service to send spam." - }, - "ssl": { - "word": "SSL", - "definition": "A security protocol on the Internet. SSL encrypts data in order to help protectthe transmission of confidential information over the Internet.We support this standard, allowing you to conduct online banking, shopping and trading. To be sure that you are making an SSL-backed transaction, you can select the Info button on the keyboard while on a Web page. If the page is encrypted, an icon on the bottom left of the screen will appeargiving you the option to view the page's security details." - }, - "storage": { - "word": "Storage", - "definition": "A feature that lets you save and sort e-mail. The Storage feature includes:

      • e-mail you have saved
      • e-mail you have discarded (during the past week)
      • e-mail you have sent (during the past week).
      " - }, - "streaming": { - "word": "streaming", - "definition": "A method used to send information over the Internet. The first part of streaming information arrives in a usable form before the last part is fully loaded. Audio files, for example, are commonly put into a streaming format. You can begin to play a streaming audio file before the last part of the file has fully loaded." - }, - "surf": { - "word": "surf", - "definition": "To navigate from one point to another on the World Wide Web." - }, - "surfwatch": { - "word": "SurfWatch", - "definition": "Software that reduces the likelihood of children accessing adult material on the Internet. SurfWatch blocks access to sites that it has identified as containing adult material. SurfWatch has also compiled a list of words which, when used in searches, may find inappropriate Web content. SurfWatch prevents these words from being used.

      SurfWatch can be set up by the Primary user (subscriber) for any secondary userbut cannot be set up on the Primary user's account." - }, - "s-video": { - "word": "S-video", - "definition": "A technology used to transmit video signals from one device to another. S-video technology produces a high quality image and is more commonly found on newer televisions." - } - }, - "T": { - "telnet": { - "word": "Telnet", - "definition": "A protocol used to access information on a remote computer. does not support Telnet connections." - }, - "termsofservice": { - "word": "Terms of Service", - "definition": "A legal contract between WebTV and each individual subscriber. All subscribers are required to follow the guidelines mandated within WebTV's Terms of service (TOS). Violations of the TOS can result in the suspension and possible cancellation of your account." - }, - "textentryfield": { - "word": "text entry field", - "definition": "A blank field or box on a Web page where text can be typed." - }, - "threads": { - "word": "threads", - "definition": "A connected group of posts in a newsgroup that share the same subject title. Each thread in a newsgroup represents a different topic of conversation." - }, - "timestamp": { - "word": "time stamp", - "definition": "The listed time on an e-mail message that indicates when it was sent." - }, - "transloader": { - "word": "Transloader", - "definition": "A Web site that allows you to capture images from other Web pages and savethem in your Scrapbook. You can then add these images to Web pages youcreate with Page Builder." - }, - "troll": { - "word": "troll", - "definition": "Someone who attempts to disrupt the fluidity of newsgroup conversationby posting irrelevant and sometimes hostile messages.If you encounter a troll, it is best to not respond publicly to their messages." - }, - "tvhome": { - "word": "TV Home", - "definition": "Your home base for watching TV, browsing television listings,and setting up your TV for use with your .", - "plusonly": true - }, - "tvlistings": { - "word": "TV Listings", - "definition": "A 24-hour schedule of television programming accessible from the TV Home page. TV Listings are available even if your terminal is offline, or not connected to .", - "plusonly": true - }, - "tvwindow": { - "word": "TV Window", - "definition": "Also known as Picture-in-Picture or PIP. A feature that lets you watch television while surfing the Web. To activate the TV window, select PIPfrom the Options panel, or press the Cmd key and the W key on your keyboard at the same time.", - "plusonly": true - } - }, - "U": { - "update": { - "word": "update", - "definition": "Please see upgrade" - }, - "upgrade": { - "word": "upgrade", - "definition": "The addition or enhancement of a new feature to a service. provides periodic upgrades to your service." - }, - "upload": { - "word": "upload", - "definition": "To transfer information from a personal computer or device to a host computer or server." - }, - "url": { - "word": "URL", - "definition": "Web pages are identified by their URLs, or Internet addresses. An Internet address is to a Web page what a street address is to a residence. If you know the Internet address of a Web page you can access it directly by using the Go To feature.

      To find the URL of a Web page, select the Info key on your keyboard, or press Options and then Info on your remote, while viewing a particular Web page." - }, - "usenet": { - "word": "Usenet", - "definition": "A large system of newsgroups that can be accessed through the Internet." - }, - "user": { - "word": "user", - "definition": "Any account set up on your . Each terminal can have a total of six users; one Primary user and up to five secondary users. Only the Primary user can add secondary users." - }, - "useyourisp": { - "word": "Use Your ISP", - "definition": "A feature that allows users to connect to using an ISP (Internet Service Provider) of their choosing. Use Your ISP is beneficial to those who have Internet access through another ISP, and for those who live in an area without a local access number." - } - }, - "V": { - "vidcap": { - "word": "Vidcap", - "definition": "Video capture, or vidcap, lets you connect a VCR, video camera, or digital camerato your terminal and capture a picture. You can send vidcaps in e-mail messages or keep them in your scrapbook in Page Builder.", - "plusonly": true - }, - "videoflash": { - "word": "VideoFlash", - "definition": "A technology developed by WebTV Networks that produces full-screen, full-motion video. In contrast to conventional Internet video technology, VideoFlash provides a level of video quality comparable to standard TV and is capable of providing significantly faster download times." - }, - "viewbutton": { - "word": "view button", - "definition": "Button on the remote control and keyboard used to switch between Web Homeand the TV Home page." - }, - "virus": { - "word": "virus", - "definition": "A program or code that interferes with the normal functioning of a personal computer. Your is immune to viruses." - }, - "vrml": { - "word": "VRML", - "definition": "A computer programming language used to create three-dimensional graphics on the World Wide Web. does not support VRML." - } - }, - "W": { - "web": { - "word": "Web", - "definition": "An enormous network of computers that can read and exchange information created by a single programming language, known as HTML. HTML is a simple and flexible programming language that is used to display text, audio, images, and animations. The World Wide Web is often referred to as the Internet. However, the World Wide Web is a subset of the Internet, not the Internet itself.Internet users navigate the World Wide Web using Web browsers." - }, - "webaddress": { - "word": "Web address", - "definition": "Please see Internet address" - }, - "webbrowser": { - "word": "Web browser", - "definition": "Please see browser" - }, - "webmaster": { - "word": "Webmaster", - "definition": "A person who is responsible for maintaining a Web site." - }, - "webpage": { - "word": "Web page", - "definition": "An HTML formatted document that resides on the World Wide Web.Web pages generally combine text and pictures, but can also contain animation and video. Each Web page on the World Wide Webis identified by a unique Internet address, or URL." - }, - "website": { - "word": "Web site", - "definition": "A set of Web pages that together represent one specific location on the World Wide Web. A Web site is like a book, and the Web pages within it are like pages in a book. Web sites typically have a main page, where the idea, story, or purpose of the site is clearly defined." - }, - "webtvclassic": { - "word": "WebTV Classic", - "definition": "WebTV's original Internet set-top box. The WebTV Classic Internet terminal, manufactured by Sony and Phillips Magnavox, is an easy and affordable way to access the Internet." - }, - "webtvplus": { - "word": "WebTV Plus", - "definition": "An Internet set-top box that connects to the WebTV Plus service.The WebTV Plus receiver, manufactured by Sony, Phillips Magnavox, Samsung, RCA, and Mitsubishi, is WebTV's second product offering." - }, - "whispering": { - "word": "whispering", - "definition": "A feature in Chat that lets you send a private message to another person in a chat room. Only you and the specified recipient will see the whispered message." - }, - "windows": { - "word": "Windows", - "definition": "A computer operating system developed by Microsoft Corporation." - }, - "worldwideweb": { - "word": "World Wide Web", - "definition": "An enormous network of computers that can read and exchange information created by a single programming language, known as HTML.HTML is a simple and flexible programming language that is usedto display text, audio, images, and animations. The World Wide Webis often referred to as the Internet. However, the World Wide Web is a subset of the Internet, not the Internet itself. Internet users navigate the World Wide Web using Web browsers." - } - }, - "Z": { - "zefie": { - "word": "zefie", - "definition": "Primary developer of the WebTV minisrv project. zefie is responsible for creating the project, as well maintaining the open-source project on GitHub.See also: JarHead" - } - } -} \ No newline at end of file diff --git a/zefie_wtvp_minisrv/app.js b/zefie_wtvp_minisrv/app.js index b433e4e1..55e35fb3 100644 --- a/zefie_wtvp_minisrv/app.js +++ b/zefie_wtvp_minisrv/app.js @@ -22,6 +22,7 @@ const WTVClientSessionData = require(classPath + "/WTVClientSessionData.js"); const WTVMime = require(classPath + "/WTVMime.js"); const WTVFlashrom = require(classPath + "/WTVFlashrom.js"); const vm = require('vm'); +const debug = require('debug')('minisrv_main'); const express = require('express'); var wtvnewsserver = null; @@ -77,6 +78,44 @@ function verifyServicePort(service_name, socket) { return false; } +function configureService(service_name, service_obj, initial = false) { + if (service_obj.disabled) return false; + + service_obj.name = service_name; + if (!service_obj.host) { + service_obj.host = service_ip; + } + if (service_obj.port && !service_obj.nobind && initial) { + if (service_obj.pc_services) pc_ports.push(service_obj.port); + else ports.push(service_obj.port); + } + + // minisrv_config service toString + service_obj.toString = function (overrides) { + var self = Object.assign({}, this); + if (overrides != null) { + if (typeof (overrides) == 'object') { + Object.keys(overrides).forEach(function (k) { + if (k != "exceptions") self[k] = overrides[k]; + }); + } + } + if ((service_name == "wtv-star" && self.no_star_word != true) || service_name != "wtv-star") { + var outstr = "wtv-service: name=" + self.name + " host=" + self.host + " port=" + self.port; + if (self.flags) outstr += " flags=" + self.flags; + if (self.connections) outstr += " connections=" + self.connections; + } + if (service_name == "wtv-star") { + outstr += "\nwtv-service: name=wtv-* host=" + self.host + " port=" + self.port; + if (self.flags) outstr += " flags=" + self.flags; + if (self.connections) outstr += " connections=" + self.connections; + } + return outstr; + } + minisrv_config.services[service_name] = service_obj; + return true; +} + // Where we store our session information var ssid_sessions = new Array(); var socket_sessions = new Array(); @@ -84,7 +123,6 @@ var socket_sessions = new Array(); var ports = []; var pc_ports = []; - // add .reverse() feature to all JavaScript Strings in this application // works for service vault scripts too. if (!String.prototype.reverse) { @@ -144,12 +182,26 @@ async function sendRawFile(socket, path) { }); } -var runScriptInVM = function (script_data, user_contextObj = {}, privileged = false, filename = null) { +var runScriptInVM = function (script_data, user_contextObj = {}, privileged = false, filename = null, debug_name = null) { // Here we define the ServiceVault Script Context Object // The ServiceVault scripts will only be allowed to access the following fcnutions/variables. // Furthermore, only modifications to variables in `updateFromVM` will be saved. // Example: an attempt to change "minisrv_config" from a ServiceVault script would be discarded + // try to build a name for the script's debug() calls + if (!debug_name) { + // try to make the debug name + var debug_name = (filename) ? filename.split(path.sep) : null; + if (debug_name) { + if (wtvshared.isConfiguredService(debug_name[debug_name.length - 2])) + // service:/filename + debug_name = debug_name[debug_name.length - 2] + ":/" + debug_name[debug_name.length - 1]; + else + // filename + debug_name = debug_name[debug_name.length - 1]; + } + } + // create global context object var contextObj = { // node core variables and functions @@ -172,6 +224,7 @@ var runScriptInVM = function (script_data, user_contextObj = {}, privileged = fa "path": path, // Our variables and functions + "debug": require('debug')((debug_name) ? debug_name : 'service_script'), "minisrv_config": minisrv_config, "socket": null, "headers": null, @@ -254,12 +307,7 @@ var runScriptInVM = function (script_data, user_contextObj = {}, privileged = fa } // unload any loaded modules for this vm - if (modules_loaded.length > 0) { - Object.keys(modules_loaded).forEach(function (k) { - wtvshared.unloadModule(modules_loaded[k]); - }) - } - + modules_loaded = null; return contextObj; // updated context object with whatever global varibles the script set } @@ -294,7 +342,7 @@ async function processPath(socket, service_vault_file_path, request_headers = ne ] if (!pc_services) { - updateFromVM.push([`ssid_sessions[${socket.ssid}]`, "session_data"]); // user-specific session data from unprivileged scripts + updateFromVM.push([`ssid_sessions['${socket.ssid}']`, "session_data"]); // user-specific session data from unprivileged scripts } var privileged = false; @@ -471,7 +519,7 @@ async function processPath(socket, service_vault_file_path, request_headers = ne try { if (typeof vmResults[item[1]] !== "undefined") eval(item[0] + ' = vmResults["' + item[1] + '"]'); } catch (e) { - + console.error("vm readback error", e, item[0] + ' = vmResults[' + item[1] + ']'); } }) @@ -506,14 +554,16 @@ async function processPath(socket, service_vault_file_path, request_headers = ne request_headers.service_file_path = catchall_file; var script_data = fs.readFileSync(catchall_file).toString(); - runScriptInVM(script_data, contextObj, privileged, catchall_file); + var vmResults = runScriptInVM(script_data, contextObj, privileged, catchall_file); - // Here we read back certain data from the ServiceVault Script Context Object - try { - if (typeof vmResults[item[1]] !== "undefined") eval(item[0] + ' = vmResults["' + item[1] + '"]'); - } catch (e) { - - } + updateFromVM.forEach((item) => { + // Here we read back certain data from the ServiceVault Script Context Object + try { + if (typeof vmResults[item[1]] !== "undefined") eval(item[0] + ' = vmResults["' + item[1] + '"]'); + } catch (e) { + console.error("vm readback error", e); + } + }); if (request_is_async && !minisrv_config.config.debug_flags.quiet) console.log(" * Script requested Asynchronous mode"); break; @@ -763,18 +813,33 @@ minisrv-no-mail-count: true`; processPath(socket, urlToPath, request_headers, service_name, shared_romcache, pc_services); } else if ((shortURL.indexOf('http://') >= 0 || shortURL.indexOf('https://') >= 0) && !pc_services) { doHTTPProxy(socket, request_headers); + } else if (shortURL.indexOf('file://') >= 0) { + shortURL = shortURL.replace("file://",'').replace("romcache", "ROMCache"); + service_name = "wtv-star"; + var urlToPath = wtvshared.fixPathSlashes(service_name + path.sep + shortURL); + processPath(socket, urlToPath, request_headers, service_name, shared_romcache, pc_services); } else if (pc_services) { // if a directory, request index if (shortURL.substring(shortURL.length - 1) == "/") shortURL += "index"; var urlToPath = wtvshared.fixPathSlashes(service_name + path.sep + shortURL); processPath(socket, urlToPath, request_headers, service_name, shared_romcache, pc_services); } else { - // error reading headers (no request_url provided) - var errpage = wtvshared.doErrorPage(400); - headers = errpage[0]; - data = errpage[1] - socket_sessions[socket.id].close_me = true; - sendToClient(socket, headers, data); + debug('request_headers', request_headers); + if (request_headers.request.indexOf("HTTP/1.0") > 0) { + // webtv in HTTP/1.0 mode, try to kick it back to WTVP + var errpage = wtvshared.doErrorPage(500, null, null, false, true); + headers = errpage[0]; + data = '' + socket_sessions[socket.id].close_me = true; + sendToClient(socket, headers, data); + } else { + // error reading headers (no request_url provided) + var errpage = wtvshared.doErrorPage(400, null, null, false, true); + headers = errpage[0]; + data = '' + socket_sessions[socket.id].close_me = true; + sendToClient(socket, headers, data); + } } } } @@ -1803,7 +1868,18 @@ function getGitRevision() { var minisrv_config = null; function reloadConfig() { + var temp = { "version": minisrv_config.version } + if (minisrv_config.config.git_commit) temp.git_commit = minisrv_config.config.git_commit; + minisrv_config = wtvshared.readMiniSrvConfig(true, false, true); // snatches minisrv_config + minisrv_config.version = temp.version + if (temp.git_commit) minisrv_config.config.git_commit = temp.git_commit; + if (minisrv_config.config.service_logo.indexOf(':') == -1) minisrv_config.config.service_logo = "wtv-star:/ROMCache/" + minisrv_config.config.service_logo; + if (minisrv_config.config.service_splash_logo.indexOf(':') == -1) minisrv_config.config.service_splash_logo = "wtv-star:/ROMCache/" + minisrv_config.config.service_splash_logo; + Object.keys(minisrv_config.services).forEach((k) => { + configureService(k, minisrv_config.services[k]) + }); + return minisrv_config; } @@ -1845,73 +1921,41 @@ if (minisrv_config.config.SessionStore) { if (minisrv_config.config.ServiceDeps) { var ServiceDeps = wtvshared.returnAbsolutePath(minisrv_config.config.ServiceDeps); - console.log(" * Configured Service Dependancies at", ServiceDeps); + console.log(" * Configured Service Dependencies at", ServiceDeps); } else { - throw ("ERROR: No Service Dependancies Directory (SessionDeps) defined!"); + throw ("ERROR: No Service Dependencies Directory (SessionDeps) defined!"); } var service_ip = minisrv_config.config.service_ip; Object.keys(minisrv_config.services).forEach(function (k) { - if (minisrv_config.services[k].disabled) return; + if (configureService(k, minisrv_config.services[k], true)) { + console.log(" * Configured Service:", k, "on Port", minisrv_config.services[k].port, "- Service Host:", minisrv_config.services[k].host, "- Bind Port:", !minisrv_config.services[k].nobind, "- PC Services Mode:", (minisrv_config.services[k].pc_services) ? true : false); - minisrv_config.services[k].name = k; - if (!minisrv_config.services[k].host) { - minisrv_config.services[k].host = service_ip; - } - if (minisrv_config.services[k].port && !minisrv_config.services[k].nobind) { - if (minisrv_config.services[k].pc_services) pc_ports.push(minisrv_config.services[k].port); - else ports.push(minisrv_config.services[k].port); - } - - // minisrv_config service toString - minisrv_config.services[k].toString = function (overrides) { - var self = Object.assign({}, this); - if (overrides != null) { - if (typeof (overrides) == 'object') { - Object.keys(overrides).forEach(function (k) { - if (k != "exceptions") self[k] = overrides[k]; - }); - } - } - if ((k == "wtv-star" && self.no_star_word != true) || k != "wtv-star") { - var outstr = "wtv-service: name=" + self.name + " host=" + self.host + " port=" + self.port; - if (self.flags) outstr += " flags=" + self.flags; - if (self.connections) outstr += " connections=" + self.connections; - } - if (k == "wtv-star") { - outstr += "\nwtv-service: name=wtv-* host=" + self.host + " port=" + self.port; - if (self.flags) outstr += " flags=" + self.flags; - if (self.connections) outstr += " connections=" + self.connections; - } - return outstr; - } - - console.log(" * Configured Service:", k, "on Port", minisrv_config.services[k].port, "- Service Host:", minisrv_config.services[k].host, "- Bind Port:", !minisrv_config.services[k].nobind, "- PC Services Mode:", (minisrv_config.services[k].pc_services) ? true : false); - - if (minisrv_config.services[k].local_nntp_port) { - if (!wtvnewsserver) { - const WTVNewsServer = require(classPath + "/WTVNewsServer.js"); - var local_nntp_using_auth = false; - if (minisrv_config.services[k].local_nntp_requires_auth) { - local_nntp_using_auth = true; - if (minisrv_config.services[k].local_auth) { - // auth required, and info defined in config - wtvnewsserver = new WTVNewsServer(minisrv_config, minisrv_config.services[k].local_nntp_port, true, minisrv_config.services[k].local_auth.username, minisrv_config.services[k].local_auth.password); - console.log(" * Configured Service: Local NNTP", "on 127.0.0.1:" + minisrv_config.services[k].local_nntp_port, "(TLS) - Auth required:", local_nntp_using_auth, "- Auth: As Configured"); + if (minisrv_config.services[k].local_nntp_port) { + if (!wtvnewsserver) { + const WTVNewsServer = require(classPath + "/WTVNewsServer.js"); + var local_nntp_using_auth = false; + if (minisrv_config.services[k].local_nntp_requires_auth) { + local_nntp_using_auth = true; + if (minisrv_config.services[k].local_auth) { + // auth required, and info defined in config + wtvnewsserver = new WTVNewsServer(minisrv_config, minisrv_config.services[k].local_nntp_port, true, minisrv_config.services[k].local_auth.username, minisrv_config.services[k].local_auth.password); + console.log(" * Configured Service: Local NNTP", "on 127.0.0.1:" + minisrv_config.services[k].local_nntp_port, "(TLS) - Auth required:", local_nntp_using_auth, "- Auth: As Configured"); + } else { + // auth required, but randomly generated + wtvnewsserver = new WTVNewsServer(minisrv_config, minisrv_config.services[k].local_nntp_port, true); + console.log(" * Configured Service: Local NNTP", "on 127.0.0.1:" + minisrv_config.services[k].local_nntp_port, "(TLS) - Auth required:", local_nntp_using_auth, "- Auth (randgen): User:", wtvnewsserver.username, "Pass:", wtvnewsserver.password); + } } else { - // auth required, but randomly generated - wtvnewsserver = new WTVNewsServer(minisrv_config, minisrv_config.services[k].local_nntp_port, true); - console.log(" * Configured Service: Local NNTP", "on 127.0.0.1:" + minisrv_config.services[k].local_nntp_port, "(TLS) - Auth required:", local_nntp_using_auth, "- Auth (randgen): User:", wtvnewsserver.username, "Pass:", wtvnewsserver.password); + // no auth required on local server + wtvnewsserver = new WTVNewsServer(minisrv_config, minisrv_config.services[k].local_nntp_port); + console.log(" * Configured Service: Local NNTP", "on 127.0.0.1:" + minisrv_config.services[k].local_nntp_port, "(TLS) - Auth required:", local_nntp_using_auth, "- Auth: None"); + } + if (minisrv_config.services[k].featuredGroups) { + Object.keys(minisrv_config.services[k].featuredGroups).forEach((j) => { + wtvnewsserver.createGroup(minisrv_config.services[k].featuredGroups[j].group, minisrv_config.services[k].featuredGroups[j].description || null); + }) } - } else { - // no auth required on local server - wtvnewsserver = new WTVNewsServer(minisrv_config, minisrv_config.services[k].local_nntp_port); - console.log(" * Configured Service: Local NNTP", "on 127.0.0.1:" + minisrv_config.services[k].local_nntp_port, "(TLS) - Auth required:", local_nntp_using_auth, "- Auth: None"); - } - if (minisrv_config.services[k].featuredGroups) { - Object.keys(minisrv_config.services[k].featuredGroups).forEach((j) => { - wtvnewsserver.createGroup(minisrv_config.services[k].featuredGroups[j].group, minisrv_config.services[k].featuredGroups[j].description || null); - }) } } } diff --git a/zefie_wtvp_minisrv/includes/WTVAdmin.js b/zefie_wtvp_minisrv/includes/WTVAdmin.js index a358467b..9d49d49a 100644 --- a/zefie_wtvp_minisrv/includes/WTVAdmin.js +++ b/zefie_wtvp_minisrv/includes/WTVAdmin.js @@ -72,7 +72,7 @@ class WTVAdmin { } } - isAuthorized() { + isAuthorized(justchecking = false) { var allowed_ssid = false; var allowed_ip = false; if (this.minisrv_config.services[this.service_name].authorized_ssids) { @@ -95,11 +95,15 @@ class WTVAdmin { } }); } - return (allowed_ssid && allowed_ip) ? true : this.rejectConnection(!allowed_ssid); + if (justchecking) { + return (allowed_ssid && allowed_ip) ? true : false; + } else { + return (allowed_ssid && allowed_ip) ? true : this.rejectConnection(!allowed_ssid); + } } getAccountInfo(username, directory = null) { - var search_dir = this.minisrv_config.config.SessionStore; + var search_dir = this.minisrv_config.config.SessionStore + this.path.sep + "accounts"; var account_data = null; var self = this; if (directory) search_dir = directory; @@ -114,7 +118,7 @@ class WTVAdmin { var temp_session_data = JSON.parse(temp_session_data_file); if (temp_session_data.subscriber_username.toLowerCase() == username.toLowerCase()) { - account_data = [temp_session_data, (search_dir + self.path.sep + file).replace(this.minisrv_config.config.SessionStore + this.path.sep, "").split(this.path.sep)[0]]; + account_data = [temp_session_data, (search_dir + self.path.sep + file).replace(this.minisrv_config.config.SessionStore + this.path.sep + "accounts", "").split(this.path.sep)[1]]; } } catch (e) { console.error(" # Error parsing Session Data JSON", search_dir + self.path.sep + file, e); diff --git a/zefie_wtvp_minisrv/includes/WTVClientSessionData.js b/zefie_wtvp_minisrv/includes/WTVClientSessionData.js index 33687c8c..50103ffa 100644 --- a/zefie_wtvp_minisrv/includes/WTVClientSessionData.js +++ b/zefie_wtvp_minisrv/includes/WTVClientSessionData.js @@ -188,6 +188,10 @@ class WTVClientSessionData { ); } + getAccountStoreDirectory() { + return this.minisrv_config.config.SessionStore + this.path.sep + "accounts"; + } + /** * Returns the absolute path to the user's file store, or false if unregistered * @param subscriber {boolean} Returns the parent subscriber directory instead of the user's directory @@ -195,7 +199,7 @@ class WTVClientSessionData { */ getUserStoreDirectory(subscriber = false, user_id = null) { if (user_id == null) user_id = this.user_id; - var userstore = this.minisrv_config.config.SessionStore + this.path.sep + this.ssid + this.path.sep; + var userstore = this.getAccountStoreDirectory() + this.path.sep + this.ssid + this.path.sep; if (!subscriber) userstore += "user" + user_id + this.path.sep; return userstore; } @@ -539,7 +543,7 @@ class WTVClientSessionData { } unregisterBox() { - var user_store_base = this.wtvshared.makeSafePath(this.wtvshared.getAbsolutePath(this.minisrv_config.config.SessionStore), this.path.sep + this.ssid); + var user_store_base = this.wtvshared.makeSafePath(this.wtvshared.getAbsolutePath(this.getAccountStoreDirectory()), this.path.sep + this.ssid); try { if (this.fs.existsSync(user_store_base + ".json")) { this.fs.unlinkSync(user_store_base + ".json"); diff --git a/zefie_wtvp_minisrv/includes/WTVFavorites.js b/zefie_wtvp_minisrv/includes/WTVFavorites.js index 74e72f03..20b536fe 100644 --- a/zefie_wtvp_minisrv/includes/WTVFavorites.js +++ b/zefie_wtvp_minisrv/includes/WTVFavorites.js @@ -73,7 +73,15 @@ class WTVFavorites { var store_dir = this.favstore_dir + folder_dir; } return store_dir; - } + } + + + checkFolderName(foldername) { + var regex_str = "^([A-Za-z0-9\-\_]{1,}$"; + var regex = new RegExp(regex_str); + return regex.test(foldername); + } + createTemplateFolder(folder) { // create emply folder diff --git a/zefie_wtvp_minisrv/includes/WTVFlashrom.js b/zefie_wtvp_minisrv/includes/WTVFlashrom.js index 9fd1a10f..669eea57 100644 --- a/zefie_wtvp_minisrv/includes/WTVFlashrom.js +++ b/zefie_wtvp_minisrv/includes/WTVFlashrom.js @@ -1,7 +1,7 @@ class WTVFlashrom { fs = require('fs'); - https = require('https'); + https = require('follow-redirects').https; use_zefie_server = true; bf0app_update = false; service_vaults = new Array(); @@ -129,7 +129,7 @@ class WTVFlashrom { async getFlashromMeta(request_path, callback) { // read 512 bytes of rom, and send result of getFlashromInfo - // to callback (in data), without headers + // to callback (in data) this.getFlashRom(request_path, callback, 512); } @@ -164,13 +164,12 @@ class WTVFlashrom { }) res.on('end', function () { - if (self.minisrv_config.config.debug_flags.debug) console.log(` * Zefie's FlashROM Server HTTP Status: ${res.statusCode} ${res.statusMessage}`) + if (self.minisrv_config.config.debug_flags.debug) console.log(` * zefie's FlashROM Server HTTP Status: ${res.statusCode} ${res.statusMessage}`) if (res.statusCode == 200) { var data = Buffer.from(data_hex, 'hex'); } else if (res.statusCode == 206) { var data = self.getFlashromInfo(Buffer.from(data_hex, 'hex'), request_path); } else if (res.statusCode == 404) { - console.log(request_path); var errpage = self.wtvshared.doErrorPage(404, "The service could not find the requested ROM on zefie's server.") headers = errpage[0]; var data = errpage[1]; diff --git a/zefie_wtvp_minisrv/includes/WTVMail.js b/zefie_wtvp_minisrv/includes/WTVMail.js index 2b17fb40..faebcfe4 100644 --- a/zefie_wtvp_minisrv/includes/WTVMail.js +++ b/zefie_wtvp_minisrv/includes/WTVMail.js @@ -96,7 +96,7 @@ class WTVMail { } mailboxExists(mailboxid) { - if (mailboxid > this.mailboxes.length) return null; + if (mailboxid >= this.mailboxes.length) return null; var mailbox_dir = null; if (this.mailstoreExists()) { var mailbox_name = this.getMailboxById(mailboxid); @@ -182,7 +182,7 @@ class WTVMail { } try { if (this.fs.existsSync(message_file_out)) { - console.log(" * ERROR: Message with this UUID (" + messageid + ") already exists (should never happen). Message lost."); + console.error(" * ERROR: Message with this UUID (" + messageid + ") already exists (should never happen). Message lost."); return false; } @@ -389,7 +389,7 @@ class WTVMail { var temp_session_data_file = self.fs.readFileSync(search_dir + self.path.sep + file, 'Utf8'); var temp_session_data = JSON.parse(temp_session_data_file); if (temp_session_data.subscriber_username.toLowerCase() == username.toLowerCase()) { - return_val = search_dir.replace(this.minisrv_config.config.SessionStore + self.path.sep, '').replace("user", '').split(self.path.sep); + return_val = search_dir.replace(this.minisrv_config.config.SessionStore + self.path.sep + "accounts" + self.path.sep, '').replace("user", '').split(self.path.sep); return_val.push(temp_session_data.subscriber_name); } } catch (e) { @@ -437,7 +437,7 @@ class WTVMail { // check if the destination user's Inbox exists yet if (!dest_user_mailstore.mailboxExists(0)) { // mailbox does not yet exist, create it - var mailbox_exists = dest_user_mailstore.createMailbox(mailbox); + var mailbox_exists = dest_user_mailstore.createMailbox(0); // Just created Inbox for the first time, so create the welcome message if (mailbox_exists) dest_user_mailstore.createWelcomeMessage(); } diff --git a/zefie_wtvp_minisrv/includes/WTVNews.js b/zefie_wtvp_minisrv/includes/WTVNews.js index 1b43ef2b..ab6c7d7d 100644 --- a/zefie_wtvp_minisrv/includes/WTVNews.js +++ b/zefie_wtvp_minisrv/includes/WTVNews.js @@ -9,12 +9,14 @@ class WTVNews { username = null; password = null; posting_allowed = true; + debug = null; constructor(minisrv_config, service_name) { this.minisrv_config = minisrv_config; this.service_name = service_name; const { WTVShared } = require("./WTVShared.js"); this.wtvshared = new WTVShared(minisrv_config); + this.debug = require('debug')('WTVNews'); } initializeUsenet(host, port = 119, tls_options = null, username = null, password = null) { @@ -393,17 +395,20 @@ class WTVNews { var section = element.split("\n"); attachments[i] = {}; section.forEach((line) => { + this.debug('section_type', section_type, 'line', line); var section_header_match = line.match(/^Content\-/i) if (section_header_match) { var section_match = line.match(/^Content\-Type\: (.+)\;/i) if (section_match) { + this.debug('section_match', section_match) + section_type = section_match[1]; if (section_match[1].match("text/plain")) { - section_type = section_match[1].match("text/plain")[1]; message_type = section_type; } else { section_type = section_match[1]; attachments[i].content_type = section_match[1] } + this.debug('section_type', section_type) } section_match = line.match(/^Content\-Disposition\: (.+)\;/i) if (section_match) { @@ -476,6 +481,9 @@ class WTVNews { mainref = searchart.messageId; message_relations[mainref].push({ "messageId": messageId, "index": k }); found = true; + } else { + // no relation, missing reference, add as root + message_id_roots.push({ "messageId": messageId, "index": k }); } }); } @@ -508,7 +516,7 @@ class WTVNews { // sort relations by date var article = messages[message_relations[message_id_roots[k].messageId][j].index]; var article_date = Date.parse(article.headers.DATE); - relations.push({ "article": article, "relation": message_id_roots[k].messageId, "date": article_date }) + relations.push({ "article": article, "relation": message_id_roots[k].messageId || null, "date": article_date }) }); relations.sort((a, b) => { return (a.date - b.date) }); Object.keys(relations).forEach((j) => { diff --git a/zefie_wtvp_minisrv/includes/WTVRegister.js b/zefie_wtvp_minisrv/includes/WTVRegister.js index 9884f0d1..f447e283 100644 --- a/zefie_wtvp_minisrv/includes/WTVRegister.js +++ b/zefie_wtvp_minisrv/includes/WTVRegister.js @@ -9,7 +9,7 @@ class WTVRegister { constructor(minisrv_config, session_store_dir = null) { this.minisrv_config = minisrv_config; this.service_owner = minisrv_config.config.service_owner || "a minisrv user"; - if (session_store_dir) this.session_store_dir = session_store_dir + this.session_store_dir = session_store_dir || this.minisrv_config.config.SessionStore; } getServiceOperator(first_letter_lower = false) { @@ -29,28 +29,42 @@ class WTVRegister { checkUsernameAvailable(username, directory = null) { - // returns the user's ssid, and user_id and userid in an array if true, false if not - var search_dir = this.minisrv_config.config.SessionStore; - var return_val = false; var self = this; - if (directory) search_dir = directory; - this.fs.readdirSync(search_dir).forEach(file => { - if (self.fs.lstatSync(search_dir + self.path.sep + file).isDirectory() && !return_val) { - if (search_dir.match(/minisrv\_internal\_nntp/)) return; - return_val = !self.checkUsernameAvailable(username, search_dir + self.path.sep + file); - } - if (!file.match(/user.*\.json/ig)) return; - try { - var temp_session_data_file = self.fs.readFileSync(search_dir + self.path.sep + file, 'Utf8'); - var temp_session_data = JSON.parse(temp_session_data_file); - console.log(temp_session_data.subscriber_username.toLowerCase()); - if (temp_session_data.subscriber_username.toLowerCase() == username.toLowerCase()) { - return_val = true; + var return_val = false; + // returns the user's ssid, and user_id and userid in an array if true, false if not + + // check against reserved name list + if (this.minisrv_config.config.user_accounts.reserved_names) { + Object.keys(this.minisrv_config.config.user_accounts.reserved_names).forEach((k) => { + if (self.minisrv_config.config.user_accounts.reserved_names[k].toLowerCase() == username.toLowerCase()) return_val = true; + }) + } + + if (return_val) return !return_val; + + // check against user accounts + directory = (directory) ? directory : this.session_store_dir + this.path.sep + "accounts"; + + console.log(directory) + if (this.fs.existsSync(directory)) { + this.fs.readdirSync(directory).forEach(file => { + if (self.fs.lstatSync(directory + self.path.sep + file).isDirectory() && !return_val) { + return_val = !self.checkUsernameAvailable(username, directory + self.path.sep + file); } - } catch (e) { - console.error(" # Error parsing Session Data JSON", search_dir + self.path.sep + file, e); - } - }); + if (!file.match(/user.*\.json/ig)) return; + try { + var temp_session_data_file = self.fs.readFileSync(directory + self.path.sep + file, 'Utf8'); + var temp_session_data = JSON.parse(temp_session_data_file); + if (temp_session_data.subscriber_username) { + if (temp_session_data.subscriber_username.toLowerCase() == username.toLowerCase()) { + return_val = true; + } + } + } catch (e) { + console.error(" # Error parsing Session Data JSON", search_dir + self.path.sep + file, e); + } + }); + } return !return_val; } diff --git a/zefie_wtvp_minisrv/includes/WTVShared.js b/zefie_wtvp_minisrv/includes/WTVShared.js index 24f2f9cd..a4edae3a 100644 --- a/zefie_wtvp_minisrv/includes/WTVShared.js +++ b/zefie_wtvp_minisrv/includes/WTVShared.js @@ -14,13 +14,14 @@ class WTVShared { iconv = require('iconv-lite'); parentDirectory = process.cwd() extend = require('util')._extend; + debug = require('debug')('WTVShared') minisrv_config = []; constructor(minisrv_config, quiet = false) { if (minisrv_config == null) this.minisrv_config = this.readMiniSrvConfig(true, !quiet); else this.minisrv_config = minisrv_config; - + if (!String.prototype.reverse) { String.prototype.reverse = function () { var splitString = this.split(""); @@ -40,6 +41,18 @@ class WTVShared { } } + atob(a) { + const CryptoJS = require('crypto-js'); + const enc = CryptoJS.enc.Base64.parse(a); + return CryptoJS.enc.Utf8.stringify(enc) + } + + btoa(b) { + const CryptoJS = require('crypto-js'); + const enc = CryptoJS.enc.Utf8.parse(b); // encodedWord Array object + return CryptoJS.enc.Base64.stringify(enc); + } + cloneObj(src) { if (src instanceof RegExp) { return new RegExp(src); @@ -59,6 +72,87 @@ class WTVShared { return src; } + isAdmin(wtvclient, service_name = "wtv-admin") { + var WTVAdmin = require("./WTVAdmin.js"); + var wtva = new WTVAdmin(this.minisrv_config, wtvclient, service_name); + var result = wtva.isAuthorized(true); + wtva, WTVAdmin = null; + return result; + } + + parseJSON(json) { + if (!json) return null; + if (typeof json !== 'string') json = json.toString(); + + // from https://github.com/getify/JSON.minify/blob/javascript/minify.json.js + var tokenizer = /"|(\/\*)|(\*\/)|(\/\/)|\n|\r/g, + in_string = false, + in_multiline_comment = false, + in_singleline_comment = false, + tmp, tmp2, new_str = [], ns = 0, from = 0, lc, rc, + prevFrom + ; + + tokenizer.lastIndex = 0; + + while (tmp = tokenizer.exec(json)) { + lc = RegExp.leftContext; + rc = RegExp.rightContext; + if (!in_multiline_comment && !in_singleline_comment) { + tmp2 = lc.substring(from); + if (!in_string) { + tmp2 = tmp2.replace(/(\n|\r|\s)+/g, ""); + } + new_str[ns++] = tmp2; + } + prevFrom = from; + from = tokenizer.lastIndex; + + // found a " character, and we're not currently in + // a comment? check for previous `\` escaping immediately + // leftward adjacent to this match + if (tmp[0] == "\"" && !in_multiline_comment && !in_singleline_comment) { + // perform look-behind escaping match, but + // limit left-context matching to only go back + // to the position of the last token match + // + // see: https://github.com/getify/JSON.minify/issues/64 + tmp2 = lc.substring(prevFrom).match(/\\+$/); + + // start of string with ", or unescaped " character found to end string? + if (!in_string || !tmp2 || (tmp2[0].length % 2) == 0) { + in_string = !in_string; + } + from--; // include " character in next catch + rc = json.substring(from); + } + else if (tmp[0] == "/*" && !in_string && !in_multiline_comment && !in_singleline_comment) { + in_multiline_comment = true; + } + else if (tmp[0] == "*/" && !in_string && in_multiline_comment && !in_singleline_comment) { + in_multiline_comment = false; + } + else if (tmp[0] == "//" && !in_string && !in_multiline_comment && !in_singleline_comment) { + in_singleline_comment = true; + } + else if ((tmp[0] == "\n" || tmp[0] == "\r") && !in_string && !in_multiline_comment && in_singleline_comment) { + in_singleline_comment = false; + } + else if (!in_multiline_comment && !in_singleline_comment && !(/\n|\r|\s/.test(tmp[0]))) { + new_str[ns++] = tmp[0]; + } + } + new_str[ns++] = rc; + return JSON.parse(new_str.join("")); + } + + isConfiguredService(service) { + if (this.minisrv_config.services[service]) { + if (!this.minisrv_config.services[service].disabled) return true; + } + return false; + } + getServiceString(service, overrides = {}) { // used externally by service scripts if (service === "all") { @@ -74,10 +168,10 @@ class WTVShared { }); return out; } else { - if (!minisrv_config.services[service]) { + if (!this.minisrv_config.services[service]) { throw ("SERVICE ERROR: Attempted to provision unconfigured service: " + service) } else { - return minisrv_config.services[service].toString(overrides); + return this.minisrv_config.services[service].toString(overrides); } } } @@ -119,8 +213,17 @@ class WTVShared { } }); + var allowedProtocols = allowedSchemes; + // allow links to services flagged as "wideopen" + Object.keys(this.minisrv_config.services).forEach((k) => { + var flag = parseInt(this.minisrv_config.services[k].flags, 16); + if (flag === 4 || flag === 7) { + allowedProtocols.push(k); + } + }); + const clean = this.sanitizeHtml(string, { - allowedTags: ['a', 'audioscope', 'b', 'bgsound', 'big', 'blackface', 'blockquote', 'bq', 'br', 'caption', 'center', 'cite', 'c', 'dd', 'dfn', 'div', 'dl', 'dt', 'fn', 'font', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'html', 'i', 'img', 'label', 'li', 'link', 'listing', 'em', 'marquee', 'nobr', 'note', 'ol', 'p', 'plaintext', 'pre', 's', 'samp', 'small', 'span', 'strike', 'strong', 'style', 'sub', 'sup', 'tbody', 'table', 'td', 'th', 'tr', 'tt', 'u', 'ul'], + allowedTags: ['a', 'audioscope', 'b', 'bgsound', 'big', 'blackface', 'blockquote', 'bq', 'br', 'caption', 'center', 'cite', 'c', 'dd', 'dfn', 'div', 'dl', 'dt', 'fn', 'font', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'html', 'i', 'img', 'label', 'li', 'link', 'listing', 'em', 'marquee', 'nobr', 'note', 'ol', 'p', 'plaintext', 'pre', 's', 'samp', 'small', 'span', 'strike', 'strong', 'sub', 'sup', 'tbody', 'table', 'td', 'th', 'tr', 'tt', 'u', 'ul'], disallowedTagsMode: 'discard', allowedAttributes: { a: ['href', 'name', 'target'], @@ -132,11 +235,25 @@ class WTVShared { allowedSchemes: allowedSchemes, allowedSchemesByTag: {}, allowedSchemesAppliedToAttributes: ['href', 'src', 'cite'], - allowVulnerableTags: true, + exclusiveFilter: function (frame) { + var allowed = false; + Object.keys(frame.attribs).forEach((k) => { + if (k == "href" || k == "background" || k == "src") { + var value = frame.attribs[k]; + Object.keys(allowedProtocols).forEach((j) => { + if (value.startsWith(allowedProtocols[j])) { + allowed = true; + } + }) + } + }); + console.log(frame, allowed); + return !allowed; + }, + allowVulnerableTags: false, allowProtocolRelative: false - }) + }, true) // todo: add missing user open tags (eg if user did not close it) (might be done by sanitize-html?) - // todo: figure out bgcolor and text color voodoo return clean; } @@ -229,12 +346,12 @@ class WTVShared { getUserConfig() { try { var user_config_filename = this.getAbsolutePath("user_config.json", this.parentDirectory); + if (this.fs.lstatSync(user_config_filename)) { try { - var minisrv_user_config = JSON.parse(this.fs.readFileSync(user_config_filename)); + var minisrv_user_config = this.parseJSON(this.fs.readFileSync(user_config_filename)); } catch (e) { - console.error("ERROR: Could not read user_config.json", e); - var throw_me = true; + throw ("ERROR: Could not read user_config.json", e); } } else { var minisrv_user_config = {} @@ -281,7 +398,7 @@ class WTVShared { readMiniSrvConfig(user_config = true, notices = true, reload_notice = false) { if (notices || reload_notice) console.log(" *** Reading global configuration..."); try { - var minisrv_config = JSON.parse(this.fs.readFileSync(this.getAbsolutePath("config.json", __dirname))); + var minisrv_config = this.parseJSON(this.fs.readFileSync(this.getAbsolutePath("config.json", __dirname))); } catch (e) { throw ("ERROR: Could not read config.json", e); } @@ -677,7 +794,7 @@ class WTVShared { }); } - doErrorPage(code, data = null, details = null, pc_mode = false) { + doErrorPage(code, data = null, details = null, pc_mode = false, wtv_reset = false) { var headers = null; var minisrv_config = this.minisrv_config; switch (code) { @@ -713,7 +830,12 @@ class WTVShared { headers += "Content-Type: text/html\n"; break; } - console.error(" * doErrorPage Called:", code, data); + if (wtv_reset && !pc_mode) { + headers += "wtv-service: reset\n"; + headers += this.getServiceString('wtv-1800') + "\n"; + headers += "wtv-visit: wtv-1800:/preregister?scriptless-visit-reason=999\n"; + console.error(" * doErrorPage Called (sent wtv-reset):", code, data); + } else console.error(" * doErrorPage Called:", code, data); return new Array(headers, data); } @@ -765,6 +887,12 @@ class WTVShared { return ssid; } + makeSafeStringPath(path = "") { + path = path.replace(/[^\w]/g, "").replace(/\.\./g, ""); + if (path.length == 0) path = null; + return path; + } + unpackCompressedB64(data) { var data_buf = (typeof data === 'object') ? Buffer.from(data.toString('ascii'), 'base64') : Buffer.from(data, 'base64'); @@ -803,7 +931,7 @@ class clientShowAlert { noback = null; image = null; - constructor(image = null, message = null, buttonlabel1 = null, buttonaction1 = null, buttonlabel2 = null, buttonaction2 = null, noback = null) { + constructor(image = null, message = null, buttonlabel1 = null, buttonaction1 = null, buttonlabel2 = null, buttonaction2 = null, noback = null, sound = null) { this.message = message; this.buttonlabel1 = buttonlabel1; this.buttonlabel2 = buttonlabel2; @@ -811,6 +939,9 @@ class clientShowAlert { this.buttonaction2 = buttonaction2; this.message = message; this.noback = noback; + this.sound = sound; + if (this.sound === false) this.sound = "none"; + if (typeof image === 'object') { this.image = null; Object.keys(image).forEach(function (k) { @@ -829,6 +960,7 @@ class clientShowAlert { if (this.buttonlabel2) url += "buttonlabel2=" + escape(this.buttonlabel2) + "&"; if (this.buttonaction2) url += "buttonaction2=" + escape(this.buttonaction2) + "&"; if (this.image) url += "image=" + escape(this.image) + "&"; + if (this.sound) url += "sound=" + escape(this.sound) + "&"; if (this.noback) url += "noback=true&"; return url.substring(0, url.length - 1); } diff --git a/zefie_wtvp_minisrv/includes/config.json b/zefie_wtvp_minisrv/includes/config.json index 0c3a8049..de7ffc06 100644 --- a/zefie_wtvp_minisrv/includes/config.json +++ b/zefie_wtvp_minisrv/includes/config.json @@ -1,58 +1,74 @@ { + /* + STOP! STOP! STOP! + Do NOT edit this file. Instead make a file called "user_config.json" in the same folder as "app.js" + With that, you can override anything defined here. You can copy this config as a template, but should + only leave in things you are actually overriding, in case a future feature update changes any defaults. + */ "config": { - "service_ip": "127.0.0.1", - "bind_ip": "0.0.0.0", + "service_ip": "127.0.0.1", // IP sent to the box (public IP for public service, LAN IP for local testing) + "bind_ip": "0.0.0.0", // IP on your machine to bind to (0.0.0.0 = All Interfaces/IPs) "ServiceVaults": [ + /* Service Vaults: See ServiceVault.md for more info */ "UserServiceVault", "ServiceVault" ], "ServiceTemplates": [ + /* Service Templates: Works like ServiceVaults. See ServiceVault.md for more info */ "UserTemplates", "ServiceDeps/templates" ], - "ServiceDeps": "ServiceDeps", - "SessionStore": "SessionStore", - "SharedROMCache": "SharedROMCache", - "enable_shared_romcache": true, - "service_owner": "a minisrv user", - "service_owner_account": "minisrvuser", - "service_owner_contact": "someone", - "service_owner_contact_method": "something", - "service_name": "WebTV", - "service_logo": "WebTVLogoJewel.gif", - "service_splash_logo": "file://ROM/images/SplashLogo1.gif", - "hide_ssid_in_logs": true, - "filter_passwords_in_logs": true, - "post_percentages": [ 0, 25, 50, 100 ], - "verbosity": 2, - "socket_timeout": 86400, - "post_data_socket_timeout": 30, - "error_log_file": "errors.log", - "catchall_file_name": "catchall.js", - "hide_incomplete_features": true, - "enable_lzpf_compression": true, - "enable_gzip_compression": true, - "show_detailed_splash": true, - "show_diskmap": false, - "unauthorized_url": "wtv-1800:/unauthorized?", - "enable_port_isolation": true, - "allow_guests": true, - "domain_name": "wtv.zefie.com", - "ssid_block_list": [ - "minisrv_internal_nntp" - ], - "user_accounts": { - "max_users_per_account": 6, - "min_username_length": 5, - "max_username_length": 18 + "ServiceDeps": "ServiceDeps", // Where the Service Dependancies are. Best left unchanged. + "SessionStore": "SessionStore", // Where we store account (session) data. Best left unchanged. + "SharedROMCache": "SharedROMCache", // Shared ROMCache (wtv-service:/ROMCache/, where wtv-service is any configured service). Best left unchanged. + "enable_shared_romcache": true, // Disabling this will cause a lot of problems without manual intervention. Best left unchanged. + "service_owner": "a minisrv user", // Set this to your name or screenname + "service_owner_account": "minisrvuser", // Set this to your account name on your minisrv + "service_owner_contact": "someone", // Set this to your contact (eg email address, twitter handle, etc) + "service_owner_contact_method": "something", // Set this to the contact method (eg email, twitter, etc) + "service_name": "minisrv", // What you want your service to be called + "service_logo": "minisrv.gif", // The logo shown on most service pages and error alerts. Can be absolute path or the name of a file in the SharedROMCache. + "service_splash_logo": "splash_minisrv.gif", // The logo shown on the splash screen. Can be absolute path or the name of a file in the SharedROMCache. + "hide_ssid_in_logs": true, // Filter SSIDs with asterisks to prevent accidently leaking user SSIDs when debugging. + "filter_passwords_in_logs": true, // Filter passwords (form fields containing "pass") to prevent accidently leaking user passwords when debugging. + "post_percentages": [ 0, 25, 50, 100 ], // When recieving POST data from the client, we display the progress of the transfer in the console log if the verbosity is high enough. Here you can show more or less updates. + "verbosity": 2, // 0 thru 4, lowest is quietest, higher is more verbose. Best set to 4 if something is going wrong. + "socket_timeout": 86400, // How long after we last gotten a request from a client before we clean up its data. The client can always restore it with the ticket. + "post_data_socket_timeout": 30, // How long until we give up waiting for data from the client in a POST transfer. Too little and POSTs will fail when dialup retrains. Too much and the server may stall waiting. + "error_log_file": "errors.log", // Where to write errors to disk + "catchall_file_name": "catchall.js", // default catchall filename + "hide_incomplete_features": true, // this is barely used and being phase out. leave it unchanged. + "enable_lzpf_compression": true, // Toggle LZPF (old classic) compression. Best left unchanged. + "enable_gzip_compression": true, // Toggle GZIP (all other boxes) compression. Best left unchanged. + "show_detailed_splash": true, // Shows the service name, server version, and user connect speed on the splash page + "show_diskmap": false, // Useful for debugging custom Diskmaps + "unauthorized_url": "wtv-1800:/unauthorized?", // Where to send unauthorized users + "enable_port_isolation": true, // Only respond to services on their correct ports + "allow_guests": true, // Allow users to experience the server without registering + "domain_name": "wtv.zefie.com", // For usenet and future stuff, no need to change just yet + "user_accounts": { // user account settings + "max_users_per_account": 6, // Max total users (including primary) per account + "min_username_length": 5, // minimum username length + "max_username_length": 18, // maximum username length + "reserved_names": [ + // reserved account names, users (nor admins) can register these + "AccountDisabled", + "Demo", + "abuse", + "support", + "registration", + "null" + ] }, "passwords": { - "enabled": true, - "min_length": 5, - "max_length": 32, - "form_size": 16 + // password configuration + "enabled": true, // allow users to password protect their account + "min_length": 5, // minimum length of user passwords + "max_length": 32, // max length of user passwords + "form_size": 16 // width of the form on the password prompt screen }, "errorMessages": { + // define custom error messages here "400": "${service_name} ran into a technical problem. Please try again.", "401": "Authorization Required.", "403": "The publisher of that page has not authorized you to view it.", @@ -60,6 +76,7 @@ "500": "${service_name} ran into a technical problem. Please try again." }, "lockdownWhitelist": [ + // urls the client can access without being "logged in" "wtv-1800:/preregister", "wtv-head-waiter:/login", "wtv-head-waiter:/ValidateLogin", @@ -77,26 +94,33 @@ ] }, "services": { + // service definitions + "wtv-head-waiter": { + // wtv-head-waiter handles logins "port": 1601, "connections": 1 }, "wtv-tricks": { + // wtv-tricks "port": 1602, "flags": "0x00000004" }, "wtv-star": { + // wtv-star is used for custom logos and internally by WebTV clients for service outages "port": 1603, "flags": "0x00000007" }, "wtv-news": { + // Usenet "port": 1605, - "local_nntp_port": 57319, - "local_nntp_requires_auth": true, + "local_nntp_port": 57319, // Port for internal NNTP + "local_nntp_requires_auth": true, // Needs to be enabled for posting "modules": [ "WTVNews" ], "featuredGroups": [ + // groups featured on wtv-news:/lobby. These groups are automatically created if they do not exist. { "name": "WebTV", "group": "webtv.users", @@ -118,57 +142,68 @@ "description": "Explore the sounds of Beatnik with your WebTV" } ], - "groupMetaRefreshInterval": 86400 + "groupMetaRefreshInterval": 86400 // not yet used }, "wtv-register": { + // wtv-register "port": 1607, "privileged": true }, "wtv-log": { + // wtv-log "port": 1609, "connections": 1, - "write_logs_to_disk": false + "write_logs_to_disk": false // set this to true to save logs to the error_log_file set above }, "wtv-home": { + // wtv-home "port": 1612 }, "wtv-1800": { + // wtv-1800 "port": 1615, "connections": 1, "flags": "0x00000004", - "send_tellyscripts": false + "send_tellyscripts": true // Best left untouched }, "wtv-flashrom": { + // wtv-flashrom "port": 1618, "flags": "0x00000040", "debug": false, - "use_zefie_server": true, - "bf0app_default_rom": "content/artemis-webtv-000/build7377/internal-nondebug/bf0app-part000.rom", - "catchall_file_name": "content-serve.js" + "use_zefie_server": true, // access zefie's repository of flashroms, local roms will still be used if they exist. Best left unchanged. + "bf0app_default_rom": "content/artemis-webtv-000/build7377/internal-nondebug/bf0app-part000.rom", // Can change the default build for bf0app + "catchall_file_name": "content-serve.js" // catchall for ROM part files. Best left untouched }, "wtv-setup": { + // wtv-setup "port": 1613, "flags": "0x00000010", - "passport_service": "wtv-passport", + "passport_service": "wtv-passport", // for messenger "connections": 3, "privileged": true, "modules": [ - "WTVBGMusic" + "WTVBGMusic", + "WTVRegister" ] }, "wtv-music": { + // wtv-music "port": 1656, "connections": 3 }, "wtv-cookie": { + // wtv-cookie (used for http(s) cookies) "port": 1619, "connections": 1 }, "wtv-chat": { + // wtv-chat (used for IRC) "port": 1630, "connections": 3 }, "wtv-disk": { + // wtv-disk (used for DiskMaps) "port": 1635, "connections": 3, "modules": [ @@ -176,6 +211,7 @@ ] }, "wtv-guide": { + // wtv-guide (not yet complete) "port": 1621, "connections": 3, "modules": [ @@ -183,6 +219,7 @@ ] }, "wtv-mail": { + // wtv-mail "port": 1608, "connections": 3, "modules": [ @@ -190,9 +227,11 @@ ] }, "wtv-passport": { + // wtv-password (for messenger) "port": 1654 }, "wtv-favorite": { + // wtv-favorite "port": 1611, "connections": 3, "enable_multi_query": true, @@ -200,44 +239,49 @@ "max_favorites_per_folder": 18 }, "wtv-admin": { + // wtv-admin "port": 1698, "enable_multi_query": true, "privileged": true, - "password": "viRak-7" + "password": "viRak-7" // change to something more unique }, "http": { + // http upstream "port": 1650, "connections": 3, - "use_external_proxy": false, - "external_proxy_is_socks": false, - "external_proxy_host": "127.0.0.1", - "external_proxy_port": 1080, + "use_external_proxy": false, // use an external proxy (WebONE or some other minifying proxy is recommended) + "external_proxy_is_socks": false, // use a socks proxy + "external_proxy_host": "127.0.0.1", // IP address or hostname of proxy + "external_proxy_port": 1080, // Port of proxy "flags": "0x00000001" }, "https": { "port": 1650, "connections": 3, - "use_external_proxy": false, - "external_proxy_is_socks": false, - "external_proxy_host": "127.0.0.1", - "external_proxy_port": 1080, + "use_external_proxy": false, // use an external proxy (WebONE or some other minifying proxy is recommended) + "external_proxy_is_socks": false, // use a socks proxy + "external_proxy_host": "127.0.0.1", // IP address or hostname of proxy + "external_proxy_port": 1080, // Port of proxy "flags": "0x00000001" }, "pc_services": { + // PC Services "port": 1699, - "pc_services": true, - "hide_minisrv_version": true, - "disabled": true, - "servicevault_dir": "http_pc", - "drop_connection_on_wrong_port": false, - "show_verbose_errors": false, + "pc_services": true, // defines service as a PC service + "hide_minisrv_version": true, // hide or show the minisrv version (eg like Apache version, can be hidden to hide known exploits for older version) + "disabled": true, // disabled by default, set disabled: false in user_config.json for this service to enable. + "servicevault_dir": "http_pc", // The service vault dir for the PC Services + "drop_connection_on_wrong_port": false, // If true, resets connection if the PC browser connects to a port that is not PC Services enabled + "show_verbose_errors": false, // extra debugging "privileged": true, - "allow_https": false, - "force_https": false + "allow_https": false, // for future use with LetsEncrypt + "force_https": false // for future use with LetsEncrypt } }, "favorites": { "folder_templates": { + // define user default favorites here + // If image is a URL, it should be an absolute path, or a file under wtv-favorite:/ "Recommended": [ { "title": "DuckDuckGo", diff --git a/zefie_wtvp_minisrv/migrate_accounts.js b/zefie_wtvp_minisrv/migrate_accounts.js new file mode 100644 index 00000000..b1304403 --- /dev/null +++ b/zefie_wtvp_minisrv/migrate_accounts.js @@ -0,0 +1,27 @@ +var classPath = __dirname + "/includes/"; +const { WTVShared } = require(classPath + "WTVShared.js"); +const wtvshared = new WTVShared(); // creates minisrv_config +classPath = wtvshared.getAbsolutePath(classPath, __dirname); +const WTVClientSessionData = require(classPath + "/WTVClientSessionData.js"); +minisrv_config = wtvshared.getMiniSrvConfig(); + +const wtvcsd = new WTVClientSessionData(minisrv_config) + +const fs = require('fs') +const path = require('path') + + +var old_account_dir = minisrv_config.config.SessionStore; +var new_account_dir = wtvcsd.getAccountStoreDirectory(); +if (!fs.existsSync(new_account_dir)) fs.mkdirSync(new_account_dir); + +total = 0; + +fs.readdirSync(old_account_dir).forEach(file => { + if (file === "accounts" || file === "minisrv_internal_nntp" || file === "client registration and session data will populate here.txt") return; + fs.renameSync(old_account_dir + path.sep + file, new_account_dir + path.sep + file) + console.log(" * Migrated", old_account_dir + path.sep + file, "to", new_account_dir + path.sep + file); + total++; +}); + +console.log(" *", total, "accounts migrated."); \ No newline at end of file diff --git a/zefie_wtvp_minisrv/package-lock.json b/zefie_wtvp_minisrv/package-lock.json index 2b4f6673..621f7a24 100644 --- a/zefie_wtvp_minisrv/package-lock.json +++ b/zefie_wtvp_minisrv/package-lock.json @@ -1,12 +1,12 @@ { "name": "zefie_wtvp_minisrv", - "version": "0.9.33", + "version": "0.9.35", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "zefie_wtvp_minisrv", - "version": "0.9.33", + "version": "0.9.35", "license": "GPL3", "dependencies": { "adm-zip": "^0.5.9", @@ -19,7 +19,7 @@ "iconv-lite": "^0.6.3", "mime-types": "^2.1.35", "newsie": "^1.2.1", - "nntp-server-zefie": "git+https://git@github.com:zefie/nntp-server", + "nntp-server-zefie": "^3.1.0", "proxy-agent": "^5.0.0", "sanitize-html": "^2.7.2", "socks-proxy-agent": "^6.2.1", @@ -891,10 +891,9 @@ } }, "node_modules/nntp-server-zefie": { - "name": "nntp-server", "version": "3.1.0", - "resolved": "git+https://git@github.com/zefie/nntp-server.git#c2721f81a98dacda0a272dc8c98f8155a955523f", - "license": "MIT", + "resolved": "https://registry.npmjs.org/nntp-server-zefie/-/nntp-server-zefie-3.1.0.tgz", + "integrity": "sha512-LOWvF1oOST0osTMn4pVqDqNBLCGTE7grUo1+x0Mdd8NYaRby475IhVyku4cgM8PRq5teB/5WIrKwb/jJni5c8Q==", "dependencies": { "debug": "^4.3.3", "denque": "^2.0.1", @@ -2101,8 +2100,9 @@ "integrity": "sha512-41jhtKmlpSc27oIBkp681fm4aLURPT/AgeBvSRicxNPWDVeHLaq7tSvG/OsEXz7g41thgv9JMV1ZjYSABMiYVA==" }, "nntp-server-zefie": { - "version": "git+https://git@github.com/zefie/nntp-server.git#c2721f81a98dacda0a272dc8c98f8155a955523f", - "from": "nntp-server-zefie@git+https://git@github.com:zefie/nntp-server", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/nntp-server-zefie/-/nntp-server-zefie-3.1.0.tgz", + "integrity": "sha512-LOWvF1oOST0osTMn4pVqDqNBLCGTE7grUo1+x0Mdd8NYaRby475IhVyku4cgM8PRq5teB/5WIrKwb/jJni5c8Q==", "requires": { "debug": "^4.3.3", "denque": "^2.0.1", diff --git a/zefie_wtvp_minisrv/package.json b/zefie_wtvp_minisrv/package.json index e84c02a8..efefe9cc 100644 --- a/zefie_wtvp_minisrv/package.json +++ b/zefie_wtvp_minisrv/package.json @@ -1,6 +1,6 @@ { "name": "zefie_wtvp_minisrv", - "version": "0.9.35", + "version": "0.9.36", "description": "WebTV Service (WTVP) Emulation Server", "main": "app.js", "homepage": "https://github.com/zefie/zefie_wtvp_minisrv", @@ -37,7 +37,7 @@ "iconv-lite": "^0.6.3", "mime-types": "^2.1.35", "newsie": "^1.2.1", - "nntp-server-zefie": "git+https://git@github.com:zefie/nntp-server", + "nntp-server-zefie": "^3.1.0", "proxy-agent": "^5.0.0", "sanitize-html": "^2.7.2", "socks-proxy-agent": "^6.2.1", diff --git a/zefie_wtvp_minisrv/user_config.example.json b/zefie_wtvp_minisrv/user_config.example.json index 57ba47d1..f36d2700 100644 --- a/zefie_wtvp_minisrv/user_config.example.json +++ b/zefie_wtvp_minisrv/user_config.example.json @@ -16,10 +16,14 @@ "/home/zefie/webtv/ServiceVault" ], "ssid_block_list": [ + // list of SSID's to block "8100000000000000", "8100000000000010" ], "ssid_ip_allow_list": { + // list of SSIDs to allow. Can be in the block list above. + // The IP the SSID is connecting from should be listed under + // the allowed SSID as per this example. Subnets allowed. "8100000000000000": [ "192.168.1.0/24", "127.0.0.1" @@ -57,11 +61,16 @@ "wtv-1800": { "send_tellyscripts": true, "send_tellyscript_ssid_whitelist": [ - "8100000000000000" + // send only these SSIDs a tellyscript + "8100000000000000", + "8120000000000000" ] }, "wtv-admin": { + // demonstrates an override "authorized_ssids": { + // uses the same format as the SSID whitelist above + // SSID match, IP match, AND password are all required to access wtv-admin service. "8100000000000000": [ "192.168.1.0/24", "127.0.0.1" @@ -70,33 +79,42 @@ "password": "my-secure-password" }, "wtv-log": { + // demonstrates an override "write_logs_to_disk": true }, "wtv-some-custom-service": { + // demonstrates adding a new service "port": 1609, "connections": 1 }, "wtv-tricks": { + // this example shows how to point to an external server + // untested "service_ip": "192.168.1.8", "port": 1702, "nobind": true }, "wtv-music": { - "disabled": true + "disabled": true // disable default service wtv-music }, "wtv-author": { "enable_multi_query": true }, "wtv-news": { "disabled": false, - "upstream_address": "192.168.11.8", - "upstream_port": 1699, + "upstream_address": "192.168.11.8", // upstream usenet service + "upstream_port": 1699, // upstream usenet service port "upstream_auth": { + // upstream usenet service auth (delete object and set to null (eg upstream_auth: null) to not use login "username": "myusername", "password": "mypassword" }, - "upstream_tls": true, + "upstream_tls": true, // upstream usenet is ssl (true/false) "local_auth": { + // manually define a username/password for the local built-in NNTP + // otherwise it will be randomly generated. This is useful if you + // want to access the built-in NNTP externally, such as in + // Mozilla Thunderbird "username": "mylocaluser", "password": "mylocalpass" } diff --git a/zefie_wtvp_minisrv/zefie_wtvp_minisrv.njsproj b/zefie_wtvp_minisrv/zefie_wtvp_minisrv.njsproj index 9d3f8b19..ebfdf69a 100644 --- a/zefie_wtvp_minisrv/zefie_wtvp_minisrv.njsproj +++ b/zefie_wtvp_minisrv/zefie_wtvp_minisrv.njsproj @@ -39,6 +39,9 @@ Code + + Code + @@ -1026,6 +1029,10 @@ + + Code + + Code