mirror of
https://github.com/RaspAP/raspap-webgui.git
synced 2024-11-25 09:00:25 +00:00
Fix: correctly parse multiple wg DNS entries, resolves #1585
This commit is contained in:
parent
e386cc8dfe
commit
4175303cf8
1 changed files with 3 additions and 0 deletions
|
@ -43,6 +43,9 @@ function DisplayWireGuardConfig()
|
||||||
$wg_srvport = ($conf['ListenPort'] == '') ? getDefaultNetValue('wireguard','server','ListenPort') : $conf['ListenPort'];
|
$wg_srvport = ($conf['ListenPort'] == '') ? getDefaultNetValue('wireguard','server','ListenPort') : $conf['ListenPort'];
|
||||||
$wg_srvipaddress = ($conf['Address'] == '') ? getDefaultNetValue('wireguard','server','Address') : $conf['Address'];
|
$wg_srvipaddress = ($conf['Address'] == '') ? getDefaultNetValue('wireguard','server','Address') : $conf['Address'];
|
||||||
$wg_srvdns = ($conf['DNS'] == '') ? getDefaultNetValue('wireguard','server','DNS') : $conf['DNS'];
|
$wg_srvdns = ($conf['DNS'] == '') ? getDefaultNetValue('wireguard','server','DNS') : $conf['DNS'];
|
||||||
|
if (is_array($wg_srvdns)) {
|
||||||
|
$wg_srvdns = implode(', ', $wg_srvdns);
|
||||||
|
}
|
||||||
$wg_peerpubkey = exec('sudo cat '. RASPI_WIREGUARD_PATH .'wg-peer-public.key', $return);
|
$wg_peerpubkey = exec('sudo cat '. RASPI_WIREGUARD_PATH .'wg-peer-public.key', $return);
|
||||||
if (sizeof($conf) >0) {
|
if (sizeof($conf) >0) {
|
||||||
$wg_senabled = true;
|
$wg_senabled = true;
|
||||||
|
|
Loading…
Reference in a new issue