OpenVPNAdapter icon indicating copy to clipboard operation
OpenVPNAdapter copied to clipboard

"Transport error on \'xxx.xxx.xxx.xxx: NETWORK_EOF_ERROR"

Open MatthewR1103 opened this issue 7 years ago • 2 comments

My PacketTunnelProvider is like this.

guard let fileContent = providerConfiguration[ProviderConfigurationKey.fileContent] as? Data, let caRef = providerConfiguration[ProviderConfigurationKey.caRef] as? Data, let userCertificateRef = providerConfiguration[ProviderConfigurationKey.userCertificateRef] as? Data, let userKeyRef = providerConfiguration[ProviderConfigurationKey.userKeyRef] as? Data else { preconditionFailure("fileContent, certificates and a key should be provided to the tunnel provider") }

guard let ca = String(data: caRef, encoding: .utf8)?.replacingOccurrences(of: "\n", with: "\n"), let userCertificate = String(data: userCertificateRef, encoding: .utf8)?.replacingOccurrences(of: "\n", with: "\n"), let userKey = String(data: userKeyRef, encoding: .utf8)?.replacingOccurrences(of: "\n", with: "\n") else { fatalError("Failed to retrieve certificates and a user key from keychain") }

// Create representation of the OpenVPN configuration. Other properties such as connection timeout or // private key password aslo may be provided there. let vpnConfiguration = OpenVPNConfiguration().then { $0.fileContent = fileContent $0.settings = [ "ca" : ca, "cert" : userCertificate, "key" : userKey ] }

// Apply OpenVPN configuration let properties: OpenVPNProperties do { properties = try vpnAdapter.apply(configuration: vpnConfiguration) } catch { completionHandler(error) return }

Then I go this error. Please let me know why this error happened. image

MatthewR1103 avatar Jun 01 '18 02:06 MatthewR1103

I tested ovpn file with OpenVPN Connect in iHone AppStore. In openvpn connect, it works fine.

I can't know what problem is. Please help me.

client.zip

MatthewR1103 avatar Jun 01 '18 05:06 MatthewR1103

i also meet this problem,have you revoled it? how to deal with it?can you tell me ~~thx

mrkizy avatar Jul 06 '18 13:07 mrkizy