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() {
<tbody>
<?php
$i
=
0
;
foreach
(
$pconfig
[
'phase1'
]
as
$ph1ent
)
:
?>
foreach
(
$pconfig
[
'phase1'
]
as
$ph1ent
)
:?>
<
tr
>
<
td
>
<
input
type
=
"checkbox"
name
=
"p1entry[]"
value
=
"<?=
$i
;?>"
/>
...
...
@@ -340,7 +339,7 @@ foreach ($pconfig['phase1'] as $ph1ent) :
</td>
<td>
<?php
if
(
!
empty
(
$ph1ent
[
'interface'
]))
{
if
(
!
empty
(
$ph1ent
[
'interface'
]))
{
$iflabels
=
get_configured_interface_with_descr
();
$carplist
=
get_configured_carp_interface_list
();
...
...
@@ -363,10 +362,9 @@ if (!empty($ph1ent['interface'])) {
$iflabels
[
$name
]
=
"GW Group
{
$name
}
"
;
}
$if
=
$iflabels
[
$ph1ent
[
'interface'
]];
}
else
{
}
else
{
$if
=
"WAN"
;
}
?>
}
?>
<?=
htmlspecialchars
(
$if
);
?>
<?=
!
isset
(
$ph1ent
[
'mobile'
])
?
$ph1ent
[
'remote-gateway'
]
...
...
@@ -374,18 +372,19 @@ if (!empty($ph1ent['interface'])) {
"<strong>"
.
gettext
(
"Mobile Client"
)
.
"</strong>"
;
?>
</td>
<td>
<?=
$ph1ent
[
'mode'
];
?>
</td>
<td>
<?=
htmlspecialchars
(
$ph1ent
[
'mode'
]);
?>
</td>
<td>
<?=
$p1_ealgos
[
$ph1ent
[
'encryption-algorithm'
][
'name'
]][
'name'
];
?>
<?php
if
(
!
empty
(
$ph1ent
[
'encryption-algorithm'
][
'keylen'
]))
{
if
(
!
empty
(
$ph1ent
[
'encryption-algorithm'
][
'keylen'
]))
{
if
(
$ph1ent
[
'encryption-algorithm'
][
'keylen'
]
==
"auto"
)
{
echo
" ("
.
gettext
(
"auto"
)
.
")"
;
}
else
{
echo
" (
{
$ph1ent
[
'encryption-algorithm'
][
'keylen'
]
}
"
.
gettext
(
"bits"
)
.
")"
;
}
}
?>
}
?>
</td>
<td>
<?=
strtoupper
(
$ph1ent
[
'hash-algorithm'
]);
?>
...
...
@@ -414,22 +413,20 @@ if (!empty($ph1ent['encryption-algorithm']['keylen'])) {
title=
"
<?=
gettext
(
"clone phase1 entry"
);
?>
"
data-toggle=
"tooltip"
data-placement=
"left"
>
<span
class=
"fa fa-clone text-muted"
></span>
</a>
<?php
endif
;
?>
<?php
endif
;
?>
</td>
</tr>
<tr>
<td
colspan=
"9"
>
<?php
$phase2count
=
0
;
foreach
(
$pconfig
[
'phase2'
]
as
$ph2ent
)
{
foreach
(
$pconfig
[
'phase2'
]
as
$ph2ent
)
{
if
(
$ph2ent
[
'ikeid'
]
!=
$ph1ent
[
'ikeid'
])
{
continue
;
}
$phase2count
++
;
}
$fr_prefix
=
"frp2
{
$i
}
"
;
?>
}
?>
<div
id=
"shph2but-
<?=
$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
);
?>
...
...
@@ -453,12 +450,10 @@ foreach ($pconfig['phase2'] as $ph2ent) {
<tbody>
<?php
$j
=
0
;
foreach
(
$pconfig
[
'phase2'
]
as
$ph2index
=>
$ph2ent
)
:
foreach
(
$pconfig
[
'phase2'
]
as
$ph2index
=>
$ph2ent
)
:
if
(
$ph2ent
[
'ikeid'
]
!=
$ph1ent
[
'ikeid'
])
{
continue
;
}
?>
}
?>
<tr>
<td>
<input
type=
"checkbox"
name=
"p2entry[]"
value=
"
<?=
$ph2index
;
?>
"
/>
...
...
@@ -472,24 +467,23 @@ foreach ($pconfig['phase2'] as $ph2index => $ph2ent) :
</td>
<td>
<?=
$ph2ent
[
'mode'
];
?>
</td>
<?php
if
((
$ph2ent
[
'mode'
]
==
"tunnel"
)
||
(
$ph2ent
[
'mode'
]
==
"tunnel6"
))
:
?>
<td>
if
((
$ph2ent
[
'mode'
]
==
"tunnel"
)
||
(
$ph2ent
[
'mode'
]
==
"tunnel6"
))
:?>
<
td
>
<?=
ipsec_idinfo_to_text
(
$ph2ent
[
'localid'
]);
?>
</td>
<td>
</td>
<td>
<?=
ipsec_idinfo_to_text
(
$ph2ent
[
'remoteid'
]);
?>
</td>
<?php
else
:
?>
<td>
</td>
</td>
<?php
else
:?>
<
td
>&
nbsp
;
</
td
>
<
td
>&
nbsp
;
</
td
>
<?
php
endif
;
?>
endif
;
?>
<td>
<?=
$p2_protos
[
$ph2ent
[
'protocol'
]];
?>
</td>
<td>
<?php
foreach
(
$ph2ent
[
'encryption-algorithm-option'
]
as
$k
=>
$ph2ea
)
{
foreach
(
$ph2ent
[
'encryption-algorithm-option'
]
as
$k
=>
$ph2ea
)
{
if
(
$k
>
0
)
{
echo
", "
;
}
...
...
@@ -501,20 +495,18 @@ foreach ($ph2ent['encryption-algorithm-option'] as $k => $ph2ea) {
echo
" (
{
$ph2ea
[
'keylen'
]
}
"
.
gettext
(
"bits"
)
.
")"
;
}
}
}
?>
}
?>
</td>
<td>
<?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
)
{
if
(
$k
)
{
echo
", "
;
}
echo
$p2_halgos
[
$ph2ha
];
}
}
?>
}
?>
</td>
<td>
<button
data-id=
"
<?=
$j
;
?>
"
data-act=
"movep2"
...
...
@@ -543,29 +535,24 @@ if (!empty($ph2ent['hash-algorithm-option']) && is_array($ph2ent['hash-algorithm
</tr>
<?php
$j
++
;
endforeach
;
?>
endforeach
;
?>
<tr>
<td
colspan=
"8"
></td>
<td>
<?php
if
(
$j
>
0
)
:
?>
<?php
if
(
$j
>
0
)
:
?>
<
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"
class
="
act_move
btn
btn
-
default
btn
-
xs
">
<span class="
glyphicon
glyphicon
-
arrow
-
down
"></span>
</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"
class="act_delete_p2 btn btn-default btn-xs">
<span
class=
"glyphicon glyphicon-remove"
></span>
</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"
title=
"
<?=
gettext
(
"add phase 2 entry"
);
?>
"
data-toggle=
"tooltip"
data-placement=
"left"
>
<span
alt=
"add"
class=
"glyphicon glyphicon-plus"
></span>
...
...
@@ -579,8 +566,7 @@ endforeach;
</tr>
<?php
$i
++
;
endforeach
;
// $a_phase1 as $ph1ent
?>
endforeach
;
?>
<tr>
<td
colspan=
"8"
>
</td>
<td>
...
...
@@ -626,5 +612,4 @@ endforeach; // $a_phase1 as $ph1ent
</div>
</div>
</section>
<?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