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
|
||||
// label that URL clearly for remote (off-LAN) demos over the tunnel.
|
||||
// A tailnet advertises the host over a 100.64.0.0/10 address, so label that URL
|
||||
// clearly for remote (off-LAN) demos over the tunnel.
|
||||
function interfaceLabel(interfaceName, address) {
|
||||
const [first, second] = address.split(".").map(Number);
|
||||
const isTailnet =
|
||||
/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) {
|
||||
|
||||
Reference in New Issue
Block a user