New network profile created on every connect in Windows
Summary
On Windows, a new network profile is created in the Registry every time the VPN connects.
Version of the software & operating system
OpenConnect-GUI 1.6.1, Windows 11 23H2
Steps to reproduce
Registry keys for network profiles can be found in:
HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkList\Profiles
HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkList\Signatures\Unmanaged
Steps to reproduce the behavior:
- Connect to a server in OpenConnect-GUI.
- Open Registry Editor (regedit.exe)
- Navigate to
HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkList\Profiles
and expand the list of keys. - See that, in the list of network profiles, a new key has been made for the connection. In that key, the entry "ProfileName" will contain the name of the server with a suffix of hex digits and another number. This other number is incremented each time a connection to the server is made.
- Navigate to
HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkList\Signatures\Unmanaged
and expand the list of keys. - See that, in the list of unmanaged networks, a new key has been made for the connection. In that key, the entry "ProfileGuid" will contain the GUID of the corresponding network profile in
HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkList\Profiles
, and the entry "Description" will also correspond to the "ProfileName" of the network profile.
Actual results
A new network profile is made each time a the VPN connects. I do not recall this happening with OpenConnect-GUI 1.6.0. This may be related to the fix for #357 (closed), with which wintun is now used instead of the TAP driver.
Expected results
Only a single network profile is used. Perhaps just use a single network profile for all VPN servers (e.g. OpenConnect-GUI or similar, without the server name). Alternatively, a new network profile can be created for each server on first-connect, then subsequently reused each time the connection is established.