Feat: Global config override (#1720)
* be able to change dns. implement global override * link donate to readme * implement global config for allowed ips * change translations, fix generation * improve docs
This commit is contained in:
@@ -59,13 +59,13 @@ PostDown = ${iptablesTemplate(hooks.postDown, wgInterface)}`;
|
||||
return `[Interface]
|
||||
PrivateKey = ${client.privateKey}
|
||||
Address = ${client.ipv4Address}/${cidr4Block}, ${client.ipv6Address}/${cidr6Block}
|
||||
DNS = ${client.dns.join(', ')}
|
||||
DNS = ${(client.dns ?? userConfig.defaultDns).join(', ')}
|
||||
MTU = ${client.mtu}
|
||||
${hookLines.length ? `${hookLines.join('\n')}\n` : ''}
|
||||
[Peer]
|
||||
PublicKey = ${wgInterface.publicKey}
|
||||
PresharedKey = ${client.preSharedKey}
|
||||
AllowedIPs = ${client.allowedIps.join(', ')}
|
||||
AllowedIPs = ${(client.allowedIps ?? userConfig.defaultAllowedIps).join(', ')}
|
||||
PersistentKeepalive = ${client.persistentKeepalive}
|
||||
Endpoint = ${userConfig.host}:${userConfig.port}`;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user