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 can I connect without username and password #183

Closed Mohsenkhodadadzadeh closed 3 years ago

Mohsenkhodadadzadeh commented 4 years ago

Hi I tried to use this framework for connecting to an ovpn file without username and password, but an error occurred and shows me it needs username and password for connect. regarding to this lines in the tutorial tunnelProtocol.username = "username"

tunnelProtocol.passwordReference = ...

so here is my question: how can I connect to server with just .ovpn file instead of using username and Password and ovpn file??

ss-abramchuk commented 3 years ago

Hi @Mohsenkhodadadzadeh,

You may take a look at this project to check if yours configured correctly. As for username and password, if your ovpn file contains auth-user-pass you will have to provide credentials in either case.

Mohsenkhodadadzadeh commented 3 years ago

@ss-abramchuk Thank you so much my problem was I added NetworkExtension to the main target but I didn't add it to Tunnel target .