Skip to content

Commit e6f880f

Browse files
committed
add missing options to config/modal
1 parent 3837551 commit e6f880f

File tree

2 files changed

+355
-67
lines changed

2 files changed

+355
-67
lines changed

htdocs/luci-static/resources/view/https-dns-proxy/overview.js

Lines changed: 207 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -46,16 +46,19 @@ return view.extend({
4646
status = new hdp.status();
4747

4848
m = new form.Map(pkg.Name, _("HTTPS DNS Proxy - Configuration"));
49-
5049
s = m.section(form.NamedSection, "config", pkg.Name);
5150

51+
s.tab("service", _("Service Options"));
52+
s.tab("global", _("Global Instance Options"));
53+
5254
var dhcp_dnsmasq_values = Object.values(L.uci.sections("dhcp", "dnsmasq"));
5355
function isEmpty(obj) {
5456
return Object.keys(obj).length === 0;
5557
}
5658

5759
if (!isEmpty(dhcp_dnsmasq_values)) {
58-
o = s.option(
60+
o = s.taboption(
61+
"service",
5962
form.ListValue,
6063
"dnsmasq_config_update_option",
6164
_("Update DNSMASQ Config on Start/Stop"),
@@ -93,7 +96,8 @@ return view.extend({
9396
L.uci.set(pkg.Name, section_id, "dnsmasq_config_update", formvalue);
9497
};
9598

96-
o = s.option(
99+
o = s.taboption(
100+
"service",
97101
form.MultiValue,
98102
"dnsmasq_config_update",
99103
_("Select the DNSMASQ Configs to update")
@@ -115,7 +119,8 @@ return view.extend({
115119
o.retain = true;
116120
}
117121

118-
o = s.option(
122+
o = s.taboption(
123+
"service",
119124
form.ListValue,
120125
"force_dns",
121126
_("Force Router DNS"),
@@ -130,7 +135,8 @@ return view.extend({
130135
o.value("1", _("Force Router DNS server to all local devices"));
131136
o.default = "1";
132137

133-
o = s.option(
138+
o = s.taboption(
139+
"service",
134140
form.ListValue,
135141
"canary_domains_icloud",
136142
_("Canary Domains iCloud"),
@@ -146,7 +152,8 @@ return view.extend({
146152
o.depends("force_dns", "1");
147153
o.default = "1";
148154

149-
o = s.option(
155+
o = s.taboption(
156+
"service",
150157
form.ListValue,
151158
"canary_domains_mozilla",
152159
_("Canary Domains Mozilla"),
@@ -165,6 +172,147 @@ return view.extend({
165172
o.depends("force_dns", "1");
166173
o.default = "1";
167174

175+
o = s.taboption(
176+
"service",
177+
form.Value,
178+
"heartbeat_domain",
179+
_("Heartbeat Domain"),
180+
_(
181+
"The domain used for connectivity checks (%smore information%s)."
182+
).format(
183+
'<a href="' + pkg.URL + "#heartbeat_domain" + '" target="_blank">',
184+
"</a>"
185+
)
186+
);
187+
o.optional = true;
188+
o.placeholder = "heartbeat.melmac.ca";
189+
190+
o = s.taboption(
191+
"service",
192+
form.Value,
193+
"heartbeat_sleep_timeout",
194+
_("Heartbeat Sleep Timeout"),
195+
_("Time to wait before checking connectivity (seconds).")
196+
);
197+
o.datatype = "uinteger";
198+
o.optional = true;
199+
o.placeholder = "10";
200+
201+
o = s.taboption(
202+
"service",
203+
form.Value,
204+
"heartbeat_wait_timeout",
205+
_("Heartbeat Wait Timeout"),
206+
_("Time to wait for connectivity check response (seconds).")
207+
);
208+
o.datatype = "uinteger";
209+
o.optional = true;
210+
o.placeholder = "30";
211+
212+
o = s.taboption("service", form.ListValue, "verbosity", _("Verbosity"));
213+
o.optional = true;
214+
o.value("0", _("Minimal output/logging"));
215+
o.value("1", _("Normal output/logging"));
216+
o.value("2", _("Extra output/logging"));
217+
o.default = "1";
218+
219+
o = s.taboption(
220+
"global",
221+
form.ListValue,
222+
"force_http1",
223+
_("Use HTTP/1")
224+
);
225+
o.optional = true;
226+
o.rmempty = true;
227+
o.value("", _("Use negotiated HTTP version"));
228+
o.value("1", _("Force use of HTTP/1"));
229+
o.default = "";
230+
231+
o = s.taboption(
232+
"global",
233+
form.ListValue,
234+
"force_http3",
235+
_("Use HTTP/3 (QUIC)")
236+
);
237+
o.optional = true;
238+
o.rmempty = true;
239+
o.value("", _("Use negotiated HTTP version"));
240+
o.value("1", _("Force use of HTTP/3 (QUIC)"));
241+
o.default = "";
242+
o.depends("force_http1", "");
243+
244+
o = s.taboption(
245+
"global",
246+
form.ListValue,
247+
"force_ipv6_resolvers",
248+
_("Use IPv6 resolvers")
249+
);
250+
o.optional = true;
251+
o.rmempty = true;
252+
o.value("", _("Use any family DNS resolvers"));
253+
o.value("1", _("Force use of IPv6 DNS resolvers"));
254+
o.default = "";
255+
256+
o = s.taboption("global", form.Value, "listen_addr", _("Listen Address"));
257+
o.datatype = "ipaddr('nomask')";
258+
o.optional = true;
259+
o.placeholder = "127.0.0.1";
260+
261+
o = s.taboption("global", form.Value, "user", _("Run As User"));
262+
o.optional = true;
263+
o.placeholder = "nobody";
264+
265+
o = s.taboption("global", form.Value, "group", _("Run As Group"));
266+
o.optional = true;
267+
o.placeholder = "nogroup";
268+
269+
o = s.taboption("global", form.Value, "source_addr", _("Source Address"));
270+
o.datatype = "ipaddr('nomask')";
271+
o.optional = true;
272+
o.placeholder = "";
273+
274+
o = s.taboption("global", form.Value, "logfile", _("Logging File Path"));
275+
o.datatype = "file";
276+
o.optional = true;
277+
o.placeholder = "";
278+
279+
o = s.taboption("global", form.Value, "polling_interval", _("Polling Interval"));
280+
o.datatype = "range(5,3600)";
281+
o.optional = true;
282+
o.placeholder = "120";
283+
284+
o = s.taboption("global", form.Value, "proxy_server", _("Proxy Server"));
285+
o.optional = true;
286+
287+
o = s.taboption("global", form.Value, "ca_certs_file", _("CA Certs File"));
288+
o.datatype = "file";
289+
o.optional = true;
290+
291+
o = s.taboption("global", form.Value, "conn_loss_time", _("Connection Loss Time"));
292+
o.datatype = "uinteger";
293+
o.optional = true;
294+
o.placeholder = "15";
295+
296+
o = s.taboption("global", form.Value, "log_limit", _("Log Limit"));
297+
o.datatype = "uinteger";
298+
o.optional = true;
299+
o.placeholder = "0";
300+
301+
o = s.taboption("global", form.Value, "max_idle_time", _("Max Idle Time"));
302+
o.datatype = "uinteger";
303+
o.optional = true;
304+
o.placeholder = "118";
305+
306+
o = s.taboption("global", form.Value, "statistic_interval", _("Statistic Interval"));
307+
o.datatype = "uinteger";
308+
o.optional = true;
309+
o.placeholder = "0";
310+
311+
o = s.taboption("global", form.Value, "tcp_client_limit", _("TCP Client Limit"));
312+
o.datatype = "uinteger";
313+
o.optional = true;
314+
o.placeholder = "20";
315+
168316
text = "";
169317
if (!reply.platform.http2_support)
170318
text +=
@@ -388,59 +536,88 @@ return view.extend({
388536

389537
o = s.option(form.Value, "listen_addr", _("Listen Address"));
390538
o.datatype = "ipaddr('nomask')";
391-
o.default = "";
392539
o.optional = true;
393540
o.placeholder = "127.0.0.1";
394541

395542
o = s.option(form.Value, "listen_port", _("Listen Port"));
396543
o.datatype = "port";
397-
o.default = "";
398544
o.optional = true;
399545
o.placeholder = "5053";
400546

547+
o = s.option(form.Value, "source_addr", _("Source (Bind To) Address"));
548+
o.datatype = "ipaddr('nomask')";
549+
o.optional = true;
550+
401551
o = s.option(form.Value, "user", _("Run As User"));
402-
o.default = "";
403552
o.modalonly = true;
404553
o.optional = true;
554+
o.placeholder = "nobody";
405555

406556
o = s.option(form.Value, "group", _("Run As Group"));
407-
o.default = "";
408557
o.modalonly = true;
409558
o.optional = true;
559+
o.placeholder = "nogroup";
410560

411561
o = s.option(form.Value, "dscp_codepoint", _("DSCP Codepoint"));
412562
o.datatype = "range(0,63)";
413-
o.default = "";
414563
o.modalonly = true;
415564
o.optional = true;
416565

417-
o = s.option(form.Value, "source_addr", _("Source Address"));
418-
o.datatype = "ipaddr('nomask')";
419-
o.default = "";
420-
o.optional = true;
421-
422566
o = s.option(form.Value, "verbosity", _("Logging Verbosity"));
423567
o.datatype = "range(0,4)";
424-
o.default = "";
425568
o.modalonly = true;
426569
o.optional = true;
570+
o.placeholder = "1";
427571

428572
o = s.option(form.Value, "logfile", _("Logging File Path"));
429-
o.default = "";
430573
o.modalonly = true;
431574
o.optional = true;
432575

433576
o = s.option(form.Value, "polling_interval", _("Polling Interval"));
434577
o.datatype = "range(5,3600)";
435-
o.default = "";
436578
o.modalonly = true;
437579
o.optional = true;
580+
o.placeholder = "120";
438581

439582
o = s.option(form.Value, "proxy_server", _("Proxy Server"));
440-
o.default = "";
441583
o.modalonly = true;
442584
o.optional = true;
443585

586+
o = s.option(form.Value, "ca_certs_file", _("CA Certs File"));
587+
o.datatype = "file";
588+
o.modalonly = true;
589+
o.optional = true;
590+
591+
o = s.option(form.Value, "conn_loss_time", _("Connection Loss Time"));
592+
o.datatype = "uinteger";
593+
o.modalonly = true;
594+
o.optional = true;
595+
o.placeholder = "15";
596+
597+
o = s.option(form.Value, "log_limit", _("Log Limit"));
598+
o.datatype = "uinteger";
599+
o.modalonly = true;
600+
o.optional = true;
601+
o.placeholder = "0";
602+
603+
o = s.option(form.Value, "max_idle_time", _("Max Idle Time"));
604+
o.datatype = "uinteger";
605+
o.modalonly = true;
606+
o.optional = true;
607+
o.placeholder = "118";
608+
609+
o = s.option(form.Value, "statistic_interval", _("Statistic Interval"));
610+
o.datatype = "uinteger";
611+
o.modalonly = true;
612+
o.optional = true;
613+
o.placeholder = "0";
614+
615+
o = s.option(form.Value, "tcp_client_limit", _("TCP Client Limit"));
616+
o.datatype = "uinteger";
617+
o.modalonly = true;
618+
o.optional = true;
619+
o.placeholder = "20";
620+
444621
o = s.option(form.ListValue, "force_http1", _("Use HTTP/1"));
445622
o.modalonly = true;
446623
o.optional = true;
@@ -449,11 +626,16 @@ return view.extend({
449626
o.value("1", _("Force use of HTTP/1"));
450627
o.default = "";
451628

452-
o = s.option(
453-
form.ListValue,
454-
"force_ipv6_resolvers",
455-
_("Use IPv6 resolvers")
456-
);
629+
o = s.option(form.ListValue, "force_http3", _("Use HTTP/3 (QUIC)"));
630+
o.modalonly = true;
631+
o.optional = true;
632+
o.rmempty = true;
633+
o.value("", _("Use negotiated HTTP version"));
634+
o.value("1", _("Force use of HTTP/3 (QUIC)"));
635+
o.default = "";
636+
o.depends("force_http1", "");
637+
638+
o = s.option(form.ListValue, "force_ipv6_resolvers", _("Use IPv6 resolvers"));
457639
o.modalonly = true;
458640
o.optional = true;
459641
o.rmempty = true;

0 commit comments

Comments
 (0)