Browse Source

More tweaks

master
Peter H. Jin 2 months ago
parent
commit
01ee0dceae
  1. 4
      config/live-demo/config.js
  2. 2
      generate-name-index.js
  3. 9
      index.js

4
config/live-demo/config.js

@ -140,6 +140,9 @@ function findServerForIP_p(_ip) {
return '!traceroute-mountain-line1';
}
*/
/* Temporarily disable this to make room for TTGEN lines as IPv6 Things
* until we have the /_/ path (sensitive to Host header for security) working */
/*
if (ipString.startsWith("2602:806:a003:40f:")) {
if ((b[8] === 0) && (b[9] === 0) && (b[10] === 0)) {
switch((b[11] << 16) + (b[12] << 8) + b[13]) {
@ -151,6 +154,7 @@ function findServerForIP_p(_ip) {
}
}
}
*/
return '!fallback';
}
exports.findServerForIP = function(_ip, use_https) {

2
generate-name-index.js

@ -69,7 +69,7 @@ var outputS = JSON.stringify({
"random": randomDB,
"lookup": output,
"auxtexts": {
"!ttgen": '<div style="background-color: #e0c0ff">This "thing" is actually a line from the <a href="https://www.peterjin.org/wiki/Traceroute_Text_Generator">Traceroute Text Generator</a>, rather than a standalone object.</div>',
"!ttgen": '<div style="background-color: #e0ffff">This "thing" is actually a line from the <a href="https://www.peterjin.org/wiki/Traceroute_Text_Generator">Traceroute Text Generator</a>, rather than a standalone object.</div>',
"!a3k": '<div style="background-color: #ffe0c0"><b>Disclaimer</b>: The names/"aliases" described here are for self-amusement and entertainment purposes only. Names are drawn from an exhaustive list, and unless otherwise stated, it is highly unlikely that the author of this site will want to be identified by the name shown above, either online or IRL (in real life). For more information, see <a href="https://www.peterjin.org/wiki/IPv6_Things#Aliases_disclaimer">my website.</a></div>'
// "!mbloo": '<div style="background-color: #ffe0c0"><b>Disclaimer</b>: The "my-bonnie-lies-over-the-ocean" domains were a joke and may be removed sometime in the future.</div>'
}

9
index.js

@ -93,7 +93,8 @@ var https_server = net.createServer((s) => {
http_server.keepAliveTimeout = 30000;
http_server.listen({port: 80});
https_server.listen({port: 443});
process.setgroups([]);
process.setgid(1);
process.setuid(1);
if (!(String(process.env.IPV6THINGS_NO_CHANGE_UIDGID) === "1")) {
process.setgroups([]);
process.setgid(1);
process.setuid(1);
}
Loading…
Cancel
Save