firewall.cgi XDP SYNPROXY UI option

only show XDP SYNPROXY option when protocol
TCP is selected.

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
This commit is contained in:
Vincent Li
2024-04-17 15:55:40 +00:00
parent 13bb8928c9
commit 56c5212374
2 changed files with 10 additions and 2 deletions

View File

@@ -130,9 +130,15 @@ print<<END;
// Check if we are dealing with a protocol, that knows ports.
if (\$.inArray(protocol, PROTOCOLS_WITH_PORTS) >= 0) {
if (protocol === "TCP") {
\$("#XDP_SYNPROXY").show();
} else {
\$("#XDP_SYNPROXY").hide();
}
\$("#PROTOCOL_PORTS").show();
} else {
\$("#PROTOCOL_PORTS").hide();
\$("#XDP_SYNPROXY").hide();
}
// Handle ICMP.
@@ -1928,7 +1934,7 @@ END
</tr>
</table>
<table width="100%" border="0" id="PROTOCOL_PORTS">
<table width="40%" border="0" id="XDP_SYNPROXY">
<tr>
<!-- #USE_SYNPROXY -->
<td>
@@ -1939,6 +1945,8 @@ END
<input type='checkbox' name='USE_SYNPROXY' id='USE_SYNPROXY' value="ON" $checked{'USE_SYNPROXY'}{'ON'}>
</td>
</tr>
</table>
<table width="100%" border="0" id="PROTOCOL_PORTS">
<tr>
<!-- #SOURCEPORT -->
<td>

View File

@@ -1254,7 +1254,7 @@
'fwdfw toggle' => 'Activate or deactivate',
'fwdfw togglelog' => 'Activate or deactivate logging',
'fwdfw use nat' => 'Use Network Address Translation (NAT)',
'fwdfw use synproxy' => 'Use XDP SYNPROXY acceleration',
'fwdfw use synproxy' => 'Use XDP TCP SYNPROXY acceleration:',
'fwdfw use srcport' => 'Source port:',
'fwdfw use srv' => 'Destination port:',
'fwdfw useless rule' => 'This rule is useless.',