luci-app-homeproxy: sync upstream

last commit: 5bc6a29e3c
This commit is contained in:
gitea-action 2024-12-24 16:00:33 +08:00
parent 99433bf849
commit 8b675fdcc0
5 changed files with 32 additions and 59 deletions

View File

@ -480,21 +480,16 @@ return view.extend({
so = ss.taboption('field_other', form.MultiValue, 'protocol', _('Protocol'), so = ss.taboption('field_other', form.MultiValue, 'protocol', _('Protocol'),
_('Sniffed protocol, see <a target="_blank" href="https://sing-box.sagernet.org/configuration/route/sniff/">Sniff</a> for details.')); _('Sniffed protocol, see <a target="_blank" href="https://sing-box.sagernet.org/configuration/route/sniff/">Sniff</a> 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')); 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('http', _('HTTP'));
so.value('quic', _('QUIC')); so.value('quic', _('QUIC'));
if (features.version.localeCompare('1.10.0', undefined, { numeric: true, sensitivity: 'base' }) >= 0) {
so.value('rdp', _('RDP')); so.value('rdp', _('RDP'));
so.value('ssh', _('SSH')); so.value('ssh', _('SSH'));
}
so.value('stun', _('STUN')); so.value('stun', _('STUN'));
so.value('tls', _('TLS')); 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'), so = ss.taboption('field_other', form.Value, 'client', _('Client'),
_('Sniffed client type (QUIC client type or SSH client name).')); _('Sniffed client type (QUIC client type or SSH client name).'));
so.value('chromium', _('Chromium / Cronet')); so.value('chromium', _('Chromium / Cronet'));
@ -504,7 +499,6 @@ return view.extend({
so.depends('protocol', 'quic'); so.depends('protocol', 'quic');
so.depends('protocol', 'ssh'); so.depends('protocol', 'ssh');
so.modalonly = true; so.modalonly = true;
}
so = ss.taboption('field_other', form.ListValue, 'network', _('Network')); so = ss.taboption('field_other', form.ListValue, 'network', _('Network'));
so.value('tcp', _('TCP')); so.value('tcp', _('TCP'));
@ -578,11 +572,9 @@ return view.extend({
_('Match process path.')); _('Match process path.'));
so.modalonly = true; 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)'), so = ss.taboption('field_other', form.DynamicList, 'process_path_regex', _('Process path (regex)'),
_('Match process path using regular expression.')); _('Match process path using regular expression.'));
so.modalonly = true; so.modalonly = true;
}
so = ss.taboption('field_other', form.DynamicList, 'user', _('User'), so = ss.taboption('field_other', form.DynamicList, 'user', _('User'),
_('Match user name.')); _('Match user name.'));
@ -846,16 +838,12 @@ return view.extend({
so = ss.taboption('field_other', form.MultiValue, 'protocol', _('Protocol'), so = ss.taboption('field_other', form.MultiValue, 'protocol', _('Protocol'),
_('Sniffed protocol, see <a target="_blank" href="https://sing-box.sagernet.org/configuration/route/sniff/">Sniff</a> for details.')); _('Sniffed protocol, see <a target="_blank" href="https://sing-box.sagernet.org/configuration/route/sniff/">Sniff</a> 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('dtls', _('DTLS')); so.value('dtls', _('DTLS'));
}
so.value('http', _('HTTP')); so.value('http', _('HTTP'));
so.value('quic', _('QUIC')); so.value('quic', _('QUIC'));
if (features.version.localeCompare('1.10.0', undefined, { numeric: true, sensitivity: 'base' }) >= 0) {
so.value('rdp', _('RDP')); so.value('rdp', _('RDP'));
so.value('ssh', _('SSH')); so.value('ssh', _('SSH'));
}
so.value('stun', _('STUN')); so.value('stun', _('STUN'));
so.value('tls', _('TLS')); so.value('tls', _('TLS'));
@ -924,11 +912,9 @@ return view.extend({
_('Match process path.')); _('Match process path.'));
so.modalonly = true; 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)'), so = ss.taboption('field_other', form.DynamicList, 'process_path_regex', _('Process path (regex)'),
_('Match process path using regular expression.')); _('Match process path using regular expression.'));
so.modalonly = true; so.modalonly = true;
}
so = ss.taboption('field_other', form.DynamicList, 'user', _('User'), so = ss.taboption('field_other', form.DynamicList, 'user', _('User'),
_('Match user name.')); _('Match user name.'));
@ -955,12 +941,10 @@ return view.extend({
so.default = so.disabled; so.default = so.disabled;
so.modalonly = true; 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'), 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.')); _('Make IP CIDR in rule-sets accept empty query response.'));
so.default = so.disabled; so.default = so.disabled;
so.modalonly = true; so.modalonly = true;
}
so = ss.taboption('field_other', form.Flag, 'invert', _('Invert'), so = ss.taboption('field_other', form.Flag, 'invert', _('Invert'),
_('Invert match result.')); _('Invert match result.'));

