Code cleanup, update Endpoint default value

This commit is contained in:
billz
2021-03-07 19:06:53 +00:00
parent 7c1ef85bb8
commit 1e7438da23
6 changed files with 18 additions and 12 deletions

View File

@@ -44,6 +44,9 @@ function DisplayWireGuardConfig()
$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'];
if (sizeof($conf) >0) {
$wg_penabled = true;
}
// fetch service status
exec('pidof wg-crypt-wg0 | wc -l', $wgstatus);
@@ -56,12 +59,12 @@ function DisplayWireGuardConfig()
"wg_state",
"serviceStatus",
"wg_log",
"endpoint_enable",
"peer_id",
"wg_srvpubkey",
"wg_srvport",
"wg_srvipaddress",
"wg_srvdns",
"wg_penabled",
"wg_pipaddress",
"wg_plistenport",
"wg_peerpubkey",