mirror of
https://github.com/billz/raspap-webgui.git
synced 2025-03-01 10:31:47 +00:00
Handle peer defaults
This commit is contained in:
@@ -107,9 +107,9 @@ function DisplayWireGuardConfig()
|
||||
$wg_srvipaddress = ($conf['Address'] == '') ? getDefaultNetValue('wireguard','server','Address') : $conf['Address'];
|
||||
$wg_srvpubkey = $conf['PublicKey'];
|
||||
$wg_srvprivkey = $conf['PrivateKey'];
|
||||
$wg_endpoint = $conf['Endpoint'];
|
||||
$wg_allowedips = $conf['AllowedIPs'];
|
||||
$wg_pkeepalive = $conf['PersistentKeepalive'];
|
||||
$wg_pendpoint = ($conf['Endpoint'] == '') ? getDefaultNetValue('wireguard','peer','Endpoint') : $conf['Endpoint'];
|
||||
$wg_pallowedips = ($conf['AllowedIPs'] == '') ? getDefaultNetValue('wireguard','peer','AllowedIPs') : $conf['AllowedIPs'];
|
||||
$wg_pkeepalive = ($conf['PersistentKeepalive'] == '') ? getDefaultNetValue('wireguard','peer','PersistentKeepalive') : $conf['PersistentKeepalive'];
|
||||
|
||||
// fetch service status
|
||||
exec('pidof wg-crypt-wg0 | wc -l', $wgstatus);
|
||||
@@ -128,8 +128,8 @@ function DisplayWireGuardConfig()
|
||||
"wg_srvipaddress",
|
||||
"wg_srvpubkey",
|
||||
"wg_srvprivkey",
|
||||
"wg_endpoint",
|
||||
"wg_allowedips",
|
||||
"wg_pendpoint",
|
||||
"wg_pallowedips",
|
||||
"wg_pkeepalive"
|
||||
)
|
||||
);
|
||||
|
Reference in New Issue
Block a user