View File

@ -1072,13 +1072,6 @@ function renderNodeSettings(section, data, features, main_node, routing_mode) {
o.value('360'); o.value('360');
o.value('android'); o.value('android');
o.value('chrome'); 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('edge');
o.value('firefox'); o.value('firefox');
o.value('ios'); o.value('ios');

View File

@ -123,7 +123,7 @@ function getRuntimeLog(name, filename) {
var log_textarea = E('div', { 'id': 'log_textarea' }, var log_textarea = E('div', { 'id': 'log_textarea' },
E('img', { E('img', {
'src': L.resource(['icons/loading.gif']), 'src': L.resource('icons/loading.gif'),
'alt': _('Loading'), 'alt': _('Loading'),
'style': 'vertical-align:middle' 'style': 'vertical-align:middle'
}, _('Collecting data...')) }, _('Collecting data...'))

View File

@ -401,7 +401,7 @@ chain homeproxy_mangle_mark {
chain homeproxy_mangle_lanac { chain homeproxy_mangle_lanac {
{% if (control_info.listen_interfaces): %} {% 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 %} {% endif %}
meta iifname != lo udp dport 53 counter return meta iifname != lo udp dport 53 counter return
meta mark {{ self_mark }} counter return meta mark {{ self_mark }} counter return

View File

@ -459,8 +459,7 @@ if (!isEmpty(main_node)) {
user: cfg.user, user: cfg.user,
rule_set: get_ruleset(cfg.rule_set), 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 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: (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,
invert: (cfg.invert === '1') || null, invert: (cfg.invert === '1') || null,
outbound: get_outbound(cfg.outbound), outbound: get_outbound(cfg.outbound),
server: get_resolver(cfg.server), server: get_resolver(cfg.server),
@ -530,9 +529,7 @@ if (match(proxy_mode, /tun/))
interface_name: tun_name, interface_name: tun_name,
/* inet4_address and inet6_address are deprecated in sing-box 1.10.0 */ /* inet4_address and inet6_address are deprecated in sing-box 1.10.0 */
inet4_address: (features.version < '1.10.0') ? tun_addr4 : null, address: (ipv6_support === '1') ? [tun_addr4, tun_addr6] : [tun_addr4],
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,
mtu: strToInt(tun_mtu), mtu: strToInt(tun_mtu),
gso: (tun_gso === '1'), gso: (tun_gso === '1'),
auto_route: false, auto_route: false,
@ -645,8 +642,7 @@ if (!isEmpty(main_node)) {
user: cfg.user, user: cfg.user,
rule_set: get_ruleset(cfg.rule_set), 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 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: (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_accept_empty: (cfg.rule_set_ip_cidr_accept_empty === '1') || null, rule_set_ip_cidr_accept_empty: (cfg.rule_set_ip_cidr_accept_empty === '1') || null,
invert: (cfg.invert === '1') || null, invert: (cfg.invert === '1') || null,
outbound: get_outbound(cfg.outbound) outbound: get_outbound(cfg.outbound)