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 increase timeout during initial handshake? #215

Open houmie opened 3 years ago

houmie commented 3 years ago

Hi @ss-abramchuk

Thanks for the recent 0.8.0 update.

When I try to connect to an OpenVPN server that is far away it keeps failing. Sometimes only after I have tried it for three times then it will connect. If the server is very far away (like San Francisco and I'm in London) it will never connect. But this is never an issue with servers in Europe that are in close proximity to me.

Is there a way in the configuration to increase the timeout for the initial handshake, so that it doesn't timeout too quickly when trying to connect to a OpenVPN server? That would be amazing.

Many Thanks, Houman

houmie commented 3 years ago

Sorry Sergey @ss-abramchuk I was hoping to see if you have any advise about this.

Thank you so much, Houman

ss-abramchuk commented 3 years ago

Hi @houmie,

Sorry for late reply, I'm quite busy on the primary job and my grandma died two weeks ago so it wasn't the best time to answer any question. As for your issue, you may try to set OpenVPNConfiguration.connectionTimeout

houmie commented 3 years ago

Hi Sergey,

I'm really sorry about your grandfather. My deepest condolences for your loss. I hope that you will find strength to overcome this difficult time.

I will try your suggestion and close the issue once confirmed.

Have a great evening, Houman