mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-11-09 05:27:59 +08:00
💐 Sync 2026-10-01 01:11:54
This commit is contained in:
1 parent
8f2ec5c4da
commit
2909cae209
44 files changed
+1092
-2287
No files matched your search
+10
-27
@@ -113,7 +113,6 @@ function renderRuleSection(s, kind, self) {
|
||||
if (is_dns) {
|
||||
so = ss.taboption('field_other', form.DynamicList, 'query_type', _('Query type'),
|
||||
_('Match query type.'));
|
||||
so.validate = hp.validateQueryType;
|
||||
so.modalonly = true;
|
||||
|
||||
so = addNetwork();
|
||||
@@ -146,7 +145,7 @@ function renderRuleSection(s, kind, self) {
|
||||
delete this.vallist;
|
||||
|
||||
uci.sections('homeproxy-pro', 'ruleset', (res) => {
|
||||
if (res.enabled !== '0')
|
||||
if (res.enabled === '1')
|
||||
this.value(res['.name'], res.label);
|
||||
});
|
||||
|
||||
@@ -168,15 +167,12 @@ function renderRuleSection(s, kind, self) {
|
||||
* (sniff/hijack are emitted by the proxy-mode builder,
|
||||
* not exposed in the form).
|
||||
*
|
||||
* `route-options` is offered for routing rules only. sing-box 1.14's DNS
|
||||
* rule action list does contain a `route-options`, but it takes a
|
||||
* different field set (cache / TTL / timeout / client-subnet, and no
|
||||
* outbound or override), which this shared form does not model - offering
|
||||
* it here would emit routing fields the DNS schema refuses. Earlier code
|
||||
* added it to both branches and the depends() guards for dns_disable_cache
|
||||
* / rewrite_ttl / client_subnet pinned a stale 'route-options' in UCI that
|
||||
* resurfaced as "unknown field" the next time the user flipped back to
|
||||
* 'route'. */
|
||||
* `route-options` is a routing_rule-only action: sing-box 1.14's dns_rule
|
||||
* schema has no such action, and emitting it would make the whole dns block
|
||||
* fail with "unknown action". Earlier code added it to both branches and
|
||||
* the depends() guards for dns_disable_cache / rewrite_ttl / client_subnet
|
||||
* pinned a stale 'route-options' in the UCI that resurfaced as "unknown
|
||||
* field" the next time the user flipped back to 'route'. */
|
||||
so = ss.taboption('field_other', form.ListValue, 'action', _('Action'));
|
||||
so.value('route', _('Route'));
|
||||
so.value('reject', _('Reject'));
|
||||
@@ -201,7 +197,7 @@ function renderRuleSection(s, kind, self) {
|
||||
this.value('default-dns', _('Default DNS (issued by WAN)'));
|
||||
this.value('system-dns', _('System DNS'));
|
||||
uci.sections('homeproxy-pro', 'dns_server', (res) => {
|
||||
if (res.enabled !== '0')
|
||||
if (res.enabled === '1')
|
||||
this.value(res['.name'], res.label);
|
||||
});
|
||||
|
||||
@@ -338,7 +334,7 @@ function renderRuleSection(s, kind, self) {
|
||||
|
||||
this.value('direct-out', _('Direct'));
|
||||
uci.sections('homeproxy-pro', 'routing_node', (res) => {
|
||||
if (res.enabled !== '0')
|
||||
if (res.enabled === '1')
|
||||
this.value(res['.name'], res.label);
|
||||
});
|
||||
|
||||
@@ -352,48 +348,39 @@ function renderRuleSection(s, kind, self) {
|
||||
_('Override the connection destination address.'));
|
||||
so.datatype = 'ipaddr';
|
||||
so.depends('action', 'route');
|
||||
so.depends('action', 'route-options');
|
||||
so.modalonly = true;
|
||||
|
||||
so = ss.taboption('field_other', form.Value, 'override_port', _('Override port'),
|
||||
_('Override the connection destination port.'));
|
||||
so.datatype = 'port';
|
||||
so.depends('action', 'route');
|
||||
so.depends('action', 'route-options');
|
||||
so.modalonly = true;
|
||||
|
||||
so = ss.taboption('field_other', form.Flag, 'udp_disable_domain_unmapping', _('Disable UDP domain unmapping'),
|
||||
_('If enabled, for UDP proxy requests addressed to a domain, the original packet address will be sent in the response instead of the mapped domain.'));
|
||||
so.depends('action', 'route');
|
||||
so.depends('action', 'route-options');
|
||||
so.modalonly = true;
|
||||
|
||||
so = ss.taboption('field_other', form.Flag, 'udp_connect', _('connect UDP connections'),
|
||||
_('If enabled, attempts to connect UDP connection to the destination instead of listen.'));
|
||||
so.depends('action', 'route');
|
||||
so.depends('action', 'route-options');
|
||||
so.modalonly = true;
|
||||
|
||||
so = ss.taboption('field_other', form.Value, 'udp_timeout', _('UDP timeout'),
|
||||
_('Timeout for UDP connections.<br/>Setting a larger value than the UDP timeout in inbounds will have no effect.'));
|
||||
so.datatype = 'uinteger';
|
||||
so.depends('action', 'route');
|
||||
so.depends('action', 'route-options');
|
||||
so.modalonly = true;
|
||||
|
||||
so = ss.taboption('field_other', form.Flag, 'tls_record_fragment', _('TLS record fragment'),
|
||||
_('Fragment TLS handshake into multiple TLS records.'));
|
||||
so.depends('action', 'route');
|
||||
so.depends('action', 'route-options');
|
||||
so.modalonly = true;
|
||||
so.depends({'tls_fragment': '1', '!reverse': true});
|
||||
|
||||
so = ss.taboption('field_other', form.Flag, 'tls_fragment', _('TLS fragment'),
|
||||
_('Fragment TLS handshakes. Due to poor performance, try <code>%s</code> first.').format(
|
||||
_('TLS record fragment')));
|
||||
so.depends('action', 'route');
|
||||
so.depends('action', 'route-options');
|
||||
so.depends({'tls_record_fragment': '1', '!reverse': true});
|
||||
so.modalonly = true;
|
||||
|
||||
so = ss.taboption('field_other', form.Value, 'tls_fragment_fallback_delay', _('Fragment fallback delay'),
|
||||
@@ -407,7 +394,6 @@ function renderRuleSection(s, kind, self) {
|
||||
_('Inject a forged TLS ClientHello carrying this SNI before the real one to fool SNI-filtering middleboxes. Requires elevated privileges.'));
|
||||
so.datatype = 'hostname';
|
||||
so.depends('action', 'route');
|
||||
so.depends('action', 'route-options');
|
||||
so.modalonly = true;
|
||||
|
||||
so = ss.taboption('field_other', form.ListValue, 'tls_spoof_method', _('TLS spoof method (1.14)'),
|
||||
@@ -418,7 +404,6 @@ function renderRuleSection(s, kind, self) {
|
||||
so.value('wrong-md5', _('wrong-md5'));
|
||||
so.value('wrong-timestamp', _('wrong-timestamp'));
|
||||
so.depends('action', 'route');
|
||||
so.depends('action', 'route-options');
|
||||
so.depends('tls_spoof', /[\s\S]/);
|
||||
so.modalonly = true;
|
||||
|
||||
@@ -432,7 +417,7 @@ function renderRuleSection(s, kind, self) {
|
||||
this.value('default-dns', _('Default DNS (issued by WAN)'));
|
||||
this.value('system-dns', _('System DNS'));
|
||||
uci.sections('homeproxy-pro', 'dns_server', (res) => {
|
||||
if (res.enabled !== '0')
|
||||
if (res.enabled === '1')
|
||||
this.value(res['.name'], res.label);
|
||||
});
|
||||
|
||||
@@ -505,7 +490,6 @@ function renderRuleSection(s, kind, self) {
|
||||
|
||||
so = ss.taboption('field_host', form.DynamicList, 'domain_regex', _('Domain regex'),
|
||||
_('Match domain using regular expression.'));
|
||||
so.validate = hp.validateRegex;
|
||||
so.modalonly = true;
|
||||
|
||||
so = ss.taboption('field_host', form.DynamicList, 'source_ip_cidr', _('Source IP CIDR'),
|
||||
@@ -576,7 +560,6 @@ function renderRuleSection(s, kind, self) {
|
||||
|
||||
so = ss.taboption('fields_process', form.DynamicList, 'process_path_regex', _('Process path (regex)'),
|
||||
_('Match process path using regular expression.'));
|
||||
so.validate = hp.validateRegex;
|
||||
so.modalonly = true;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user