zaneschepke/wgtunnel

[BUG] Search domains disappear from DNS setting of WireGuard tunnel

Closed this issue · 3 comments

Describe the bug
Search domains added to the DNS setting are not restored when editing the config, thus are lost on next save unless entered again each time.

Smartphone:

  • Device: Pixel 8
  • Android Version: 14
  • App Version 3.4.6

To reproduce

  1. Go to the tunnel config editor.
  2. Add a search domain to the DNS input, e.g. 10.5.5.1 -> 10.5.5.1, mydomain.example, so that queries for machine are first qualified to machine.mydomain.example..
  3. Save the config.
  4. Open the same tunnel's config.

Expected behaviour
The input should contain the search domain but only has the DNS server IP(s).

Additional context
Search domains are supported by the upstream project, and I've tested that they work as expected. I originally thought the separate setting as per #191 would be suitable, but I now believe it would be more consistent if the value in the DNS setting matched standard config of other WG versions.

Hello! Thanks for the report. Anything that works in the official app should work in WG tunnel so I'll dig in and see what's going wrong.

I rebased jdieter's commit on the latest main branch (linting caused a bunch of merge conflicts). Been using it for months and it's been working great for me.

I rebased jdieter's commit on the latest main branch (linting caused a bunch of merge conflicts). Been using it for months and it's been working great for me.

This is great! Would you be willing to create a PR for this so we can add this fix to the app? If not, no worries. I can pull in the changes.