mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-13 16:14:40 +00:00
OpenVPN export, add auth-nocache option, closes https://github.com/opnsense/core/issues/3193
This commit is contained in:
parent
a8d89dadc5
commit
cc2b41bf15
@ -45,6 +45,16 @@
|
||||
<type>checkbox</type>
|
||||
<help>Verify the server certificate name when the client connects</help>
|
||||
</field>
|
||||
<field>
|
||||
<id>openvpn_export.auth_nocache</id>
|
||||
<label>Disable password save</label>
|
||||
<type>checkbox</type>
|
||||
<style>export_option</style>
|
||||
<help>
|
||||
Sets auth-nocache in the exported configuration when password authentication is used.
|
||||
This prevents OpenVPN from caching passwords in memory.
|
||||
</help>
|
||||
</field>
|
||||
<field>
|
||||
<id>openvpn_export.plain_config</id>
|
||||
<label>Custom config</label>
|
||||
|
||||
@ -48,7 +48,7 @@ class ArchiveOpenVPN extends PlainOpenVPN
|
||||
*/
|
||||
public function supportedOptions()
|
||||
{
|
||||
return array("plain_config", "p12_password", "random_local_port");
|
||||
return array("plain_config", "p12_password", "random_local_port", "auth_nocache");
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -48,7 +48,7 @@ class PlainOpenVPN extends BaseExporter implements IExportProvider
|
||||
*/
|
||||
public function supportedOptions()
|
||||
{
|
||||
return array("plain_config", "random_local_port");
|
||||
return array("plain_config", "random_local_port", "auth_nocache");
|
||||
}
|
||||
|
||||
/**
|
||||
@ -132,6 +132,9 @@ class PlainOpenVPN extends BaseExporter implements IExportProvider
|
||||
}
|
||||
if (in_array($this->config['mode'], array('server_user', 'server_tls_user'))) {
|
||||
$conf[] = "auth-user-pass";
|
||||
if (!empty($this->config['auth_nocache'])) {
|
||||
$conf[] = "auth-nocache";
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($this->config['compression'])) {
|
||||
|
||||
@ -48,7 +48,7 @@ class ViscosityVisz extends PlainOpenVPN
|
||||
*/
|
||||
public function supportedOptions()
|
||||
{
|
||||
return array("plain_config", "p12_password", "random_local_port");
|
||||
return array("plain_config", "p12_password", "random_local_port", "auth_nocache");
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -27,6 +27,10 @@
|
||||
<default>1</default>
|
||||
<Required>Y</Required>
|
||||
</validate_server_cn>
|
||||
<auth_nocache type="BooleanField">
|
||||
<default>0</default>
|
||||
<Required>N</Required>
|
||||
</auth_nocache>
|
||||
<plain_config type="TextField"/>
|
||||
</server>
|
||||
</servers>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user