Fix #544 Kcptun ipv6 address not config correctly, need add a crochet[]
This commit is contained in:
@ -203,7 +203,12 @@ class ServerProfile: NSObject, NSCopying {
|
|||||||
|
|
||||||
func toKcptunJsonConfig() -> [String: AnyObject] {
|
func toKcptunJsonConfig() -> [String: AnyObject] {
|
||||||
var conf = kcptunProfile.toJsonConfig()
|
var conf = kcptunProfile.toJsonConfig()
|
||||||
|
if serverHost.contains(Character(":")) {
|
||||||
|
conf["remoteaddr"] = "[\(serverHost)]:\(serverPort)" as AnyObject
|
||||||
|
} else {
|
||||||
conf["remoteaddr"] = "\(serverHost):\(serverPort)" as AnyObject
|
conf["remoteaddr"] = "\(serverHost):\(serverPort)" as AnyObject
|
||||||
|
}
|
||||||
|
|
||||||
return conf
|
return conf
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user