Project

General

Profile

« Previous | Next » 

Revision 1698954c

Added by Steve Beaver over 4 years ago

Added support for wireguard pre-shared keys

View differences:

src/etc/inc/web/wg.inc
115 115
		$peer['allowedips'] =  $post['allowedips' . $idx];
116 116
		$peer['descr'] =  $post['descp' . $idx];
117 117
		$peer['persistentkeepalive'] =  $post['persistentkeepalive' . $idx];
118
		$peer['presharedkey'] =  $post['presharedkey' . $idx];
118 119

  
119 120
		$pconfig['peers']['peer'][] = $peer;
120 121
		$idx++;
src/usr/local/www/vpn_wg_edit.php
163 163
$dnsgw_help = gettext("Endpoint");
164 164
$ka_help = gettext("Keepalive");
165 165
$aips_help = gettext("Allowed IPs");
166
$preshare_help = gettext("Pre-shared key");
166 167

  
167 168
// If there are no peers, make an empty entry for initial display. This will be the case when creating a new tunnel
168 169
if ($peer_count == 0) {
......
220 221
		$peer['allowedips']
221 222
	))->setHelp($aips_help);
222 223

  
224
	$group2->add(new Form_Input(
225
		'presharedkey' . $peer_num,
226
		'Preshared key',
227
		'text',
228
		$peer['presharedkey']
229
	))->setHelp($preshare_help);
230

  
223 231
	$section2->add($group);
224 232
	$section2->add($group2);
225 233
	$peer_num++;

Also available in: Unified diff