Jigsaw-Code / outline-apps

Outline Client and Manager, developed by Jigsaw. Outline Manager makes it easy to create your own VPN server. Outline Client lets you share access to your VPN with anyone in your network, giving them access to the free and open internet.
https://getoutline.org/
Apache License 2.0
8.22k stars 1.35k forks source link

Switching system users causes connection problems #726

Open ramyhhh opened 4 years ago

ramyhhh commented 4 years ago

Describe the bug If I'm using my system via user A and VPN was ON, then restarted my computer and logged in to user B, Outline tries to bring connection back to its state ON but the other user B does not have the same list of VPN servers (and if user B is newly created, then there will be no servers at all) which causes the Outline VPN driver to keep trying and failing blocking the traffic, and the client UI won't show anything.

To Reproduce Steps to reproduce the behavior (Macos):

  1. Login to system via user A
  2. Connect to VPN server using Outline Client
  3. Create new system user B
  4. Restart and login to user B
  5. There will be no Internet connection and by going to Network Settings the Outline Adapter should look blinking (retries to connect)

Expected behavior The expected behavior for this case is to disconnect Outline VPN Adapter because this new user B never asked for VPN connection, it was the user A. There should be better synchronization for client settings and system settings, so if a new client settings got created (like using different system user), or settings got changed for any reason (server no longer available and it's not in the list), Outline should be able to restore system VPN settings to correct state.

Desktop (please complete the following information):

JonathanDCohen commented 4 years ago

I see two potential behaviors we could do here:

  1. Place the persisted server list in a shared location

  2. Intercept logouts and system shutdowns and make sure to close the VPN. This will likely take different responses based on each OS, for example the warning here

I'd be very suspect about going for choice 1 -- I can imagine Outline users not wanting to unwittingly share their connections on shared computers.

ramyhhh commented 4 years ago

I agree with you, behavior 1 could cause confusion, especially that Outline is being used by teams, where sharing same computer is plausible. But also choice 2 is harder to implement. If you allow me to say ...there is a choice 3 which is: Outline can check its VPN adapter status and check if it's connected to one of the servers in the list to decide wether or not to disconnect.

JonathanDCohen commented 4 years ago

@alalamav what do you think about @ramyhhh's suggestion? Seems like it would be platform-specific?

ramyhhh commented 4 years ago

Hi again, I want to add another details, where the same behaviour happens (loss of internet connection), which is related to the issue 100. After a rebook if the bug happened (forgot the servers) and Outline was connecting it will try to re-connect indefinitely cutting down internet access, and on Mac if the user is std user they can't even remove Outline Adapter and thus be in stuck situation.