diff --git a/Sources/sdlan/SDLContext.swift b/Sources/sdlan/SDLContext.swift index 1936568..e44299c 100644 --- a/Sources/sdlan/SDLContext.swift +++ b/Sources/sdlan/SDLContext.swift @@ -35,7 +35,7 @@ class SDLContext { // nat映射的相关信息, 暂时没有用处 //var natAddress: SDLNatAddress? // nat的网络类型 - var natType: NatType = .blocked + var natType: SDLNatProber.NatType = .blocked // AES加密,授权通过后,对象才会被创建 var aesCipher: AESCipher? @@ -102,7 +102,7 @@ class SDLContext { case .changed: // 需要重新探测网络的nat类型 Task { - self.natType = await self.getNatType() + self.natType = await SDLNatProber.getNatType(udpHole: self.udpHole, config: self.config) NSLog("didNetworkPathChanged, nat type is: \(self.natType)") } case .unreachable: