VPN helper does not parse DNS server correctly from a Wireguard profile; editing connection with both automatic and manual DNS configuration clobbers original configuration
Relevant information
-
GNOME Settings version: 44.3
-
Operating system (distribution): Arch Linux
-
Error message: Not applicable
-
Backtrace (if you are experiencing a crash): Not applicable
-
Screenshots:
Steps to reproduce:
- Create a plaintext
test.conf
Wireguard profile with the following dummy config (but this is present with a real config too):
[Interface]
Address = 0.0.0.0/32, 2001:0000:0000:0000:0000:0000:0000:0000/128
PrivateKey = 7zTb9QhJkR2V8LWnYxGcFpDPlXvO1IiE6daCjNwByq0=
DNS = 0.0.0.0
MTU = 1280
[Peer]
PublicKey = 7zTb9QhJkR2V8LWnYxGcFpDPlXvO1IiE6daCjNwByq0=
AllowedIPs = 0.0.0.0/0, ::/0
Endpoint = test.live:10001
PersistentKeepalive = 20
- Open GNOME Settings
- Go to "Network" tab
- Click "+" (plus) button in the VPN section, select "Import from file"
- Select the
test.conf
Wireguard profile and import the profile. - Go to IPv4 tab of the newly imported profile.
As you can see from the screenshot, the helper parses the address itself, but it doesn't disable the "Automatic" toggle for the DNS option, and after saving the profile the specified DNS server option is not saved. As a result, the DNS server from the current network connection (in my case, the underlying Ethernet connection, with the DNS provided by DHCP) is used instead. I thought it might only be a visual issue but I've confirmed via https://www.dnsleaktest.com/ that the DNS profile from the config file is actually not used unless I manually disable "Automatic" option when importing a profile.