chore: Prettified Code
[ci skip]
This commit is contained in:
parent
f03b61e5c5
commit
94e8cd460a
6 changed files with 38 additions and 159 deletions
|
@ -200,11 +200,7 @@ export default class ChromecastPlugin {
|
|||
if (details.family === "IPv4" && !details.internal) {
|
||||
if (!/(loopback|vmware|internal|hamachi|vboxnet|virtualbox)/gi.test(dev + (alias ? ":" + alias : ""))) {
|
||||
if (details.address.substring(0, 8) === "192.168." || details.address.substring(0, 7) === "172.16." || details.address.substring(0, 3) === "10.") {
|
||||
if (
|
||||
!ip.startsWith("192.168.") ||
|
||||
(ip2.startsWith("192.168.") && !ip.startsWith("192.168.") && ip2.startsWith("172.16.") && !ip.startsWith("192.168.") && !ip.startsWith("172.16.")) ||
|
||||
(ip2.startsWith("10.") && !ip.startsWith("192.168.") && !ip.startsWith("172.16.") && !ip.startsWith("10."))
|
||||
) {
|
||||
if (!ip.startsWith("192.168.") || (ip2.startsWith("192.168.") && !ip.startsWith("192.168.") && ip2.startsWith("172.16.") && !ip.startsWith("192.168.") && !ip.startsWith("172.16.")) || (ip2.startsWith("10.") && !ip.startsWith("192.168.") && !ip.startsWith("172.16.") && !ip.startsWith("10."))) {
|
||||
ip = details.address;
|
||||
}
|
||||
++alias;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue