X-dea / flutter_vpn

Plugin to access VPN service for Flutter | Flutter 的 VPN 插件
GNU Lesser General Public License v3.0
345 stars 125 forks source link

Not working in iOS #101

Closed pyaehein closed 2 years ago

pyaehein commented 2 years ago

Hello,

Example app is not working in iOS. I used latest release version (not master branch).

I already opened Personal VPN and Network Extensions in capabilities. Status shows "connected" but I don't see any VPN sign. And then I clicked status updated, It's show now "disconnected"

Btw: It's working well in Android. Same server same config.

ctrysbita commented 2 years ago

Have you tried the master branch?

pyaehein commented 2 years ago

Yes, I already tried. But master branch give me #99 this issue too.

ekingunoncu commented 2 years ago

Hi, any updates? Ios is not working in my environment too. I tried both a simulator and a real device. I can see "VPN started successfully.." on the logs but in reality, I wasn't able to connect through my VPN server. By the way, with the same codebase, I don't have any issue on android devices.

ekingunoncu commented 2 years ago

Searching for the cause of the error on clientside was frustrating without knowing it was because of some server config. I found the issue Apple seems to not support some cipher algorithms.

For strongswan there is a config file to select the right cipher algorithms. In the file /etc/ipsec.conf change the parameters below like this;

  ike=aes256-sha2_256-modp2048
  esp=aes256-sha2_256

After changing the file make sure you restart strongswan using below command; sudo ipsec restart

fluxion8 commented 1 year ago

Searching for the cause of the error on clientside was frustrating without knowing it was because of some server config. I found the issue Apple seems to not support some cipher algorithms.

For strongswan there is a config file to select the right cipher algorithms. In the file /etc/ipsec.conf change the parameters below like this;

  ike=aes256-sha2_256-modp2048
  esp=aes256-sha2_256

After changing the file make sure you restart strongswan using below command; sudo ipsec restart

Worked. Thank you

syedabdulbasit1 commented 10 months ago

@ekingunoncu please would you give me the code I am stuck in IOS configuration