mirror of
https://github.com/RaspAP/raspap-webgui.git
synced 2024-11-28 18:40:33 +00:00
Disambiguate var names
This commit is contained in:
parent
c80ad85214
commit
6076e277c8
2 changed files with 14 additions and 14 deletions
|
@ -103,10 +103,10 @@ function DisplayWireGuardConfig()
|
|||
// fetch wg config
|
||||
exec('sudo cat '. RASPI_WIREGUARD_CONFIG, $return);
|
||||
$conf = ParseConfig($return);
|
||||
$wg_port = ($conf['ListenPort'] == '') ? getDefaultNetValue('wireguard','interface','listenport') : $conf['ListenPort'];
|
||||
$wg_ipaddress = ($conf['Address'] == '') ? getDefaultNetValue('wireguard','interface','address') : $conf['Address'];
|
||||
$wg_pubkey = $conf['PublicKey'];
|
||||
$wg_privkey = $conf['PrivateKey'];
|
||||
$wg_srvport = ($conf['ListenPort'] == '') ? getDefaultNetValue('wireguard','server','ListenPort') : $conf['ListenPort'];
|
||||
$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'];
|
||||
|
@ -124,10 +124,10 @@ function DisplayWireGuardConfig()
|
|||
"wg_log",
|
||||
"endpoint_enable",
|
||||
"peer_id",
|
||||
"wg_port",
|
||||
"wg_ipaddress",
|
||||
"wg_pubkey",
|
||||
"wg_privkey",
|
||||
"wg_srvport",
|
||||
"wg_srvipaddress",
|
||||
"wg_srvpubkey",
|
||||
"wg_srvprivkey",
|
||||
"wg_endpoint",
|
||||
"wg_allowedips",
|
||||
"wg_pkeepalive"
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
<div class="row">
|
||||
<div class="form-group col-xs-3 col-sm-3">
|
||||
<label for="code"><?php echo _("Local Port"); ?></label>
|
||||
<input type="text" class="form-control" name="wg_port" value="<?php echo htmlspecialchars($wg_port, ENT_QUOTES); ?>" />
|
||||
<input type="text" class="form-control" name="wg_srvport" value="<?php echo htmlspecialchars($wg_srvport, ENT_QUOTES); ?>" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -25,19 +25,19 @@
|
|||
<label for="code"><?php echo _("Local public key"); ?></label>
|
||||
</div>
|
||||
<div class="input-group col-md-12 mb-3">
|
||||
<input type="text" class="form-control" name="wg_pubkey" value="<?php echo htmlspecialchars($wg_pubkey, ENT_QUOTES); ?>" />
|
||||
<input type="text" class="form-control" name="wg-server" id="wg-srvpubkey" value="<?php echo htmlspecialchars($wg_srvpubkey, ENT_QUOTES); ?>" />
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-sm btn-outline-secondary rounded-right" type="button" onclick="updateWgKey()"><?php echo _("Generate key"); ?></button>
|
||||
<span id="cbxblocklist-status" class="input-group-addon check-hidden ml-2 mt-1"><i class="fas fa-check"></i></span>
|
||||
<button class="btn btn-sm btn-outline-secondary rounded-right" type="button" onclick="generateWgKey()"><?php echo _("Generate key"); ?></button>
|
||||
<span id="wg-srvpubkey-status" class="input-group-addon check-hidden ml-2 mt-1"><i class="fas fa-check"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" name="wg_privkey" value="<?php echo htmlspecialchars($wg_privkey, ENT_QUOTES); ?>" />
|
||||
<input type="hidden" name="wg_privkey" value="<?php echo htmlspecialchars($wg_srvprivkey, ENT_QUOTES); ?>" />
|
||||
|
||||
<div class="row">
|
||||
<div class="form-group col-md-6">
|
||||
<label for="code"><?php echo _("IP Address"); ?></label>
|
||||
<input type="text" class="form-control" name="wg_ipaddress" value="<?php echo htmlspecialchars($wg_ipaddress, ENT_QUOTES); ?>" />
|
||||
<input type="text" class="form-control" name="wg_ipaddress" value="<?php echo htmlspecialchars($wg_srvipaddress, ENT_QUOTES); ?>" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Reference in a new issue