Revision bf87b4d7
Added by Luiz Gustavo S. Costa over 14 years ago
usr/local/www/vpn_openvpn_server.php | ||
---|---|---|
91 | 91 |
$pconfig['tlsauth_enable'] = "yes"; |
92 | 92 |
$pconfig['autotls_enable'] = "yes"; |
93 | 93 |
$pconfig['dh_length'] = 1024; |
94 |
$pconfig['device_mode'] = "tun"; |
|
94 | 95 |
$pconfig['interface'] = "wan"; |
95 | 96 |
$pconfig['local_port'] = openvpn_port_next('UDP'); |
96 | 97 |
$pconfig['pool_enable'] = "yes"; |
... | ... | |
104 | 105 |
$pconfig['mode'] = $a_server[$id]['mode']; |
105 | 106 |
$pconfig['protocol'] = $a_server[$id]['protocol']; |
106 | 107 |
$pconfig['authmode'] = $a_server[$id]['authmode']; |
108 |
$pconfig['device_mode'] = $a_server[$id]['device_mode']; |
|
107 | 109 |
$pconfig['interface'] = $a_server[$id]['interface']; |
108 | 110 |
if (!empty($a_server[$id]['ipaddr'])) { |
109 | 111 |
$pconfig['interface'] = $pconfig['interface'] . '|' . $a_server[$id]['ipaddr']; |
... | ... | |
304 | 306 |
if (!empty($pconfig['authmode'])) |
305 | 307 |
$server['authmode'] = implode(",", $pconfig['authmode']); |
306 | 308 |
$server['protocol'] = $pconfig['protocol']; |
309 |
$server['device_mode'] = $pconfig['device_mode']; |
|
307 | 310 |
list($server['interface'], $server['ipaddr']) = explode ("|",$pconfig['interface']); |
308 | 311 |
$server['local_port'] = $pconfig['local_port']; |
309 | 312 |
$server['description'] = $pconfig['description']; |
... | ... | |
662 | 665 |
</select> |
663 | 666 |
</td> |
664 | 667 |
</tr> |
668 |
<tr> |
|
669 |
<td width="22%" valign="top" class="vncellreq"><?=gettext("Device Mode"); ?></td> |
|
670 |
<td width="78%" class="vtable"> |
|
671 |
<select name="device_mode" class="formselect"> |
|
672 |
<?php |
|
673 |
foreach ($openvpn_dev_mode as $device): |
|
674 |
$selected = ""; |
|
675 |
if ($pconfig['device_mode'] == $device) |
|
676 |
$selected = "selected"; |
|
677 |
?> |
|
678 |
<option value="<?=$device;?>" <?=$selected;?>><?=$device;?></option> |
|
679 |
<?php endforeach; ?> |
|
680 |
</select> |
|
681 |
</td> |
|
682 |
</tr> |
|
665 | 683 |
<tr> |
666 | 684 |
<td width="22%" valign="top" class="vncellreq"><?=gettext("Interface"); ?></td> |
667 | 685 |
<td width="78%" class="vtable"> |
Also available in: Unified diff
Added option to select the type of device for use in the tunnel openvpn