Closed GoodiesHQ closed 1 year ago
DNS configuration is handled by your operating system (similar to IP address assignment) and thus out of scope for wgctrl-go. Apologies, closing.
I'm sorry, I'm not sure what you mean. There is a field in the INI configuration of WireGuard called "DNS" which contains two types of values:
This is pertaining to the structure that defines the client configuration.
[Interface]
PrivateKey = ABCDEFGHIJKLMNOPQRSTUVWXYZ=
Address = 10.255.255.4/24
DNS = 192.168.1.250, 1.1.1.1, internal.home.com
wg-quick handles IP and DNS assignment in a special way per operating system. They are not configured at all via the interfaces that wgctrl-go provides, and you'd have to implement them separately for each operating system you want your program to work with.
There is no member entry for DNS in the
Config
type in thewgtypes
module and consequently no way of dealing with nameservers.PLEASE note that the DNS field can contain something other than IP addresses, so a type of
[]net.IP
is not desirable. It can also contain search domains which is very important.