diff --git a/luci-app-homeproxy/htdocs/luci-static/resources/view/homeproxy/client.js b/luci-app-homeproxy/htdocs/luci-static/resources/view/homeproxy/client.js index 530f1bd13..d9bce5405 100644 --- a/luci-app-homeproxy/htdocs/luci-static/resources/view/homeproxy/client.js +++ b/luci-app-homeproxy/htdocs/luci-static/resources/view/homeproxy/client.js @@ -480,31 +480,25 @@ 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('bittorrent', _('BitTorrent')); so.value('dns', _('DNS')); - if (features.version.localeCompare('1.10.0', undefined, { numeric: true, sensitivity: 'base' }) >= 0) - so.value('dtls', _('DTLS')); + so.value('dtls', _('DTLS')); so.value('http', _('HTTP')); 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('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.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')); @@ -578,11 +572,9 @@ return view.extend({ _('Match process path.')); so.modalonly = true; - if (features.version.localeCompare('1.10.0', undefined, { numeric: true, sensitivity: 'base' }) >= 0) { - so = ss.taboption('field_other', form.DynamicList, 'process_path_regex', _('Process path (regex)'), - _('Match process path using regular expression.')); - so.modalonly = true; - } + so = ss.taboption('field_other', form.DynamicList, 'process_path_regex', _('Process path (regex)'), + _('Match process path using regular expression.')); + so.modalonly = true; so = ss.taboption('field_other', form.DynamicList, 'user', _('User'), _('Match user name.')); @@ -846,16 +838,12 @@ 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('bittorrent', _('BitTorrent')); + so.value('dtls', _('DTLS')); so.value('http', _('HTTP')); 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('rdp', _('RDP')); + so.value('ssh', _('SSH')); so.value('stun', _('STUN')); so.value('tls', _('TLS')); @@ -924,11 +912,9 @@ return view.extend({ _('Match process path.')); so.modalonly = true; - if (features.version.localeCompare('1.10.0', undefined, { numeric: true, sensitivity: 'base' }) >= 0) { - so = ss.taboption('field_other', form.DynamicList, 'process_path_regex', _('Process path (regex)'), - _('Match process path using regular expression.')); - so.modalonly = true; - } + so = ss.taboption('field_other', form.DynamicList, 'process_path_regex', _('Process path (regex)'), + _('Match process path using regular expression.')); + so.modalonly = true; so = ss.taboption('field_other', form.DynamicList, 'user', _('User'), _('Match user name.')); @@ -955,12 +941,10 @@ return view.extend({ so.default = so.disabled; so.modalonly = true; - if (features.version.localeCompare('1.10.0', undefined, { numeric: true, sensitivity: 'base' }) >= 0) { - so = ss.taboption('field_other', form.Flag, 'rule_set_ip_cidr_accept_empty', _('Accept empty query response'), - _('Make IP CIDR in rule-sets accept empty query response.')); - so.default = so.disabled; - so.modalonly = true; - } + so = ss.taboption('field_other', form.Flag, 'rule_set_ip_cidr_accept_empty', _('Accept empty query response'), + _('Make IP CIDR in rule-sets accept empty query response.')); + so.default = so.disabled; + so.modalonly = true; so = ss.taboption('field_other', form.Flag, 'invert', _('Invert'), _('Invert match result.')); diff --git a/luci-app-homeproxy/htdocs/luci-static/resources/view/homeproxy/node.js b/luci-app-homeproxy/htdocs/luci-static/resources/view/homeproxy/node.js index cd6137531..31ce172ec 100644 --- a/luci-app-homeproxy/htdocs/luci-static/resources/view/homeproxy/node.js +++ b/luci-app-homeproxy/htdocs/luci-static/resources/view/homeproxy/node.js @@ -1072,13 +1072,6 @@ function renderNodeSettings(section, data, features, main_node, routing_mode) { o.value('360'); o.value('android'); o.value('chrome'); - if (features.version.localeCompare('1.10.0', undefined, { numeric: true, sensitivity: 'base' }) < 0) { - o.value('chrome_psk'); - o.value('chrome_psk_shuffle'); - o.value('chrome_padding_psk_shuffle'); - o.value('chrome_pq'); - o.value('chrome_pq_psk'); - } o.value('edge'); o.value('firefox'); o.value('ios'); diff --git a/luci-app-homeproxy/htdocs/luci-static/resources/view/homeproxy/status.js b/luci-app-homeproxy/htdocs/luci-static/resources/view/homeproxy/status.js index 5d41ddfaa..139d6d5e4 100644 --- a/luci-app-homeproxy/htdocs/luci-static/resources/view/homeproxy/status.js +++ b/luci-app-homeproxy/htdocs/luci-static/resources/view/homeproxy/status.js @@ -123,7 +123,7 @@ function getRuntimeLog(name, filename) { var log_textarea = E('div', { 'id': 'log_textarea' }, E('img', { - 'src': L.resource(['icons/loading.gif']), + 'src': L.resource('icons/loading.gif'), 'alt': _('Loading'), 'style': 'vertical-align:middle' }, _('Collecting data...')) diff --git a/luci-app-homeproxy/root/etc/homeproxy/scripts/firewall_post.ut b/luci-app-homeproxy/root/etc/homeproxy/scripts/firewall_post.ut index ef711656c..88a7c0917 100755 --- a/luci-app-homeproxy/root/etc/homeproxy/scripts/firewall_post.ut +++ b/luci-app-homeproxy/root/etc/homeproxy/scripts/firewall_post.ut @@ -401,7 +401,7 @@ chain homeproxy_mangle_mark { chain homeproxy_mangle_lanac { {% if (control_info.listen_interfaces): %} - meta iifname != {{ array_to_nftarr(split(join(' ', control_info.listen_interfaces) + ' lo', ' ')) }} counter return + meta iifname != {{ array_to_nftarr([...control_info.listen_interfaces, ...filter(['lo'], ((l) => !~index(control_info.listen_interfaces, l)))]) }} counter return {% endif %} meta iifname != lo udp dport 53 counter return meta mark {{ self_mark }} counter return diff --git a/luci-app-homeproxy/root/etc/homeproxy/scripts/generate_client.uc b/luci-app-homeproxy/root/etc/homeproxy/scripts/generate_client.uc index 57324043c..dce37e7db 100755 --- a/luci-app-homeproxy/root/etc/homeproxy/scripts/generate_client.uc +++ b/luci-app-homeproxy/root/etc/homeproxy/scripts/generate_client.uc @@ -459,8 +459,7 @@ if (!isEmpty(main_node)) { user: cfg.user, rule_set: get_ruleset(cfg.rule_set), /* rule_set_ipcidr_match_source is deprecated in sing-box 1.10.0 */ - rule_set_ipcidr_match_source: (features.version < '1.10.0' && cfg.rule_set_ip_cidr_match_source === '1') || null, - rule_set_ip_cidr_match_source: (features.version >= '1.10.0' && cfg.rule_set_ip_cidr_match_source === '1') || null, + rule_set_ip_cidr_match_source: (cfg.rule_set_ip_cidr_match_source === '1') || null, invert: (cfg.invert === '1') || null, outbound: get_outbound(cfg.outbound), server: get_resolver(cfg.server), @@ -530,9 +529,7 @@ if (match(proxy_mode, /tun/)) interface_name: tun_name, /* inet4_address and inet6_address are deprecated in sing-box 1.10.0 */ - inet4_address: (features.version < '1.10.0') ? tun_addr4 : null, - inet6_address: (features.version < '1.10.0' && ipv6_support === '1') ? tun_addr6 : null, - address: (features.version >= '1.10.0') ? ((ipv6_support === '1') ? [tun_addr4, tun_addr6] : [tun_addr4]) : null, + address: (ipv6_support === '1') ? [tun_addr4, tun_addr6] : [tun_addr4], mtu: strToInt(tun_mtu), gso: (tun_gso === '1'), auto_route: false, @@ -645,8 +642,7 @@ if (!isEmpty(main_node)) { user: cfg.user, rule_set: get_ruleset(cfg.rule_set), /* rule_set_ipcidr_match_source is deprecated in sing-box 1.10.0 */ - rule_set_ipcidr_match_source: (features.version < '1.10.0' && cfg.rule_set_ip_cidr_match_source === '1') || null, - rule_set_ip_cidr_match_source: (features.version >= '1.10.0' && cfg.rule_set_ip_cidr_match_source === '1') || null, + rule_set_ip_cidr_match_source: (cfg.rule_set_ip_cidr_match_source === '1') || null, rule_set_ip_cidr_accept_empty: (cfg.rule_set_ip_cidr_accept_empty === '1') || null, invert: (cfg.invert === '1') || null, outbound: get_outbound(cfg.outbound)