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

certificate error #90

Open xande-er opened 2 years ago

xande-er commented 2 years ago

When connecting a VPN to iOS, the connection appears in the settings. When you enter the connection data in the application and click to connect, the connection will appear in the phone settings and the timer will work. Unfortunately, Ip does not change in the browser, but the status bar does not show which connection. And it takes less than a minute, and there is a certificate error in the settings.

What to do in this case?

ctrysbita commented 2 years ago

What kind of error? Can you attach screenshot & logs?

xande-er commented 2 years ago

In the console it says that it is successfully connected "VPN started successfully.." And in the settings, too, it says that there is a meal, but when you turn on the VPN in other applications, the top is marked with an identifier. After a while (30 seconds) writes that the certificate error. On Android, a similar problem, the connection also does not work. These proxies work, I checked on other resources. So I think the problem is in the plugin, or I'm doing something wrong) photo_2021-12-16_16-37-57 (2) photo_2021-12-16_16-37-57 photo_2021-12-16_16-37-58

ctrysbita commented 2 years ago

Can you turn on the VPN in settings manually?

xande-er commented 2 years ago

Yes, you can also enable it in the settings, but the problem is the same.

xande-er commented 2 years ago

I also tried to prescribe proxy settings directly in the emulator. Everything works fine, there is a connection, and the IP has changed. photo_2021-12-16_16-46-45

xande-er commented 2 years ago

Maybe someone has faced such a problem, or knows how to solve it ?? I will be grateful for any help.

vitasha10 commented 2 years ago

To start a suitable server, run or study the script presented in this article Read about Ikev2 as a protocol. It's going throw the SSL so you need the sertificate, but you can use Let's encrypt like in this article and don't attach it everywhere, only connect by server name/ip, login and pass. Picture

Don't forget that you must connect with one user. The credentials isn't in /etc/ipsec.sectes (I don't know why), you write them here:

# Enter the domain name of the server directed to the IP address
# use the sslip.io service if you don't have a domain
Hostname for VPN: 123-45-67-89.sslip.io
# VPN username
VPN username: coolguy
# password
VPN password (no quotes, please):

You can use one credential for many users on different ip.

@xande-er