From 703ec1bbbd61541ca3877a999674b39f4be7bc96 Mon Sep 17 00:00:00 2001 From: Tianling Shen Date: Wed, 20 Nov 2024 20:14:10 +0800 Subject: [PATCH] feat(client): update sniff protocol support Signed-off-by: Tianling Shen --- .../resources/view/homeproxy/client.js | 33 +++++++++++++++++-- 1 file changed, 30 insertions(+), 3 deletions(-) diff --git a/htdocs/luci-static/resources/view/homeproxy/client.js b/htdocs/luci-static/resources/view/homeproxy/client.js index d79359ee..ca18b487 100644 --- a/htdocs/luci-static/resources/view/homeproxy/client.js +++ b/htdocs/luci-static/resources/view/homeproxy/client.js @@ -480,10 +480,30 @@ return view.extend({ so = ss.taboption('field_other', form.MultiValue, 'protocol', _('Protocol'), _('Sniffed protocol, see Sniff for details.')); + if (features.version.localeCompare('1.10.0', undefined, { numeric: true, sensitivity: 'base' }) >= 0) { + so.value('bittorrent', _('BitTorrent')); + so.value('dtls', _('DTLS')); + } so.value('http', _('HTTP')); - so.value('tls', _('TLS')); so.value('quic', _('QUIC')); + if (features.version.localeCompare('1.10.0', undefined, { numeric: true, sensitivity: 'base' }) >= 0) { + so.value('rdp', _('RDP')); + so.value('ssh', _('SSH')); + } so.value('stun', _('STUN')); + so.value('tls', _('TLS')); + + if (features.version.localeCompare('1.10.0', undefined, { numeric: true, sensitivity: 'base' }) >= 0) { + so = ss.taboption('field_other', form.Value, 'client', _('Client'), + _('Sniffed client type (QUIC client type or SSH client name).')); + so.value('chromium', _('Chromium / Cronet')); + so.value('firefox', _('Firefox / uquic firefox')); + so.value('quic-go', _('quic-go / uquic chrome')); + so.value('safari', _('Safari / Apple Network API')); + so.depends('protocol', 'quic'); + so.depends('protocol', 'ssh'); + so.modalonly = true; + } so = ss.taboption('field_other', form.ListValue, 'network', _('Network')); so.value('tcp', _('TCP')); @@ -825,11 +845,18 @@ return view.extend({ so = ss.taboption('field_other', form.MultiValue, 'protocol', _('Protocol'), _('Sniffed protocol, see Sniff for details.')); + if (features.version.localeCompare('1.10.0', undefined, { numeric: true, sensitivity: 'base' }) >= 0) { + so.value('bittorrent', _('BitTorrent')); + so.value('dtls', _('DTLS')); + } so.value('http', _('HTTP')); - so.value('tls', _('TLS')); so.value('quic', _('QUIC')); - so.value('dns', _('DNS')); + if (features.version.localeCompare('1.10.0', undefined, { numeric: true, sensitivity: 'base' }) >= 0) { + so.value('rdp', _('RDP')); + so.value('ssh', _('SSH')); + } so.value('stun', _('STUN')); + so.value('tls', _('TLS')); so = ss.taboption('field_host', form.DynamicList, 'domain', _('Domain name'), _('Match full domain.'));