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
4b4e32b7
Commit
4b4e32b7
authored
Jan 10, 2016
by
Ad Schellevis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(legacy, ipsec) fix spacing
parent
9b5aa653
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
265 additions
and
280 deletions
+265
-280
vpn_ipsec.php
src/www/vpn_ipsec.php
+265
-280
No files found.
src/www/vpn_ipsec.php
View file @
4b4e32b7
...
@@ -323,8 +323,7 @@ $( document ).ready(function() {
...
@@ -323,8 +323,7 @@ $( document ).ready(function() {
<tbody>
<tbody>
<?php
<?php
$i
=
0
;
$i
=
0
;
foreach
(
$pconfig
[
'phase1'
]
as
$ph1ent
)
:
foreach
(
$pconfig
[
'phase1'
]
as
$ph1ent
)
:?>
?>
<
tr
>
<
tr
>
<
td
>
<
td
>
<
input
type
=
"checkbox"
name
=
"p1entry[]"
value
=
"<?=
$i
;?>"
/>
<
input
type
=
"checkbox"
name
=
"p1entry[]"
value
=
"<?=
$i
;?>"
/>
...
@@ -340,7 +339,7 @@ foreach ($pconfig['phase1'] as $ph1ent) :
...
@@ -340,7 +339,7 @@ foreach ($pconfig['phase1'] as $ph1ent) :
</td>
</td>
<td>
<td>
<?php
<?php
if
(
!
empty
(
$ph1ent
[
'interface'
]))
{
if
(
!
empty
(
$ph1ent
[
'interface'
]))
{
$iflabels
=
get_configured_interface_with_descr
();
$iflabels
=
get_configured_interface_with_descr
();
$carplist
=
get_configured_carp_interface_list
();
$carplist
=
get_configured_carp_interface_list
();
...
@@ -363,10 +362,9 @@ if (!empty($ph1ent['interface'])) {
...
@@ -363,10 +362,9 @@ if (!empty($ph1ent['interface'])) {
$iflabels
[
$name
]
=
"GW Group
{
$name
}
"
;
$iflabels
[
$name
]
=
"GW Group
{
$name
}
"
;
}
}
$if
=
$iflabels
[
$ph1ent
[
'interface'
]];
$if
=
$iflabels
[
$ph1ent
[
'interface'
]];
}
else
{
}
else
{
$if
=
"WAN"
;
$if
=
"WAN"
;
}
}
?>
?>
<?=
htmlspecialchars
(
$if
);
?>
<?=
htmlspecialchars
(
$if
);
?>
<?=
!
isset
(
$ph1ent
[
'mobile'
])
?
<?=
!
isset
(
$ph1ent
[
'mobile'
])
?
$ph1ent
[
'remote-gateway'
]
$ph1ent
[
'remote-gateway'
]
...
@@ -374,18 +372,19 @@ if (!empty($ph1ent['interface'])) {
...
@@ -374,18 +372,19 @@ if (!empty($ph1ent['interface'])) {
"<strong>"
.
gettext
(
"Mobile Client"
)
.
"</strong>"
;
"<strong>"
.
gettext
(
"Mobile Client"
)
.
"</strong>"
;
?>
?>
</td>
</td>
<td>
<?=
$ph1ent
[
'mode'
];
?>
</td>
<td>
<?=
htmlspecialchars
(
$ph1ent
[
'mode'
]);
?>
</td>
<td>
<td>
<?=
$p1_ealgos
[
$ph1ent
[
'encryption-algorithm'
][
'name'
]][
'name'
];
?>
<?=
$p1_ealgos
[
$ph1ent
[
'encryption-algorithm'
][
'name'
]][
'name'
];
?>
<?php
<?php
if
(
!
empty
(
$ph1ent
[
'encryption-algorithm'
][
'keylen'
]))
{
if
(
!
empty
(
$ph1ent
[
'encryption-algorithm'
][
'keylen'
]))
{
if
(
$ph1ent
[
'encryption-algorithm'
][
'keylen'
]
==
"auto"
)
{
if
(
$ph1ent
[
'encryption-algorithm'
][
'keylen'
]
==
"auto"
)
{
echo
" ("
.
gettext
(
"auto"
)
.
")"
;
echo
" ("
.
gettext
(
"auto"
)
.
")"
;
}
else
{
}
else
{
echo
" (
{
$ph1ent
[
'encryption-algorithm'
][
'keylen'
]
}
"
.
gettext
(
"bits"
)
.
")"
;
echo
" (
{
$ph1ent
[
'encryption-algorithm'
][
'keylen'
]
}
"
.
gettext
(
"bits"
)
.
")"
;
}
}
}
}
?>
?>
</td>
</td>
<td>
<td>
<?=
strtoupper
(
$ph1ent
[
'hash-algorithm'
]);
?>
<?=
strtoupper
(
$ph1ent
[
'hash-algorithm'
]);
?>
...
@@ -414,22 +413,20 @@ if (!empty($ph1ent['encryption-algorithm']['keylen'])) {
...
@@ -414,22 +413,20 @@ if (!empty($ph1ent['encryption-algorithm']['keylen'])) {
title=
"
<?=
gettext
(
"clone phase1 entry"
);
?>
"
data-toggle=
"tooltip"
data-placement=
"left"
>
title=
"
<?=
gettext
(
"clone phase1 entry"
);
?>
"
data-toggle=
"tooltip"
data-placement=
"left"
>
<span
class=
"fa fa-clone text-muted"
></span>
<span
class=
"fa fa-clone text-muted"
></span>
</a>
</a>
<?php
endif
;
<?php
?>
endif
;
?>
</td>
</td>
</tr>
</tr>
<tr>
<tr>
<td
colspan=
"9"
>
<td
colspan=
"9"
>
<?php
<?php
$phase2count
=
0
;
$phase2count
=
0
;
foreach
(
$pconfig
[
'phase2'
]
as
$ph2ent
)
{
foreach
(
$pconfig
[
'phase2'
]
as
$ph2ent
)
{
if
(
$ph2ent
[
'ikeid'
]
!=
$ph1ent
[
'ikeid'
])
{
if
(
$ph2ent
[
'ikeid'
]
!=
$ph1ent
[
'ikeid'
])
{
continue
;
continue
;
}
}
$phase2count
++
;
$phase2count
++
;
}
}
?>
$fr_prefix
=
"frp2
{
$i
}
"
;
?>
<div
id=
"shph2but-
<?=
$i
?>
"
>
<div
id=
"shph2but-
<?=
$i
?>
"
>
<button
class=
"act_show_p2 btn btn-xs"
type=
"button"
data-id=
"
<?=
$i
?>
"
>
<button
class=
"act_show_p2 btn btn-xs"
type=
"button"
data-id=
"
<?=
$i
?>
"
>
<i
class=
"fa fa-plus"
></i>
<?php
printf
(
gettext
(
"Show %s Phase-2 entries"
),
$phase2count
);
?>
<i
class=
"fa fa-plus"
></i>
<?php
printf
(
gettext
(
"Show %s Phase-2 entries"
),
$phase2count
);
?>
...
@@ -453,12 +450,10 @@ foreach ($pconfig['phase2'] as $ph2ent) {
...
@@ -453,12 +450,10 @@ foreach ($pconfig['phase2'] as $ph2ent) {
<tbody>
<tbody>
<?php
<?php
$j
=
0
;
$j
=
0
;
foreach
(
$pconfig
[
'phase2'
]
as
$ph2index
=>
$ph2ent
)
:
foreach
(
$pconfig
[
'phase2'
]
as
$ph2index
=>
$ph2ent
)
:
if
(
$ph2ent
[
'ikeid'
]
!=
$ph1ent
[
'ikeid'
])
{
if
(
$ph2ent
[
'ikeid'
]
!=
$ph1ent
[
'ikeid'
])
{
continue
;
continue
;
}
}
?>
?>
<tr>
<tr>
<td>
<td>
<input
type=
"checkbox"
name=
"p2entry[]"
value=
"
<?=
$ph2index
;
?>
"
/>
<input
type=
"checkbox"
name=
"p2entry[]"
value=
"
<?=
$ph2index
;
?>
"
/>
...
@@ -472,24 +467,23 @@ foreach ($pconfig['phase2'] as $ph2index => $ph2ent) :
...
@@ -472,24 +467,23 @@ foreach ($pconfig['phase2'] as $ph2index => $ph2ent) :
</td>
</td>
<td>
<?=
$ph2ent
[
'mode'
];
?>
</td>
<td>
<?=
$ph2ent
[
'mode'
];
?>
</td>
<?php
<?php
if
((
$ph2ent
[
'mode'
]
==
"tunnel"
)
||
(
$ph2ent
[
'mode'
]
==
"tunnel6"
))
:
if
((
$ph2ent
[
'mode'
]
==
"tunnel"
)
||
(
$ph2ent
[
'mode'
]
==
"tunnel6"
))
:?>
?>
<
td
>
<td>
<?=
ipsec_idinfo_to_text
(
$ph2ent
[
'localid'
]);
?>
<?=
ipsec_idinfo_to_text
(
$ph2ent
[
'localid'
]);
?>
</td>
</td>
<td>
<td>
<?=
ipsec_idinfo_to_text
(
$ph2ent
[
'remoteid'
]);
?>
<?=
ipsec_idinfo_to_text
(
$ph2ent
[
'remoteid'
]);
?>
</td>
</td>
<?php
else
:
<?php
?>
<td>
</td>
else
:?>
<
td
>&
nbsp
;
</
td
>
<
td
>&
nbsp
;
</
td
>
<
td
>&
nbsp
;
</
td
>
<?
php
<?
php
endif
;
endif
;
?>
?>
<td>
<?=
$p2_protos
[
$ph2ent
[
'protocol'
]];
?>
</td>
<td>
<?=
$p2_protos
[
$ph2ent
[
'protocol'
]];
?>
</td>
<td>
<td>
<?php
<?php
foreach
(
$ph2ent
[
'encryption-algorithm-option'
]
as
$k
=>
$ph2ea
)
{
foreach
(
$ph2ent
[
'encryption-algorithm-option'
]
as
$k
=>
$ph2ea
)
{
if
(
$k
>
0
)
{
if
(
$k
>
0
)
{
echo
", "
;
echo
", "
;
}
}
...
@@ -501,20 +495,18 @@ foreach ($ph2ent['encryption-algorithm-option'] as $k => $ph2ea) {
...
@@ -501,20 +495,18 @@ foreach ($ph2ent['encryption-algorithm-option'] as $k => $ph2ea) {
echo
" (
{
$ph2ea
[
'keylen'
]
}
"
.
gettext
(
"bits"
)
.
")"
;
echo
" (
{
$ph2ea
[
'keylen'
]
}
"
.
gettext
(
"bits"
)
.
")"
;
}
}
}
}
}
}
?>
?>
</td>
</td>
<td>
<td>
<?php
<?php
if
(
!
empty
(
$ph2ent
[
'hash-algorithm-option'
])
&&
is_array
(
$ph2ent
[
'hash-algorithm-option'
]))
{
if
(
!
empty
(
$ph2ent
[
'hash-algorithm-option'
])
&&
is_array
(
$ph2ent
[
'hash-algorithm-option'
]))
{
foreach
(
$ph2ent
[
'hash-algorithm-option'
]
as
$k
=>
$ph2ha
)
{
foreach
(
$ph2ent
[
'hash-algorithm-option'
]
as
$k
=>
$ph2ha
)
{
if
(
$k
)
{
if
(
$k
)
{
echo
", "
;
echo
", "
;
}
}
echo
$p2_halgos
[
$ph2ha
];
echo
$p2_halgos
[
$ph2ha
];
}
}
}
}
?>
?>
</td>
</td>
<td>
<td>
<button
data-id=
"
<?=
$j
;
?>
"
data-act=
"movep2"
<button
data-id=
"
<?=
$j
;
?>
"
data-act=
"movep2"
...
@@ -543,29 +535,24 @@ if (!empty($ph2ent['hash-algorithm-option']) && is_array($ph2ent['hash-algorithm
...
@@ -543,29 +535,24 @@ if (!empty($ph2ent['hash-algorithm-option']) && is_array($ph2ent['hash-algorithm
</tr>
</tr>
<?php
<?php
$j
++
;
$j
++
;
endforeach
;
endforeach
;
?>
?>
<tr>
<tr>
<td
colspan=
"8"
></td>
<td
colspan=
"8"
></td>
<td>
<td>
<?php
if
(
$j
>
0
)
:
<?php
?>
if
(
$j
>
0
)
:
?>
<
button
data
-
id
=
"<?=
$j
+1; ?>"
data
-
act
=
"movep2"
type
=
"submit"
<
button
data
-
id
=
"<?=
$j
+1; ?>"
data
-
act
=
"movep2"
type
=
"submit"
title
=
"<?=gettext("
move
selected
phase
2
entries
to
end
");?>"
data
-
toggle
=
"tooltip"
data
-
placement
=
"left"
title
=
"<?=gettext("
move
selected
phase
2
entries
to
end
");?>"
data
-
toggle
=
"tooltip"
data
-
placement
=
"left"
class
="
act_move
btn
btn
-
default
btn
-
xs
">
class
="
act_move
btn
btn
-
default
btn
-
xs
">
<span class="
glyphicon
glyphicon
-
arrow
-
down
"></span>
<span class="
glyphicon
glyphicon
-
arrow
-
down
"></span>
</button>
</button>
<?php
endif
;
?>
<?php
if
(
$j
>
0
)
:
?>
<button data-id="
x
" type="
submit
" title="
<?=
gettext
(
"delete selected phase 2 entries"
);
?>
" data-toggle="tooltip" data-placement="left"
<button data-id="
x
" type="
submit
" title="
<?=
gettext
(
"delete selected phase 2 entries"
);
?>
" data-toggle="tooltip" data-placement="left"
class="act_delete_p2 btn btn-default btn-xs">
class="act_delete_p2 btn btn-default btn-xs">
<span
class=
"glyphicon glyphicon-remove"
></span>
<span
class=
"glyphicon glyphicon-remove"
></span>
</button>
</button>
<?php
endif
;
<?php
?>
endif
;
?>
<a
href=
"vpn_ipsec_phase2.php?ikeid=
<?=
$ph1ent
[
'ikeid'
];
?><?=
isset
(
$ph1ent
[
'mobile'
])
?
"&mobile=true"
:
""
;
?>
"
class=
"btn btn-default btn-xs"
<a
href=
"vpn_ipsec_phase2.php?ikeid=
<?=
$ph1ent
[
'ikeid'
];
?><?=
isset
(
$ph1ent
[
'mobile'
])
?
"&mobile=true"
:
""
;
?>
"
class=
"btn btn-default btn-xs"
title=
"
<?=
gettext
(
"add phase 2 entry"
);
?>
"
data-toggle=
"tooltip"
data-placement=
"left"
>
title=
"
<?=
gettext
(
"add phase 2 entry"
);
?>
"
data-toggle=
"tooltip"
data-placement=
"left"
>
<span
alt=
"add"
class=
"glyphicon glyphicon-plus"
></span>
<span
alt=
"add"
class=
"glyphicon glyphicon-plus"
></span>
...
@@ -579,8 +566,7 @@ endforeach;
...
@@ -579,8 +566,7 @@ endforeach;
</tr>
</tr>
<?php
<?php
$i
++
;
$i
++
;
endforeach
;
// $a_phase1 as $ph1ent
endforeach
;
?>
?>
<tr>
<tr>
<td
colspan=
"8"
>
</td>
<td
colspan=
"8"
>
</td>
<td>
<td>
...
@@ -626,5 +612,4 @@ endforeach; // $a_phase1 as $ph1ent
...
@@ -626,5 +612,4 @@ endforeach; // $a_phase1 as $ph1ent
</div>
</div>
</div>
</div>
</section>
</section>
<?php
include
(
"foot.inc"
);
<?php
include
(
"foot.inc"
);
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