ss-abramchuk / OpenVPNAdapter

Objective-C wrapper for OpenVPN library. Compatible with iOS and macOS.
GNU Affero General Public License v3.0
473 stars 209 forks source link

How to create certificate with username password like openvpn app in AppStore #137

Closed objHua closed 5 years ago

objHua commented 5 years ago

help!I don't know what to do

objHua commented 5 years ago

error: Error Domain=me.ss-abramchuk.openvpn-adapter.error-domain Code=68 "Failed to establish connection with OpenVPN server" UserInfo={NSLocalizedDescription=Failed to establish connection with OpenVPN server, me.ss-abramchuk.openvpn-adapter.error-key.message=mbed TLS: ca certificate is undefined, me.ss-abramchuk.openvpn-adapter.error-key.fatal=true, NSLocalizedFailureReason=Unknown error.}

objHua commented 5 years ago

sorry,I have solved the problem because my VPN server does not need cert, but I did not turn off this property, and VPN server needs username and password, but I did not add it. So... add code in PacketTunnelProvider file: let configuration = OpenVPNConfiguration() configuration.port = 1194 configuration.autologinSessions = true configuration.disableClientCert = true configuration.fileContent = ovpnFileContent then setup username and password like usage. fixed! Many thanks to the authors of this framework, thx