mirror of
https://github.com/swissmakers/wireguard-manager.git
synced 2026-04-11 13:47:05 +02:00
Added UseServerDNS option for clients who do not have to use the DNS specified in the server configuration. (#79)
This commit is contained in:
@@ -23,7 +23,10 @@ func BuildClientConfig(client model.Client, server model.Server, setting model.G
|
||||
// Interface section
|
||||
clientAddress := fmt.Sprintf("Address = %s", strings.Join(client.AllocatedIPs, ","))
|
||||
clientPrivateKey := fmt.Sprintf("PrivateKey = %s", client.PrivateKey)
|
||||
clientDNS := fmt.Sprintf("DNS = %s", strings.Join(setting.DNSServers, ","))
|
||||
clientDNS := ""
|
||||
if client.UseServerDNS {
|
||||
clientDNS = fmt.Sprintf("DNS = %s", strings.Join(setting.DNSServers, ","))
|
||||
}
|
||||
|
||||
// Peer section
|
||||
peerPublicKey := fmt.Sprintf("PublicKey = %s", server.KeyPair.PublicKey)
|
||||
|
||||
Reference in New Issue
Block a user