mirror of
https://github.com/cwinfo/yggdrasil-go.git
synced 2024-11-22 20:00:27 +00:00
Also correct tcp: into tcp://
This commit is contained in:
parent
3ca5f10733
commit
1a7df477b0
@ -196,6 +196,9 @@ func main() {
|
|||||||
if strings.HasPrefix(uri, "tcp://") || strings.HasPrefix(uri, "socks://") {
|
if strings.HasPrefix(uri, "tcp://") || strings.HasPrefix(uri, "socks://") {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
if strings.HasPrefix(uri, "tcp:") {
|
||||||
|
uri = uri[4:]
|
||||||
|
}
|
||||||
(dat["Peers"].([]interface{}))[index] = "tcp://" + uri
|
(dat["Peers"].([]interface{}))[index] = "tcp://" + uri
|
||||||
}
|
}
|
||||||
// Now do the same with the interface peers
|
// Now do the same with the interface peers
|
||||||
@ -205,6 +208,9 @@ func main() {
|
|||||||
if strings.HasPrefix(uri, "tcp://") || strings.HasPrefix(uri, "socks://") {
|
if strings.HasPrefix(uri, "tcp://") || strings.HasPrefix(uri, "socks://") {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
if strings.HasPrefix(uri, "tcp:") {
|
||||||
|
uri = uri[4:]
|
||||||
|
}
|
||||||
((dat["InterfacePeers"].(map[string]interface{}))[intf]).([]interface{})[index] = "tcp://" + uri
|
((dat["InterfacePeers"].(map[string]interface{}))[intf]).([]interface{})[index] = "tcp://" + uri
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user