2020-04-22 11:02:07 +02:00
|
|
|
<!-- wireguard settings tab -->
|
|
|
|
<div class="tab-pane active" id="wgsettings">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-6">
|
|
|
|
<h4 class="mt-3"><?php echo _("Tunnel settings"); ?></h4>
|
|
|
|
<div class="input-group">
|
|
|
|
<div class="custom-control custom-switch">
|
2021-03-09 16:35:48 +01:00
|
|
|
<input class="custom-control-input" id="server_enabled" type="checkbox" name="wg_senabled" value="1" <?php echo $wg_senabled ? ' checked="checked"' : "" ?> aria-describedby="server-description">
|
|
|
|
<label class="custom-control-label" for="server_enabled"><?php echo _("Enable server") ?></label>
|
2020-04-22 11:02:07 +02:00
|
|
|
</div>
|
|
|
|
<p id="wg-description">
|
2020-08-25 23:10:50 +02:00
|
|
|
<small><?php echo _("Enable this option to encrypt traffic by creating a tunnel between RaspAP and configured peers.") ?></small>
|
2021-03-09 16:35:48 +01:00
|
|
|
<small><?php echo _("This option adds <code>wg0.conf</code> to the WireGuard configuration.") ?></small>
|
2020-04-22 11:02:07 +02:00
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-xs-3 col-sm-6">
|
|
|
|
<label for="code"><?php echo _("Local public key"); ?></label>
|
|
|
|
</div>
|
|
|
|
<div class="input-group col-md-12 mb-3">
|
2021-03-07 20:06:53 +01:00
|
|
|
<input type="text" class="form-control" name="wg-server" id="wg-srvpubkey" value="<?php echo htmlspecialchars($wg_srvpubkey, ENT_QUOTES); ?>" />
|
2020-04-22 11:02:07 +02:00
|
|
|
<div class="input-group-append">
|
2021-03-02 15:18:32 +01:00
|
|
|
<button class="btn btn-outline-secondary rounded-right wg-keygen" type="button"><i class="fas fa-magic"></i></button>
|
2021-02-24 10:12:31 +01:00
|
|
|
<span id="wg-server-pubkey-status" class="input-group-addon check-hidden ml-2 mt-1"><i class="fas fa-check"></i></span>
|
2020-04-22 11:02:07 +02:00
|
|
|
</div>
|
2021-02-24 19:06:18 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
<div class="form-group col-xs-3 col-sm-3">
|
|
|
|
<label for="code"><?php echo _("Local Port"); ?></label>
|
2021-03-07 20:06:53 +01:00
|
|
|
<input type="text" class="form-control" name="wg_srvport" value="<?php echo htmlspecialchars($wg_srvport, ENT_QUOTES); ?>" />
|
2020-04-22 11:02:07 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
<div class="form-group col-md-6">
|
|
|
|
<label for="code"><?php echo _("IP Address"); ?></label>
|
2021-03-07 20:06:53 +01:00
|
|
|
<input type="text" class="form-control" name="wg_srvipaddress" value="<?php echo htmlspecialchars($wg_srvipaddress, ENT_QUOTES); ?>" />
|
2020-04-22 11:02:07 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2021-03-07 11:25:21 +01:00
|
|
|
<div class="row">
|
|
|
|
<div class="form-group col-md-6">
|
|
|
|
<label for="code"><?php echo _("DNS"); ?></label>
|
2021-03-07 20:06:53 +01:00
|
|
|
<input type="text" class="form-control" name="wg_srvdns" value="<?php echo htmlspecialchars($wg_srvdns, ENT_QUOTES); ?>" />
|
2021-03-07 11:25:21 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2020-04-22 11:02:07 +02:00
|
|
|
</div>
|
|
|
|
</div><!-- /.row -->
|
|
|
|
</div><!-- /.tab-pane | settings tab -->
|
|
|
|
|
2021-03-07 14:20:52 +01:00
|
|
|
|