mirror of
https://github.com/ngoduykhanh/wireguard-ui.git
synced 2025-05-23 00:15:19 +03: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:
parent
de0c9fd26b
commit
2aa042b919
8 changed files with 49 additions and 9 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue