mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-02-15 03:11:50 +00:00
Also correct tcp: into tcp://
This commit is contained in:
parent
3ca5f10733
commit
1a7df477b0
1 changed files with 6 additions and 0 deletions
|
@ -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 a new issue