Skip to content

Commit

Permalink
Merge pull request #1586 from RaspAP/fix/wireguard-conf
Browse files Browse the repository at this point in the history
Fix: correctly parse multiple wg DNS entries
  • Loading branch information
billz authored May 14, 2024
2 parents e386cc8 + 4175303 commit 6541e9b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions includes/wireguard.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ function DisplayWireGuardConfig()
$wg_srvport = ($conf['ListenPort'] == '') ? getDefaultNetValue('wireguard','server','ListenPort') : $conf['ListenPort'];
$wg_srvipaddress = ($conf['Address'] == '') ? getDefaultNetValue('wireguard','server','Address') : $conf['Address'];
$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);
if (sizeof($conf) >0) {
$wg_senabled = true;
Expand Down

0 comments on commit 6541e9b

Please sign in to comment.