mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2026-08-04 15:28:58 +00:00
Pull request 2720: AGDNS-4254-support-bootstrap-comments
Squashed commit of the following: commit 91c992eb126dc2f447d60801895c35bc51634b3f Merge:83c72176248b98bb5aAuthor: Maksim Kazantsev <m.kazantsev@adguard.com> Date: Mon Jul 20 14:21:06 2026 +0300 Merge branch 'master' into AGDNS-4254-support-bootstrap-comments commit83c7217629Author: Maksim Kazantsev <m.kazantsev@adguard.com> Date: Fri Jul 17 12:34:48 2026 +0300 all: imp ui text; commitd15d6d19c6Author: Maksim Kazantsev <m.kazantsev@adguard.com> Date: Fri Jul 17 12:30:23 2026 +0300 all: imp chlog and ui text; commit9e1074fabeAuthor: Maksim Kazantsev <m.kazantsev@adguard.com> Date: Thu Jul 16 18:57:24 2026 +0300 all: imp chlog; commit25a864b343Author: Maksim Kazantsev <m.kazantsev@adguard.com> Date: Thu Jul 16 18:56:33 2026 +0300 all: imp chlog and ui text; commitbf6ad5108eAuthor: Maksim Kazantsev <m.kazantsev@adguard.com> Date: Thu Jul 16 17:18:55 2026 +0300 all: upd chlog; openapi: upd openapi and api chlog; client_V2: upd ui text; commit13b595c36eAuthor: Maksim Kazantsev <m.kazantsev@adguard.com> Date: Thu Jul 16 12:50:53 2026 +0300 dnsforward: add support of comments in bootstraps;
This commit is contained in:
parent
48b98bb5a0
commit
5a3f84a2f4
7 changed files with 19 additions and 11 deletions
|
|
@ -20,6 +20,8 @@ NOTE: Add new changes BELOW THIS COMMENT.
|
|||
|
||||
### Added
|
||||
|
||||
- Bootstrap servers configuration now supports comments.
|
||||
|
||||
- New property `"language"` in `POST /control/install/check_config` and `POST /control/install/configure` HTTP APIs.
|
||||
|
||||
- The user is able to remove the static lease's hostname via the HTTP API.
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@
|
|||
"blocking_mode_refused": "REFUSED: Respond with REFUSED code",
|
||||
"blocklist": "Blocklist",
|
||||
"bootstrap_dns": "Bootstrap DNS servers",
|
||||
"bootstrap_dns_desc": "IP addresses of DNS servers used to resolve IP addresses of the DoH/DoT resolvers you specify as upstreams. Comments are not permitted.",
|
||||
"bootstrap_dns_desc": "IP addresses of DNS servers used to resolve IP addresses of the DoH/DoT resolvers you specify as upstreams. Empty lines and comments, starting with '#', are ignored.",
|
||||
"cache_cleared": "DNS cache successfully cleared",
|
||||
"cache_enabled": "Enable cache",
|
||||
"cache_enabled_desc": "Store DNS responses locally.",
|
||||
|
|
|
|||
|
|
@ -329,7 +329,7 @@
|
|||
"dns_blocking_mode_ttl_label": "Blocked response TTL, in seconds",
|
||||
"dns_blocking_mode_ttl_placeholder": "Enter TTL",
|
||||
"dns_bootstrap_dns_desc": "Sets the DNS servers used to resolve DoH/DoT upstream resolver hostnames",
|
||||
"dns_bootstrap_dns_desc_2": "Enter IP addresses only. Comments are not allowed",
|
||||
"dns_bootstrap_dns_desc_2": "Enter IP addresses and, optionally, comments. Comments must start with a hash (#) and be on exclusive lines",
|
||||
"dns_bootstrap_dns_label": "Bootstrap DNS servers, one per line",
|
||||
"dns_bootstrap_dns_placeholder": "IP addresses",
|
||||
"dns_bootstrap_dns_title": "Bootstrap DNS servers",
|
||||
|
|
@ -466,7 +466,7 @@
|
|||
"upstream_fallback_title_faq": "Fallback DNS servers to use when upstream DNS servers are unavailable. Use the same syntax as for the upstream DNS servers",
|
||||
"ip_addresses_placeholder": "Enter IP addresses, one per line",
|
||||
"upstream_bootstrap_dns_title": "Bootstrap DNS servers, one per line",
|
||||
"upstream_bootstrap_dns_faq": "IP addresses of DNS servers used to resolve the IP addresses of DoH/DoT upstream resolvers. Comments are not allowed",
|
||||
"upstream_bootstrap_dns_faq": "IP addresses of DNS servers used to resolve the IP addresses of DoH/DoT upstream resolvers. Empty lines and comments, starting with '#', are ignored.",
|
||||
"upstream_ptr": "Private reverse DNS servers, one per line",
|
||||
"upstream_ptr_faq_1": "AdGuard Home uses these DNS servers for private PTR, SOA, and NS requests. Private requests come from clients with a private IP address and ask for an ARPA domain that contains a subnet from a private IP address range, such as %value%",
|
||||
"upstream_ptr_faq_2": "If this field is empty, the default DNS resolvers of your OS will be used, except for the AdGuard Home IP addresses",
|
||||
|
|
|
|||
|
|
@ -342,8 +342,8 @@ func (req *jsonDNSConfig) checkBootstrap() (err error) {
|
|||
defer func() { err = errors.Annotate(err, "checking bootstrap %s: %w", b) }()
|
||||
|
||||
for _, b = range *req.Bootstraps {
|
||||
if b == "" {
|
||||
return errors.Error("empty")
|
||||
if aghnet.IsCommentOrEmpty(b) {
|
||||
continue
|
||||
}
|
||||
|
||||
var resolver *upstream.UpstreamResolver
|
||||
|
|
@ -730,8 +730,6 @@ func (s *Server) handleTestUpstreamDNS(w http.ResponseWriter, r *http.Request) {
|
|||
return
|
||||
}
|
||||
|
||||
req.BootstrapDNS = stringutil.FilterOut(req.BootstrapDNS, aghnet.IsCommentOrEmpty)
|
||||
|
||||
opts := &upstream.Options{
|
||||
Logger: aghslog.NewForUpstream(s.baseLogger, aghslog.UpstreamTypeTest),
|
||||
Timeout: s.conf.UpstreamTimeout,
|
||||
|
|
|
|||
|
|
@ -29,6 +29,8 @@ func newBootstrap(
|
|||
etcHosts upstream.Resolver,
|
||||
opts *upstream.Options,
|
||||
) (r upstream.Resolver, boots []*upstream.UpstreamResolver, err error) {
|
||||
addrs = stringutil.FilterOut(addrs, aghnet.IsCommentOrEmpty)
|
||||
|
||||
if len(addrs) == 0 {
|
||||
addrs = defaultBootstrap
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@
|
|||
|
||||
## v0.107.79: API changes
|
||||
|
||||
- Field `bootstrap_dns` in `POST /control/dns_config` now accepts comments. A comment must start with the `#` symbol.
|
||||
|
||||
### Setting the UI language through the install API
|
||||
|
||||
- New property `"language"` in `POST /control/install/check_config` and `POST /control/install/configure` HTTP APIs defines the language to use once AdGuard Home is installed.
|
||||
|
|
|
|||
|
|
@ -1557,7 +1557,8 @@
|
|||
'type': 'array'
|
||||
'description': >
|
||||
Bootstrap servers, port is optional after colon. Empty value will
|
||||
reset it to default values.
|
||||
reset it to default values. Comments are allowed, a comment line
|
||||
starts with a `#` symbol.
|
||||
'items':
|
||||
'type': 'string'
|
||||
'example':
|
||||
|
|
@ -1567,7 +1568,8 @@
|
|||
'type': 'array'
|
||||
'description': >
|
||||
Upstream servers, port is optional after colon. Empty value will
|
||||
reset it to default values.
|
||||
reset it to default values. Comments are allowed, a comment line
|
||||
starts with a `#` symbol.
|
||||
'items':
|
||||
'type': 'string'
|
||||
'example':
|
||||
|
|
@ -1577,7 +1579,8 @@
|
|||
'type': 'array'
|
||||
'description': >
|
||||
List of fallback DNS servers used when upstream DNS servers are not
|
||||
responding. Empty value will clear the list.
|
||||
responding. Empty value will clear the list. Comments are allowed,
|
||||
a comment line starts with a `#` symbol.
|
||||
'items':
|
||||
'type': 'string'
|
||||
'example':
|
||||
|
|
@ -1670,7 +1673,8 @@
|
|||
'type': 'array'
|
||||
'description': >
|
||||
Upstream servers, port is optional after colon. Empty value will
|
||||
reset it to default values.
|
||||
reset it to default values. Comments are allowed, a comment line
|
||||
starts with a `#` symbol.
|
||||
'items':
|
||||
'type': 'string'
|
||||
'example':
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue