2020-04-22 11:02:07 +02:00
|
|
|
<!-- wireguard peers tab -->
|
|
|
|
<div class="tab-pane fade" id="wgpeers">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-6">
|
2020-08-25 23:10:50 +02:00
|
|
|
<h4 class="mt-3"><?php echo _("Peer"); ?></h4>
|
|
|
|
<div class="input-group">
|
|
|
|
<input type="hidden" name="endpoint-enable" value="0">
|
|
|
|
<input type="hidden" name="peer_id" value="1">
|
|
|
|
<div class="custom-control custom-switch">
|
|
|
|
<input class="custom-control-input" id="endpoint_enable" type="checkbox" name="endpoint-enable" value="1" <?php echo $enabled ? ' checked="checked"' : "" ?> aria-describedby="endpoint-description">
|
|
|
|
<label class="custom-control-label" for="endpoint_enable"><?php echo _("Enable endpoint") ?></label>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2021-03-02 15:18:32 +01:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-xs-3 col-sm-6 mt-3">
|
2021-02-24 19:06:18 +01:00
|
|
|
<label for="code"><?php echo _("Peer public key"); ?></label>
|
2021-03-02 15:18:32 +01:00
|
|
|
</div>
|
|
|
|
<div class="input-group col-md-12">
|
2021-03-07 14:20:52 +01:00
|
|
|
<input type="text" class="form-control" name="wg-peer" id="wg-peerpubkey" value="<?php echo htmlspecialchars($wg_peerpubkey, ENT_QUOTES); ?>" required />
|
2021-03-02 15:18:32 +01:00
|
|
|
<div class="input-group-append">
|
|
|
|
<button class="btn btn-outline-secondary rounded-right wg-keygen" type="button"><i class="fas fa-magic"></i></button>
|
|
|
|
<span id="wg-peer-pubkey-status" class="input-group-addon check-hidden ml-2 mt-1"><i class="fas fa-check"></i></span>
|
|
|
|
</div>
|
2021-02-24 19:06:18 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2021-03-02 15:18:32 +01:00
|
|
|
<div class="row">
|
2021-03-07 11:25:21 +01:00
|
|
|
<div class="form-group col-xs-3 col-sm-3 mt-3">
|
|
|
|
<label for="code"><?php echo _("Local Port"); ?></label>
|
2021-03-07 14:20:52 +01:00
|
|
|
<input type="text" class="form-control" name="wg_plistenport" value="<?php echo htmlspecialchars($wg_plistenport, ENT_QUOTES); ?>" required />
|
2021-03-07 11:25:21 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
<div class="form-group col-md-6">
|
|
|
|
<label for="code"><?php echo _("IP Address"); ?></label>
|
2021-03-07 14:20:52 +01:00
|
|
|
<input type="text" class="form-control" name="wg_pipaddress" value="<?php echo htmlspecialchars($wg_pipaddress, ENT_QUOTES); ?>" required />
|
2021-03-07 11:25:21 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
<div class="form-group col-xs-3 col-sm-6">
|
2021-03-02 15:18:32 +01:00
|
|
|
<label for="code"><?php echo _("Endpoint address"); ?></label>
|
2021-03-07 14:20:52 +01:00
|
|
|
<input type="text" class="form-control" name="wg_pendpoint" value="<?php echo htmlspecialchars($wg_pendpoint, ENT_QUOTES); ?>" required />
|
2021-03-02 15:18:32 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
2021-02-24 19:06:18 +01:00
|
|
|
|
2021-03-02 15:18:32 +01:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-xs-3 col-sm-6">
|
|
|
|
<label for="code"><?php echo _("Allowed IPs"); ?></label>
|
2021-03-07 14:20:52 +01:00
|
|
|
<input type="text" class="form-control mb-3" name="wg_pallowedips" value="<?php echo htmlspecialchars($wg_pallowedips, ENT_QUOTES); ?>" required />
|
2021-03-02 15:18:32 +01:00
|
|
|
</div>
|
2020-08-25 23:10:50 +02:00
|
|
|
</div>
|
|
|
|
|
2021-03-02 15:18:32 +01:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-xs-3 col-sm-6">
|
|
|
|
<label for="code"><?php echo _("Persistent keepalive"); ?></label>
|
2021-03-07 14:20:52 +01:00
|
|
|
<input type="text" class="form-control col-sm-3 mb-3" name="wg_pkeepalive" value="<?php echo htmlspecialchars($wg_pkeepalive, ENT_QUOTES); ?>" />
|
2021-03-02 15:18:32 +01:00
|
|
|
</div>
|
2020-08-25 23:10:50 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2021-03-02 15:18:32 +01:00
|
|
|
<div class="col-md-6 mt-5">
|
|
|
|
<figure class="figure">
|
2021-03-03 00:15:47 +01:00
|
|
|
<img src="app/img/wg-qr-code.php" class="figure-img img-fluid" alt="RaspAP Wifi QR code" style="width:100%;">
|
2021-03-02 15:18:32 +01:00
|
|
|
<figcaption class="figure-caption"><?php echo _("Scan this QR code with your client to connect to this RaspAP."); ?></figcaption>
|
|
|
|
</figure>
|
2020-08-25 23:10:50 +02:00
|
|
|
</div>
|
|
|
|
|
2020-04-22 11:02:07 +02:00
|
|
|
</div><!-- /.row -->
|
|
|
|
</div><!-- /.tab-pane | peers tab -->
|
|
|
|
|