OpenVPN / openvpn-gui

OpenVPN GUI is a graphical frontend for OpenVPN running on Windows 7 / 8 / 10. It creates an icon in the notification area from which you can control OpenVPN to start/stop your VPN tunnels, view the log and do other useful things.
Other
1.38k stars 397 forks source link

PLAP Auto Connection #672

Closed hoo29 closed 4 months ago

hoo29 commented 4 months ago

Hello, I have the PLAP optional enabled and can connect to profiles at the Windows login screen. Is it possible to configure one to auto connect so I don't have to manually select it?

selvanair commented 4 months ago

Autoconnect at boot? If using username/password authentication, you will have to somehow provide them without user interaction. You could do that by adding a second parameter to --auth-user-pass in the config file like auth-user-pass <filename> where <filename> is a file that contains the username and password. The file will have two lines with username as line 1, password as line2.

hoo29 commented 4 months ago

Autoconnect at boot?

Yes, if possible before I have logged into windows.

We have certificate authentication with the certs hardcoded (for now) into the ovpn file at C:\Program Files\OpenVPN\config-auto (it has a --management 127.0.0.1 7987 entry). All I currently have to do is click the connect PLAP connect button on the windows login screen, and select the profile name. It will say connected within a couple of seconds.

selvanair commented 4 months ago

If there are no passwords to be entered, it should get connected at boot without any need for interaction at PLAP screen. PLAP will not show it as connected until you click on it though, if that's what you mean.

IIRC, getting PLAP to automatically recognize that a profile is already connected had some issues. That said, would be nice if someone implements it without unwanted side effects :)

hoo29 commented 4 months ago

Ah that is what I mean, I thought it might already be connected as clicking connect it was almost instantaneous to report success. Thank you for confirming!