Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpnSense
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
OpnSense
Commits
8c05a136
Commit
8c05a136
authored
Oct 13, 2015
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vpn/openvpn: collapse into menu
parent
87cfad6a
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
24 additions
and
86 deletions
+24
-86
Menu.xml
src/opnsense/mvc/app/models/OPNsense/Base/Menu/Menu.xml
+15
-7
diag_logs_openvpn.php
src/www/diag_logs_openvpn.php
+0
-1
shortcuts.inc
src/www/shortcuts.inc
+0
-12
status_openvpn.php
src/www/status_openvpn.php
+1
-3
vpn_openvpn_client.php
src/www/vpn_openvpn_client.php
+1
-13
vpn_openvpn_csc.php
src/www/vpn_openvpn_csc.php
+2
-14
vpn_openvpn_export.php
src/www/vpn_openvpn_export.php
+3
-14
vpn_openvpn_export_shared.php
src/www/vpn_openvpn_export_shared.php
+1
-10
vpn_openvpn_server.php
src/www/vpn_openvpn_server.php
+1
-12
No files found.
src/opnsense/mvc/app/models/OPNsense/Base/Menu/Menu.xml
View file @
8c05a136
...
...
@@ -234,12 +234,21 @@
<Edit
url=
"/vpn_l2tp_users_edit.php*"
/>
</Users>
</L2TP>
<OpenVPN
url=
"/vpn_openvpn_server.php"
>
<ServerEdit
url=
"/vpn_openvpn_server.php?*"
/>
<Client
url=
"/vpn_openvpn_client.php*"
/>
<CSC
url=
"/vpn_openvpn_csc.php*"
/>
<ClientExport
url=
"/vpn_openvpn_export.php*"
/>
<SharedKeyExport
url=
"/vpn_openvpn_export_shared.php"
/>
<OpenVPN
cssClass=
"fa fa-road"
>
<Client
VisibleName=
"Client Settings"
url=
"/vpn_openvpn_client.php"
>
<Edit
url=
"/vpn_openvpn_client.php?*"
/>
</Client>
<CSC
VisibleName=
"Client Specific Overrides"
url=
"/vpn_openvpn_csc.php"
>
<Edit
url=
"/vpn_openvpn_csc.php?*"
/>
</CSC>
<ClientExport
VisibleName=
"Client Export"
url=
"/vpn_openvpn_export.php"
>
<Edit
url=
"/vpn_openvpn_export.php?*"
/>
</ClientExport>
<ClientSharedKeyExport
VisibleName=
"Shared Key Export"
url=
"/vpn_openvpn_export_shared.php"
/>
<Server
VisibleName=
"Server Settings"
url=
"/vpn_openvpn_server.php"
>
<Edit
url=
"/vpn_openvpn_server.php?*"
/>
</Server>
<Status
VisibleName=
"Connection Status"
url=
"/status_openvpn.php"
/>
</OpenVPN>
<PPTP
cssClass=
"fa fa-road"
>
<Settings
url=
"/vpn_pptp.php"
/>
...
...
@@ -269,7 +278,6 @@
<VirtualServers
url=
"/status_lb_vs.php"
/>
</LoadBalancer>
<NTP
url=
"/status_ntpd.php"
/>
<OpenVPN
url=
"/status_openvpn.php"
/>
<Services
url=
"/status_services.php"
>
<ServicesActions
url=
"/status_services.php?*"
/>
</Services>
...
...
src/www/diag_logs_openvpn.php
View file @
8c05a136
...
...
@@ -35,7 +35,6 @@ require_once("system.inc");
require_once
(
"interfaces.inc"
);
$pgtitle
=
array
(
gettext
(
"Status"
),
gettext
(
"System logs"
),
gettext
(
"OpenVPN"
));
$shortcut_section
=
"openvpn"
;
$openvpn_logfile
=
'/var/log/openvpn.log'
;
...
...
src/www/shortcuts.inc
View file @
8c05a136
...
...
@@ -70,12 +70,6 @@ function get_shortcut_main_link($shortcut_section, $addspace = true, $service =
return
""
;
$space
=
(
$addspace
)
?
" "
:
""
;
switch
(
$shortcut_section
)
{
case
"openvpn"
:
if
(
!
empty
(
$service
[
'mode'
])
&&
is_numeric
(
$service
[
'id'
]))
$link
=
"vpn_openvpn_
{
$service
[
'mode'
]
}
.php?act=edit&id=
{
$service
[
'id'
]
}
"
;
else
$link
=
$shortcuts
[
$shortcut_section
][
'main'
];
break
;
case
"captiveportal"
:
if
(
!
empty
(
$service
[
'zone'
]))
$link
=
"services_captiveportal.php?zone=
{
$service
[
'zone'
]
}
"
;
...
...
@@ -184,12 +178,6 @@ $shortcuts['ipsec']['log'] = "diag_logs_ipsec.php";
$shortcuts
[
'ipsec'
][
'status'
]
=
"diag_ipsec.php"
;
$shortcuts
[
'ipsec'
][
'service'
]
=
"ipsec"
;
$shortcuts
[
'openvpn'
]
=
array
();
$shortcuts
[
'openvpn'
][
'main'
]
=
"vpn_openvpn_server.php"
;
$shortcuts
[
'openvpn'
][
'log'
]
=
"diag_logs_openvpn.php"
;
$shortcuts
[
'openvpn'
][
'status'
]
=
"status_openvpn.php"
;
$shortcuts
[
'openvpn'
][
'service'
]
=
"openvpn"
;
$shortcuts
[
'firewall'
]
=
array
();
$shortcuts
[
'firewall'
][
'main'
]
=
"firewall_rules.php"
;
$shortcuts
[
'firewall'
][
'log'
]
=
"diag_logs_filter.php"
;
...
...
src/www/status_openvpn.php
View file @
8c05a136
...
...
@@ -66,9 +66,7 @@ function kill_client($port, $remipp) {
return
$killed
;
}
$pgtitle
=
array
(
gettext
(
"Status"
),
gettext
(
"OpenVPN"
));
$shortcut_section
=
"openvpn"
;
$pgtitle
=
array
(
gettext
(
'VPN'
),
gettext
(
'OpenVPN'
),
gettext
(
'Connection Status'
));
if
(
$_SERVER
[
'REQUEST_METHOD'
]
===
'GET'
)
{
$vpnid
=
0
;
...
...
src/www/vpn_openvpn_client.php
View file @
8c05a136
...
...
@@ -32,9 +32,7 @@ require_once("openvpn.inc");
require_once
(
"services.inc"
);
require_once
(
"interfaces.inc"
);
$pgtitle
=
array
(
gettext
(
"OpenVPN"
),
gettext
(
"Client"
));
$shortcut_section
=
"openvpn"
;
$pgtitle
=
array
(
gettext
(
'VPN'
),
gettext
(
'OpenVPN'
),
gettext
(
'Client'
));
if
(
!
isset
(
$config
[
'openvpn'
][
'openvpn-client'
]))
{
$config
[
'openvpn'
][
'openvpn-client'
]
=
array
();
...
...
@@ -459,16 +457,6 @@ if (isset($savemsg)) {
<section
class=
"col-xs-12"
>
<?php
$tab_array
=
array
();
$tab_array
[]
=
array
(
gettext
(
"Server"
),
false
,
"vpn_openvpn_server.php"
);
$tab_array
[]
=
array
(
gettext
(
"Client"
),
true
,
"vpn_openvpn_client.php"
);
$tab_array
[]
=
array
(
gettext
(
"Client Specific Overrides"
),
false
,
"vpn_openvpn_csc.php"
);
$tab_array
[]
=
array
(
gettext
(
"Client Export"
),
false
,
"vpn_openvpn_export.php"
);
$tab_array
[]
=
array
(
gettext
(
"Shared Key Export"
),
false
,
"vpn_openvpn_export_shared.php"
);
display_top_tabs
(
$tab_array
);
?>
<div
class=
"tab-content content-box col-xs-12"
>
<?php
if
(
$act
==
"new"
||
$act
==
"edit"
)
:
?>
...
...
src/www/vpn_openvpn_csc.php
View file @
8c05a136
<?php
/*
Copyright (C) 2014-2015 Deciso B.V.
Copyright (C) 2008 Shrew Soft Inc.
...
...
@@ -30,9 +31,7 @@ require_once("openvpn.inc");
require_once
(
"services.inc"
);
require_once
(
"interfaces.inc"
);
$pgtitle
=
array
(
gettext
(
"OpenVPN"
),
gettext
(
"Client Specific Override"
));
$shortcut_section
=
"openvpn"
;
$pgtitle
=
array
(
gettext
(
'VPN'
),
gettext
(
'OpenVPN'
),
gettext
(
'Client Specific Overrides'
));
// define all fields used in this form
$all_form_fields
=
"custom_options,disable,common_name,block,description
...
...
@@ -316,17 +315,6 @@ if ($act!="new" && $act!="edit") {
<section
class=
"col-xs-12"
>
<?php
$tab_array
=
array
();
$tab_array
[]
=
array
(
gettext
(
"Server"
),
false
,
"vpn_openvpn_server.php"
);
$tab_array
[]
=
array
(
gettext
(
"Client"
),
false
,
"vpn_openvpn_client.php"
);
$tab_array
[]
=
array
(
gettext
(
"Client Specific Overrides"
),
true
,
"vpn_openvpn_csc.php"
);
$tab_array
[]
=
array
(
gettext
(
"Client Export"
),
false
,
"vpn_openvpn_export.php"
);
$tab_array
[]
=
array
(
gettext
(
"Shared Key Export"
),
false
,
"vpn_openvpn_export_shared.php"
);
display_top_tabs
(
$tab_array
);
?>
<div
class=
"tab-content content-box col-xs-12"
>
<?php
if
(
$act
==
"new"
||
$act
==
"edit"
)
:
...
...
src/www/vpn_openvpn_export.php
View file @
8c05a136
<?php
/*
vpn_openvpn_export.php
/*
Copyright (C) 2008 Shrew Soft Inc.
Copyright (C) 2010 Ermal Luçi
All rights reserved.
...
...
@@ -26,9 +25,8 @@
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
DISABLE_PHP_LINT_CHECKING
*/
require_once
(
"guiconfig.inc"
);
require_once
(
"openvpn.inc"
);
require_once
(
"filter.inc"
);
...
...
@@ -38,7 +36,7 @@ require_once("openvpn-client-export.inc");
global
$current_openvpn_version
,
$current_openvpn_version_rev
;
$pgtitle
=
array
(
"OpenVPN"
,
"Client Export Utility"
);
$pgtitle
=
array
(
gettext
(
'VPN'
),
gettext
(
'OpenVPN'
),
gettext
(
'Client Export'
)
);
$ras_server
=
array
();
if
(
isset
(
$config
[
'openvpn'
][
'openvpn-server'
]))
{
...
...
@@ -615,15 +613,6 @@ if (isset($savemsg)) {
<div
class=
"container-fluid"
>
<div
class=
"row"
>
<section
class=
"col-xs-12"
>
<?php
$tab_array
=
array
();
$tab_array
[]
=
array
(
gettext
(
"Server"
),
false
,
"vpn_openvpn_server.php"
);
$tab_array
[]
=
array
(
gettext
(
"Client"
),
false
,
"vpn_openvpn_client.php"
);
$tab_array
[]
=
array
(
gettext
(
"Client Specific Overrides"
),
false
,
"vpn_openvpn_csc.php"
);
$tab_array
[]
=
array
(
gettext
(
"Client Export"
),
true
,
"vpn_openvpn_export.php"
);
$tab_array
[]
=
array
(
gettext
(
"Shared Key Export"
),
false
,
"vpn_openvpn_export_shared.php"
);
display_top_tabs
(
$tab_array
);
?>
<div
class=
"tab-content content-box col-xs-12"
>
<div
class=
"table-responsive"
>
<table
width=
"100%"
border=
"0"
class=
"table table-striped"
cellpadding=
"0"
cellspacing=
"0"
>
...
...
src/www/vpn_openvpn_export_shared.php
View file @
8c05a136
...
...
@@ -34,7 +34,7 @@ require_once("pfsense-utils.inc");
require_once
(
"interfaces.inc"
);
require_once
(
"openvpn-client-export.inc"
);
$pgtitle
=
array
(
"OpenVPN"
,
"Client Export Utility"
);
$pgtitle
=
array
(
gettext
(
'VPN'
),
gettext
(
'OpenVPN'
),
gettext
(
'Shared Key Export'
)
);
$ras_server
=
array
();
if
(
isset
(
$config
[
'openvpn'
][
'openvpn-server'
]))
{
...
...
@@ -294,15 +294,6 @@ if (isset($savemsg)) {
<div
class=
"container-fluid"
>
<div
class=
"row"
>
<section
class=
"col-xs-12"
>
<?php
$tab_array
=
array
();
$tab_array
[]
=
array
(
gettext
(
"Server"
),
false
,
"vpn_openvpn_server.php"
);
$tab_array
[]
=
array
(
gettext
(
"Client"
),
false
,
"vpn_openvpn_client.php"
);
$tab_array
[]
=
array
(
gettext
(
"Client Specific Overrides"
),
false
,
"vpn_openvpn_csc.php"
);
$tab_array
[]
=
array
(
gettext
(
"Client Export"
),
false
,
"vpn_openvpn_export.php"
);
$tab_array
[]
=
array
(
gettext
(
"Shared Key Export"
),
true
,
"vpn_openvpn_export_shared.php"
);
display_top_tabs
(
$tab_array
);
?>
<div
class=
"tab-content content-box col-xs-12"
>
<div
class=
"table-responsive"
>
<table
width=
"100%"
border=
"0"
class=
"table table-striped"
cellpadding=
"0"
cellspacing=
"0"
>
...
...
src/www/vpn_openvpn_server.php
View file @
8c05a136
...
...
@@ -395,8 +395,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
}
}
}
$pgtitle
=
array
(
gettext
(
"OpenVPN"
),
gettext
(
"Server"
));
$shortcut_section
=
"openvpn"
;
$pgtitle
=
array
(
gettext
(
'VPN'
),
gettext
(
'OpenVPN'
),
gettext
(
'Server'
));
include
(
"head.inc"
);
...
...
@@ -707,16 +706,6 @@ function tuntap_change() {
<section
class=
"col-xs-12"
>
<?php
$tab_array
=
array
();
$tab_array
[]
=
array
(
gettext
(
"Server"
),
true
,
"vpn_openvpn_server.php"
);
$tab_array
[]
=
array
(
gettext
(
"Client"
),
false
,
"vpn_openvpn_client.php"
);
$tab_array
[]
=
array
(
gettext
(
"Client Specific Overrides"
),
false
,
"vpn_openvpn_csc.php"
);
$tab_array
[]
=
array
(
gettext
(
"Client Export"
),
false
,
"vpn_openvpn_export.php"
);
$tab_array
[]
=
array
(
gettext
(
"Shared Key Export"
),
false
,
"vpn_openvpn_export_shared.php"
);
display_top_tabs
(
$tab_array
);
?>
<div
class=
"tab-content content-box col-xs-12"
>
<?php
if
(
$act
==
"new"
||
$act
==
"edit"
)
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment