added feature to add root node
This commit is contained in:
@@ -29,9 +29,9 @@ type IpAddress struct {
|
||||
Upload float64 `json:"Upload"`
|
||||
ServerPort string `json:"ServerPort"`
|
||||
BareMetalSSHPort string `json:"BareMetalSSHPort"`
|
||||
NAT string `json:"NAT"`
|
||||
NAT bool `json:"NAT"`
|
||||
EscapeImplementation string `json:"EscapeImplementation"`
|
||||
ProxyServer string `json:"ProxyServer"`
|
||||
ProxyServer bool `json:"ProxyServer"`
|
||||
UnSafeMode bool `json:"UnSafeMode"`
|
||||
PublicKey string `json:"PublicKey"`
|
||||
CustomInformation string `json:"CustomInformation"`
|
||||
@@ -161,7 +161,7 @@ func (table *IpAddresses) RemoveDuplicates() error {
|
||||
}
|
||||
}
|
||||
|
||||
if table.IpAddress[i].NAT == "True" && table.IpAddress[i].EscapeImplementation == "None" {
|
||||
if table.IpAddress[i].NAT && table.IpAddress[i].EscapeImplementation == "None" {
|
||||
Exists = true
|
||||
}
|
||||
|
||||
|
||||
@@ -95,7 +95,7 @@ func (ip *IpAddresses) SpeedTestUpdatedIPTable() error {
|
||||
}
|
||||
// Checks if both the IPV4 addresses are the same or the IPV6 address is not
|
||||
// an empty string and IPV6 address are the same
|
||||
if (ip.IpAddress[k].Ipv4 == targets.IpAddress[i].Ipv4 && targets.IpAddress[i].NAT == "True") || (targets.IpAddress[i].Ipv6 != "" && ip.IpAddress[k].Ipv6 == targets.IpAddress[i].Ipv6) {
|
||||
if (ip.IpAddress[k].Ipv4 == targets.IpAddress[i].Ipv4 && targets.IpAddress[i].NAT) || (targets.IpAddress[i].Ipv6 != "" && ip.IpAddress[k].Ipv6 == targets.IpAddress[i].Ipv6) {
|
||||
Exists = true
|
||||
break
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user