AndreVasilev / AVVPNService

AVVPNService simplifies setup of the VPN (IPSec or IKEv2)
MIT License
15 stars 4 forks source link

How to remove user configuration in order to connect to another server? #3

Open DenimMerzhan opened 1 year ago

DenimMerzhan commented 1 year ago

Hello, I have 2 servers IPSEC and when I try to connect to the second server I create a new Credentials, but still the connection goes to the old server

I understand that you need to use the remove configuration function, but I did not understand how to use it

Can you please advise

AndreVasilev commented 1 year ago

Hello Denim!

Doesn't this method the one you are looking for? https://github.com/AndreVasilev/AVVPNService/blob/master/Sources/AVVPNService/AVVPNService.swift#L31

DenimMerzhan commented 1 year ago

Yes, this method! I tried to implement it like this VVPNService.shared.removeConfiguration()

However, I got an error, "Could not remove VPN Configuration: configuration does not exist" Although the configurations have been adjusted

I assume that I did not implement the method correctly, but I can not understand what the problem is

AndreVasilev commented 1 year ago

It sounds like you're doing everything right, but obviously something is not working right. Sorry, I don't know how can I help you in this case :( You can see I didn't update this library some years - NEVPNManager's api could change during this time..

DenimMerzhan commented 1 year ago

Understood thanks

DenimMerzhan commented 1 year ago

I figured out, it turns out that the data itself changes when you change the credentials