website access minor edit
This commit is contained in:
@@ -52,13 +52,13 @@ function safeFile(requestUrl) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Tailscale advertises the host over its tailnet on a 100.64.0.0/10 address, so
|
// A tailnet advertises the host over a 100.64.0.0/10 address, so label that URL
|
||||||
// label that URL clearly for remote (off-LAN) demos over the tunnel.
|
// clearly for remote (off-LAN) demos over the tunnel.
|
||||||
function interfaceLabel(interfaceName, address) {
|
function interfaceLabel(interfaceName, address) {
|
||||||
const [first, second] = address.split(".").map(Number);
|
const [first, second] = address.split(".").map(Number);
|
||||||
const isTailnet =
|
const isTailnet =
|
||||||
/tailscale/i.test(interfaceName) || (first === 100 && second >= 64 && second <= 127);
|
/tailscale/i.test(interfaceName) || (first === 100 && second >= 64 && second <= 127);
|
||||||
return isTailnet ? "Tailscale (tunnel)" : `Other devices (${interfaceName})`;
|
return isTailnet ? "Remote (tunnel)" : `Other devices (${interfaceName})`;
|
||||||
}
|
}
|
||||||
|
|
||||||
function displayUrls(host, port) {
|
function displayUrls(host, port) {
|
||||||
|
|||||||
Reference in New Issue
Block a user