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
96bd8557
Commit
96bd8557
authored
Mar 24, 2015
by
Franco Fichtner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
openvpn: remove obsolete probing for /etc/version
parent
9120b966
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
12 deletions
+6
-12
openvpn-client-export.inc
src/pkg/openvpn-client-export.inc
+6
-12
No files found.
src/pkg/openvpn-client-export.inc
View file @
96bd8557
<?php
/*
openvpn-client-export.inc
Copyright (C) 2009 Scott Ullrich <sullrich@gmail.com>
Copyright (C) 2008 Shrew Soft Inc
Copyright (C) 2010 Ermal Luci
All rights reserved.
Parts of this code was originally based on vpn_ipsec_sad.php
Copyright (C) 2003-2004 Manuel Kasper
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
...
...
@@ -179,7 +177,6 @@ function openvpn_client_export_validate_config($srvid, $usrid, $crtid) {
function
openvpn_client_export_config
(
$srvid
,
$usrid
,
$crtid
,
$useaddr
,
$verifyservercn
,
$randomlocalport
,
$usetoken
,
$nokeys
=
false
,
$proxy
,
$expformat
=
"baseconf"
,
$outpass
=
""
,
$skiptls
=
false
,
$doslines
=
false
,
$openvpnmanager
,
$advancedoptions
=
""
)
{
global
$config
,
$input_errors
,
$g
;
$pfs_version
=
substr
(
trim
(
file_get_contents
(
"/etc/version"
)),
0
,
3
);
$nl
=
(
$doslines
)
?
"
\r\n
"
:
"
\n
"
;
$conf
=
""
;
...
...
@@ -327,17 +324,14 @@ function openvpn_client_export_config($srvid, $usrid, $crtid, $useaddr, $verifys
// add optional settings
if
(
!
empty
(
$settings
[
'compression'
]))
{
if
(
$pfs_version
>
2.1
)
$conf
.=
"comp-lzo
{
$settings
[
'compression'
]
}{
$nl
}
"
;
else
$conf
.=
"comp-lzo
{
$nl
}
"
;
$conf
.=
"comp-lzo
{
$settings
[
'compression'
]
}{
$nl
}
"
;
}
if
(
$settings
[
'passtos'
])
if
(
$settings
[
'passtos'
])
{
$conf
.=
"passtos
{
$nl
}
"
;
}
if
(
$openvpnmanager
)
{
if
(
$openvpnmanager
)
{
if
(
!
empty
(
$settings
[
'client_mgmt_port'
]))
{
$client_mgmt_port
=
$settings
[
'client_mgmt_port'
];
}
else
{
...
...
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