code_before
stringlengths
16
1.81M
edits
stringlengths
4
328k
next_edit
stringlengths
0
76.5k
code_after
stringlengths
3
49.9M
label_window
sequencelengths
4
1.81k
instruction
stringlengths
20
51.9k
html_url
stringlengths
74
116
file_name
stringlengths
3
311
<li> <code>tcp://unfiltered.adguard-dns.com</code>: <Trans>example_upstream_tcp_hostname</Trans> </li> <li> <code>tls://unfiltered.adguard-dns.com</code>: <span> <Trans components={[ <a href="https://en.wikipedia.org/wiki/DNS_over_TLS" target="_blank" rel="noopener noreferrer" key="0" > DNS-over-TLS </a>, ]} > example_upstream_dot </Trans> </span> </li> <li> <code>https://unfiltered.adguard-dns.com/dns-query</code>: <span> <Trans
</s> remove <code>https://unfiltered.adguard-dns.com/dns-query</code>: <span> <Trans components={[ <a href="https://en.wikipedia.org/wiki/DNS_over_HTTPS" target="_blank" rel="noopener noreferrer" key="0" > DNS-over-HTTPS </a>, ]} > example_upstream_doh </Trans> </span> </s> add <code>https://unfiltered.adguard-dns.com/dns-query</code>: <Trans components={[ <a href="https://en.wikipedia.org/wiki/DNS_over_HTTPS" target="_blank" rel="noopener noreferrer" key="0" > DNS-over-HTTPS </a>, ]} > example_upstream_doh </Trans> </s> remove <code>quic://unfiltered.adguard-dns.com:784</code>: <span> <Trans components={[ <a href="https://datatracker.ietf.org/doc/html/rfc9250" target="_blank" rel="noopener noreferrer" key="0" > DNS-over-QUIC </a>, ]} > example_upstream_doq </Trans> </span> </s> add <code>quic://unfiltered.adguard-dns.com</code>: <Trans components={[ <a href="https://datatracker.ietf.org/doc/html/rfc9250" target="_blank" rel="noopener noreferrer" key="0" > DNS-over-QUIC </a>, ]} > example_upstream_doq </Trans> </s> remove <code>[/example.local/]94.140.14.140</code>: <span> <Trans components={[ <a href="https://github.com/AdguardTeam/AdGuardHome/wiki/Configuration#upstreams-for-domains" target="_blank" rel="noopener noreferrer" key="0" > Link </a>, ]} > example_upstream_reserved </Trans> </span> </s> add <code>[/example.local/]94.140.14.140</code>: <Trans components={[ <a href="https://github.com/AdguardTeam/AdGuardHome/wiki/Configuration#upstreams-for-domains" target="_blank" rel="noopener noreferrer" key="0" > Link </a>, ]} > example_upstream_reserved </Trans> </s> remove <code>sdns://...</code>: <span> <Trans components={[ <a href="https://dnscrypt.info/stamps/" target="_blank" rel="noopener noreferrer" key="0" > DNS Stamps </a>, <a href="https://dnscrypt.info/" target="_blank" rel="noopener noreferrer" key="1" > DNSCrypt </a>, <a href="https://en.wikipedia.org/wiki/DNS_over_HTTPS" target="_blank" rel="noopener noreferrer" key="2" > DNS-over-HTTPS </a>, ]} > example_upstream_sdns </Trans> </span> </s> add <code>sdns://...</code>: <Trans components={[ <a href="https://dnscrypt.info/stamps/" target="_blank" rel="noopener noreferrer" key="0" > DNS Stamps </a>, <a href="https://dnscrypt.info/" target="_blank" rel="noopener noreferrer" key="1" > DNSCrypt </a>, <a href="https://en.wikipedia.org/wiki/DNS_over_HTTPS" target="_blank" rel="noopener noreferrer" key="2" > DNS-over-HTTPS </a>, ]} > example_upstream_sdns </Trans> </s> remove <code>tcp://94.140.14.140</code>: <Trans>example_upstream_tcp</Trans> </s> add <code>tcp://94.140.14.140</code>, <code>tcp://[2a10:50c0::1:ff]</code>: <Trans>example_upstream_tcp</Trans> </li> <li> <code>tcp://94.140.14.140:53</code>, <code>tcp://[2a10:50c0::1:ff]:53</code>: <Trans>example_upstream_tcp_port</Trans>
<code>tls://unfiltered.adguard-dns.com</code>: <Trans components={[ <a href="https://en.wikipedia.org/wiki/DNS_over_TLS" target="_blank" rel="noopener noreferrer" key="0" > DNS-over-TLS </a>, ]} > example_upstream_dot </Trans>
<li> <code>tcp://unfiltered.adguard-dns.com</code>: <Trans>example_upstream_tcp_hostname</Trans> </li> <li> <code>tls://unfiltered.adguard-dns.com</code>: <Trans components={[ <a href="https://en.wikipedia.org/wiki/DNS_over_TLS" target="_blank" rel="noopener noreferrer" key="0" > DNS-over-TLS </a>, ]} > example_upstream_dot </Trans> <code>tls://unfiltered.adguard-dns.com</code>: <Trans components={[ <a href="https://en.wikipedia.org/wiki/DNS_over_TLS" target="_blank" rel="noopener noreferrer" key="0" > DNS-over-TLS </a>, ]} > example_upstream_dot </Trans> <code>tls://unfiltered.adguard-dns.com</code>: <Trans components={[ <a href="https://en.wikipedia.org/wiki/DNS_over_TLS" target="_blank" rel="noopener noreferrer" key="0" > DNS-over-TLS </a>, ]} > example_upstream_dot </Trans> <code>tls://unfiltered.adguard-dns.com</code>: <Trans components={[ <a href="https://en.wikipedia.org/wiki/DNS_over_TLS" target="_blank" rel="noopener noreferrer" key="0" > DNS-over-TLS </a>, ]} > example_upstream_dot </Trans> <code>tls://unfiltered.adguard-dns.com</code>: <Trans components={[ <a href="https://en.wikipedia.org/wiki/DNS_over_TLS" target="_blank" rel="noopener noreferrer" key="0" > DNS-over-TLS </a>, ]} > example_upstream_dot </Trans> <code>tls://unfiltered.adguard-dns.com</code>: <Trans components={[ <a href="https://en.wikipedia.org/wiki/DNS_over_TLS" target="_blank" rel="noopener noreferrer" key="0" > DNS-over-TLS </a>, ]} > example_upstream_dot </Trans> <code>tls://unfiltered.adguard-dns.com</code>: <Trans components={[ <a href="https://en.wikipedia.org/wiki/DNS_over_TLS" target="_blank" rel="noopener noreferrer" key="0" > DNS-over-TLS </a>, ]} > example_upstream_dot </Trans> <code>tls://unfiltered.adguard-dns.com</code>: <Trans components={[ <a href="https://en.wikipedia.org/wiki/DNS_over_TLS" target="_blank" rel="noopener noreferrer" key="0" > DNS-over-TLS </a>, ]} > example_upstream_dot </Trans> <code>tls://unfiltered.adguard-dns.com</code>: <Trans components={[ <a href="https://en.wikipedia.org/wiki/DNS_over_TLS" target="_blank" rel="noopener noreferrer" key="0" > DNS-over-TLS </a>, ]} > example_upstream_dot </Trans> <code>tls://unfiltered.adguard-dns.com</code>: <Trans components={[ <a href="https://en.wikipedia.org/wiki/DNS_over_TLS" target="_blank" rel="noopener noreferrer" key="0" > DNS-over-TLS </a>, ]} > example_upstream_dot </Trans> <code>tls://unfiltered.adguard-dns.com</code>: <Trans components={[ <a href="https://en.wikipedia.org/wiki/DNS_over_TLS" target="_blank" rel="noopener noreferrer" key="0" > DNS-over-TLS </a>, ]} > example_upstream_dot </Trans> <code>tls://unfiltered.adguard-dns.com</code>: <Trans components={[ <a href="https://en.wikipedia.org/wiki/DNS_over_TLS" target="_blank" rel="noopener noreferrer" key="0" > DNS-over-TLS </a>, ]} > example_upstream_dot </Trans> <code>tls://unfiltered.adguard-dns.com</code>: <Trans components={[ <a href="https://en.wikipedia.org/wiki/DNS_over_TLS" target="_blank" rel="noopener noreferrer" key="0" > DNS-over-TLS </a>, ]} > example_upstream_dot </Trans> <code>tls://unfiltered.adguard-dns.com</code>: <Trans components={[ <a href="https://en.wikipedia.org/wiki/DNS_over_TLS" target="_blank" rel="noopener noreferrer" key="0" > DNS-over-TLS </a>, ]} > example_upstream_dot </Trans> <code>tls://unfiltered.adguard-dns.com</code>: <Trans components={[ <a href="https://en.wikipedia.org/wiki/DNS_over_TLS" target="_blank" rel="noopener noreferrer" key="0" > DNS-over-TLS </a>, ]} > example_upstream_dot </Trans> <code>tls://unfiltered.adguard-dns.com</code>: <Trans components={[ <a href="https://en.wikipedia.org/wiki/DNS_over_TLS" target="_blank" rel="noopener noreferrer" key="0" > DNS-over-TLS </a>, ]} > example_upstream_dot </Trans> <code>tls://unfiltered.adguard-dns.com</code>: <Trans components={[ <a href="https://en.wikipedia.org/wiki/DNS_over_TLS" target="_blank" rel="noopener noreferrer" key="0" > DNS-over-TLS </a>, ]} > example_upstream_dot </Trans> </li> <li> <code>https://unfiltered.adguard-dns.com/dns-query</code>: <span> <Trans
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
Pull request #1572: 4640-imp-upstream-doc Updates #4640. Squashed commit of the following: commit 764b024e7a5a5f6ea2b18b5e13fdc4fa38c49af2 Merge: 7bace870 6856a803 Author: Ainar Garipov <[email protected]> Date: Fri Aug 19 17:17:44 2022 +0300 Merge branch 'master' into 4640-imp-upstream-doc commit 7bace870102633a2b8323c5f448ed38b65f4b482 Author: Ainar Garipov <[email protected]> Date: Thu Aug 18 19:49:07 2022 +0300 all: imp upstream examples
https://github.com/AdguardTeam/AdGuardHome/commit/1afd73ad0b50037bdb58130c7a21e080de88ea7d
client/src/components/Settings/Dns/Upstream/Examples.js
</Trans> </span> </li> <li> <code>https://unfiltered.adguard-dns.com/dns-query</code>: <span> <Trans components={[ <a href="https://en.wikipedia.org/wiki/DNS_over_HTTPS" target="_blank" rel="noopener noreferrer" key="0" > DNS-over-HTTPS </a>, ]} > example_upstream_doh </Trans> </span> </li> <li> <code>quic://unfiltered.adguard-dns.com:784</code>: <span> <Trans
</s> remove <code>sdns://...</code>: <span> <Trans components={[ <a href="https://dnscrypt.info/stamps/" target="_blank" rel="noopener noreferrer" key="0" > DNS Stamps </a>, <a href="https://dnscrypt.info/" target="_blank" rel="noopener noreferrer" key="1" > DNSCrypt </a>, <a href="https://en.wikipedia.org/wiki/DNS_over_HTTPS" target="_blank" rel="noopener noreferrer" key="2" > DNS-over-HTTPS </a>, ]} > example_upstream_sdns </Trans> </span> </s> add <code>sdns://...</code>: <Trans components={[ <a href="https://dnscrypt.info/stamps/" target="_blank" rel="noopener noreferrer" key="0" > DNS Stamps </a>, <a href="https://dnscrypt.info/" target="_blank" rel="noopener noreferrer" key="1" > DNSCrypt </a>, <a href="https://en.wikipedia.org/wiki/DNS_over_HTTPS" target="_blank" rel="noopener noreferrer" key="2" > DNS-over-HTTPS </a>, ]} > example_upstream_sdns </Trans> </s> remove <code>quic://unfiltered.adguard-dns.com:784</code>: <span> <Trans components={[ <a href="https://datatracker.ietf.org/doc/html/rfc9250" target="_blank" rel="noopener noreferrer" key="0" > DNS-over-QUIC </a>, ]} > example_upstream_doq </Trans> </span> </s> add <code>quic://unfiltered.adguard-dns.com</code>: <Trans components={[ <a href="https://datatracker.ietf.org/doc/html/rfc9250" target="_blank" rel="noopener noreferrer" key="0" > DNS-over-QUIC </a>, ]} > example_upstream_doq </Trans> </s> remove <code>tls://unfiltered.adguard-dns.com</code>: <span> <Trans components={[ <a href="https://en.wikipedia.org/wiki/DNS_over_TLS" target="_blank" rel="noopener noreferrer" key="0" > DNS-over-TLS </a>, ]} > example_upstream_dot </Trans> </span> </s> add <code>tls://unfiltered.adguard-dns.com</code>: <Trans components={[ <a href="https://en.wikipedia.org/wiki/DNS_over_TLS" target="_blank" rel="noopener noreferrer" key="0" > DNS-over-TLS </a>, ]} > example_upstream_dot </Trans> </s> remove <code>[/example.local/]94.140.14.140</code>: <span> <Trans components={[ <a href="https://github.com/AdguardTeam/AdGuardHome/wiki/Configuration#upstreams-for-domains" target="_blank" rel="noopener noreferrer" key="0" > Link </a>, ]} > example_upstream_reserved </Trans> </span> </s> add <code>[/example.local/]94.140.14.140</code>: <Trans components={[ <a href="https://github.com/AdguardTeam/AdGuardHome/wiki/Configuration#upstreams-for-domains" target="_blank" rel="noopener noreferrer" key="0" > Link </a>, ]} > example_upstream_reserved </Trans> </s> remove <code>{COMMENT_LINE_DEFAULT_TOKEN} comment</code>: <span> <Trans>example_upstream_comment</Trans> </span> </s> add <code>{COMMENT_LINE_DEFAULT_TOKEN} comment</code>: <Trans> example_upstream_comment </Trans>
<code>https://unfiltered.adguard-dns.com/dns-query</code>: <Trans components={[ <a href="https://en.wikipedia.org/wiki/DNS_over_HTTPS" target="_blank" rel="noopener noreferrer" key="0" > DNS-over-HTTPS </a>, ]} > example_upstream_doh </Trans>
</Trans> </span> </li> <li> <code>https://unfiltered.adguard-dns.com/dns-query</code>: <Trans components={[ <a href="https://en.wikipedia.org/wiki/DNS_over_HTTPS" target="_blank" rel="noopener noreferrer" key="0" > DNS-over-HTTPS </a>, ]} > example_upstream_doh </Trans> <code>https://unfiltered.adguard-dns.com/dns-query</code>: <Trans components={[ <a href="https://en.wikipedia.org/wiki/DNS_over_HTTPS" target="_blank" rel="noopener noreferrer" key="0" > DNS-over-HTTPS </a>, ]} > example_upstream_doh </Trans> <code>https://unfiltered.adguard-dns.com/dns-query</code>: <Trans components={[ <a href="https://en.wikipedia.org/wiki/DNS_over_HTTPS" target="_blank" rel="noopener noreferrer" key="0" > DNS-over-HTTPS </a>, ]} > example_upstream_doh </Trans> <code>https://unfiltered.adguard-dns.com/dns-query</code>: <Trans components={[ <a href="https://en.wikipedia.org/wiki/DNS_over_HTTPS" target="_blank" rel="noopener noreferrer" key="0" > DNS-over-HTTPS </a>, ]} > example_upstream_doh </Trans> <code>https://unfiltered.adguard-dns.com/dns-query</code>: <Trans components={[ <a href="https://en.wikipedia.org/wiki/DNS_over_HTTPS" target="_blank" rel="noopener noreferrer" key="0" > DNS-over-HTTPS </a>, ]} > example_upstream_doh </Trans> <code>https://unfiltered.adguard-dns.com/dns-query</code>: <Trans components={[ <a href="https://en.wikipedia.org/wiki/DNS_over_HTTPS" target="_blank" rel="noopener noreferrer" key="0" > DNS-over-HTTPS </a>, ]} > example_upstream_doh </Trans> <code>https://unfiltered.adguard-dns.com/dns-query</code>: <Trans components={[ <a href="https://en.wikipedia.org/wiki/DNS_over_HTTPS" target="_blank" rel="noopener noreferrer" key="0" > DNS-over-HTTPS </a>, ]} > example_upstream_doh </Trans> <code>https://unfiltered.adguard-dns.com/dns-query</code>: <Trans components={[ <a href="https://en.wikipedia.org/wiki/DNS_over_HTTPS" target="_blank" rel="noopener noreferrer" key="0" > DNS-over-HTTPS </a>, ]} > example_upstream_doh </Trans> <code>https://unfiltered.adguard-dns.com/dns-query</code>: <Trans components={[ <a href="https://en.wikipedia.org/wiki/DNS_over_HTTPS" target="_blank" rel="noopener noreferrer" key="0" > DNS-over-HTTPS </a>, ]} > example_upstream_doh </Trans> <code>https://unfiltered.adguard-dns.com/dns-query</code>: <Trans components={[ <a href="https://en.wikipedia.org/wiki/DNS_over_HTTPS" target="_blank" rel="noopener noreferrer" key="0" > DNS-over-HTTPS </a>, ]} > example_upstream_doh </Trans> <code>https://unfiltered.adguard-dns.com/dns-query</code>: <Trans components={[ <a href="https://en.wikipedia.org/wiki/DNS_over_HTTPS" target="_blank" rel="noopener noreferrer" key="0" > DNS-over-HTTPS </a>, ]} > example_upstream_doh </Trans> <code>https://unfiltered.adguard-dns.com/dns-query</code>: <Trans components={[ <a href="https://en.wikipedia.org/wiki/DNS_over_HTTPS" target="_blank" rel="noopener noreferrer" key="0" > DNS-over-HTTPS </a>, ]} > example_upstream_doh </Trans> <code>https://unfiltered.adguard-dns.com/dns-query</code>: <Trans components={[ <a href="https://en.wikipedia.org/wiki/DNS_over_HTTPS" target="_blank" rel="noopener noreferrer" key="0" > DNS-over-HTTPS </a>, ]} > example_upstream_doh </Trans> <code>https://unfiltered.adguard-dns.com/dns-query</code>: <Trans components={[ <a href="https://en.wikipedia.org/wiki/DNS_over_HTTPS" target="_blank" rel="noopener noreferrer" key="0" > DNS-over-HTTPS </a>, ]} > example_upstream_doh </Trans> <code>https://unfiltered.adguard-dns.com/dns-query</code>: <Trans components={[ <a href="https://en.wikipedia.org/wiki/DNS_over_HTTPS" target="_blank" rel="noopener noreferrer" key="0" > DNS-over-HTTPS </a>, ]} > example_upstream_doh </Trans> <code>https://unfiltered.adguard-dns.com/dns-query</code>: <Trans components={[ <a href="https://en.wikipedia.org/wiki/DNS_over_HTTPS" target="_blank" rel="noopener noreferrer" key="0" > DNS-over-HTTPS </a>, ]} > example_upstream_doh </Trans> <code>https://unfiltered.adguard-dns.com/dns-query</code>: <Trans components={[ <a href="https://en.wikipedia.org/wiki/DNS_over_HTTPS" target="_blank" rel="noopener noreferrer" key="0" > DNS-over-HTTPS </a>, ]} > example_upstream_doh </Trans> </li> <li> <code>quic://unfiltered.adguard-dns.com:784</code>: <span> <Trans
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
Pull request #1572: 4640-imp-upstream-doc Updates #4640. Squashed commit of the following: commit 764b024e7a5a5f6ea2b18b5e13fdc4fa38c49af2 Merge: 7bace870 6856a803 Author: Ainar Garipov <[email protected]> Date: Fri Aug 19 17:17:44 2022 +0300 Merge branch 'master' into 4640-imp-upstream-doc commit 7bace870102633a2b8323c5f448ed38b65f4b482 Author: Ainar Garipov <[email protected]> Date: Thu Aug 18 19:49:07 2022 +0300 all: imp upstream examples
https://github.com/AdguardTeam/AdGuardHome/commit/1afd73ad0b50037bdb58130c7a21e080de88ea7d
client/src/components/Settings/Dns/Upstream/Examples.js
</Trans> </span> </li> <li> <code>quic://unfiltered.adguard-dns.com:784</code>: <span> <Trans components={[ <a href="https://datatracker.ietf.org/doc/html/rfc9250" target="_blank" rel="noopener noreferrer" key="0" > DNS-over-QUIC </a>, ]} > example_upstream_doq </Trans> </span> </li> <li> <code>sdns://...</code>: <span> <Trans
</s> remove <code>https://unfiltered.adguard-dns.com/dns-query</code>: <span> <Trans components={[ <a href="https://en.wikipedia.org/wiki/DNS_over_HTTPS" target="_blank" rel="noopener noreferrer" key="0" > DNS-over-HTTPS </a>, ]} > example_upstream_doh </Trans> </span> </s> add <code>https://unfiltered.adguard-dns.com/dns-query</code>: <Trans components={[ <a href="https://en.wikipedia.org/wiki/DNS_over_HTTPS" target="_blank" rel="noopener noreferrer" key="0" > DNS-over-HTTPS </a>, ]} > example_upstream_doh </Trans> </s> remove <code>sdns://...</code>: <span> <Trans components={[ <a href="https://dnscrypt.info/stamps/" target="_blank" rel="noopener noreferrer" key="0" > DNS Stamps </a>, <a href="https://dnscrypt.info/" target="_blank" rel="noopener noreferrer" key="1" > DNSCrypt </a>, <a href="https://en.wikipedia.org/wiki/DNS_over_HTTPS" target="_blank" rel="noopener noreferrer" key="2" > DNS-over-HTTPS </a>, ]} > example_upstream_sdns </Trans> </span> </s> add <code>sdns://...</code>: <Trans components={[ <a href="https://dnscrypt.info/stamps/" target="_blank" rel="noopener noreferrer" key="0" > DNS Stamps </a>, <a href="https://dnscrypt.info/" target="_blank" rel="noopener noreferrer" key="1" > DNSCrypt </a>, <a href="https://en.wikipedia.org/wiki/DNS_over_HTTPS" target="_blank" rel="noopener noreferrer" key="2" > DNS-over-HTTPS </a>, ]} > example_upstream_sdns </Trans> </s> remove <code>[/example.local/]94.140.14.140</code>: <span> <Trans components={[ <a href="https://github.com/AdguardTeam/AdGuardHome/wiki/Configuration#upstreams-for-domains" target="_blank" rel="noopener noreferrer" key="0" > Link </a>, ]} > example_upstream_reserved </Trans> </span> </s> add <code>[/example.local/]94.140.14.140</code>: <Trans components={[ <a href="https://github.com/AdguardTeam/AdGuardHome/wiki/Configuration#upstreams-for-domains" target="_blank" rel="noopener noreferrer" key="0" > Link </a>, ]} > example_upstream_reserved </Trans> </s> remove <code>tls://unfiltered.adguard-dns.com</code>: <span> <Trans components={[ <a href="https://en.wikipedia.org/wiki/DNS_over_TLS" target="_blank" rel="noopener noreferrer" key="0" > DNS-over-TLS </a>, ]} > example_upstream_dot </Trans> </span> </s> add <code>tls://unfiltered.adguard-dns.com</code>: <Trans components={[ <a href="https://en.wikipedia.org/wiki/DNS_over_TLS" target="_blank" rel="noopener noreferrer" key="0" > DNS-over-TLS </a>, ]} > example_upstream_dot </Trans> </s> remove <code>{COMMENT_LINE_DEFAULT_TOKEN} comment</code>: <span> <Trans>example_upstream_comment</Trans> </span> </s> add <code>{COMMENT_LINE_DEFAULT_TOKEN} comment</code>: <Trans> example_upstream_comment </Trans>
<code>quic://unfiltered.adguard-dns.com</code>: <Trans components={[ <a href="https://datatracker.ietf.org/doc/html/rfc9250" target="_blank" rel="noopener noreferrer" key="0" > DNS-over-QUIC </a>, ]} > example_upstream_doq </Trans>
</Trans> </span> </li> <li> <code>quic://unfiltered.adguard-dns.com</code>: <Trans components={[ <a href="https://datatracker.ietf.org/doc/html/rfc9250" target="_blank" rel="noopener noreferrer" key="0" > DNS-over-QUIC </a>, ]} > example_upstream_doq </Trans> <code>quic://unfiltered.adguard-dns.com</code>: <Trans components={[ <a href="https://datatracker.ietf.org/doc/html/rfc9250" target="_blank" rel="noopener noreferrer" key="0" > DNS-over-QUIC </a>, ]} > example_upstream_doq </Trans> <code>quic://unfiltered.adguard-dns.com</code>: <Trans components={[ <a href="https://datatracker.ietf.org/doc/html/rfc9250" target="_blank" rel="noopener noreferrer" key="0" > DNS-over-QUIC </a>, ]} > example_upstream_doq </Trans> <code>quic://unfiltered.adguard-dns.com</code>: <Trans components={[ <a href="https://datatracker.ietf.org/doc/html/rfc9250" target="_blank" rel="noopener noreferrer" key="0" > DNS-over-QUIC </a>, ]} > example_upstream_doq </Trans> <code>quic://unfiltered.adguard-dns.com</code>: <Trans components={[ <a href="https://datatracker.ietf.org/doc/html/rfc9250" target="_blank" rel="noopener noreferrer" key="0" > DNS-over-QUIC </a>, ]} > example_upstream_doq </Trans> <code>quic://unfiltered.adguard-dns.com</code>: <Trans components={[ <a href="https://datatracker.ietf.org/doc/html/rfc9250" target="_blank" rel="noopener noreferrer" key="0" > DNS-over-QUIC </a>, ]} > example_upstream_doq </Trans> <code>quic://unfiltered.adguard-dns.com</code>: <Trans components={[ <a href="https://datatracker.ietf.org/doc/html/rfc9250" target="_blank" rel="noopener noreferrer" key="0" > DNS-over-QUIC </a>, ]} > example_upstream_doq </Trans> <code>quic://unfiltered.adguard-dns.com</code>: <Trans components={[ <a href="https://datatracker.ietf.org/doc/html/rfc9250" target="_blank" rel="noopener noreferrer" key="0" > DNS-over-QUIC </a>, ]} > example_upstream_doq </Trans> <code>quic://unfiltered.adguard-dns.com</code>: <Trans components={[ <a href="https://datatracker.ietf.org/doc/html/rfc9250" target="_blank" rel="noopener noreferrer" key="0" > DNS-over-QUIC </a>, ]} > example_upstream_doq </Trans> <code>quic://unfiltered.adguard-dns.com</code>: <Trans components={[ <a href="https://datatracker.ietf.org/doc/html/rfc9250" target="_blank" rel="noopener noreferrer" key="0" > DNS-over-QUIC </a>, ]} > example_upstream_doq </Trans> <code>quic://unfiltered.adguard-dns.com</code>: <Trans components={[ <a href="https://datatracker.ietf.org/doc/html/rfc9250" target="_blank" rel="noopener noreferrer" key="0" > DNS-over-QUIC </a>, ]} > example_upstream_doq </Trans> <code>quic://unfiltered.adguard-dns.com</code>: <Trans components={[ <a href="https://datatracker.ietf.org/doc/html/rfc9250" target="_blank" rel="noopener noreferrer" key="0" > DNS-over-QUIC </a>, ]} > example_upstream_doq </Trans> <code>quic://unfiltered.adguard-dns.com</code>: <Trans components={[ <a href="https://datatracker.ietf.org/doc/html/rfc9250" target="_blank" rel="noopener noreferrer" key="0" > DNS-over-QUIC </a>, ]} > example_upstream_doq </Trans> <code>quic://unfiltered.adguard-dns.com</code>: <Trans components={[ <a href="https://datatracker.ietf.org/doc/html/rfc9250" target="_blank" rel="noopener noreferrer" key="0" > DNS-over-QUIC </a>, ]} > example_upstream_doq </Trans> <code>quic://unfiltered.adguard-dns.com</code>: <Trans components={[ <a href="https://datatracker.ietf.org/doc/html/rfc9250" target="_blank" rel="noopener noreferrer" key="0" > DNS-over-QUIC </a>, ]} > example_upstream_doq </Trans> <code>quic://unfiltered.adguard-dns.com</code>: <Trans components={[ <a href="https://datatracker.ietf.org/doc/html/rfc9250" target="_blank" rel="noopener noreferrer" key="0" > DNS-over-QUIC </a>, ]} > example_upstream_doq </Trans> <code>quic://unfiltered.adguard-dns.com</code>: <Trans components={[ <a href="https://datatracker.ietf.org/doc/html/rfc9250" target="_blank" rel="noopener noreferrer" key="0" > DNS-over-QUIC </a>, ]} > example_upstream_doq </Trans> </li> <li> <code>sdns://...</code>: <span> <Trans
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
Pull request #1572: 4640-imp-upstream-doc Updates #4640. Squashed commit of the following: commit 764b024e7a5a5f6ea2b18b5e13fdc4fa38c49af2 Merge: 7bace870 6856a803 Author: Ainar Garipov <[email protected]> Date: Fri Aug 19 17:17:44 2022 +0300 Merge branch 'master' into 4640-imp-upstream-doc commit 7bace870102633a2b8323c5f448ed38b65f4b482 Author: Ainar Garipov <[email protected]> Date: Thu Aug 18 19:49:07 2022 +0300 all: imp upstream examples
https://github.com/AdguardTeam/AdGuardHome/commit/1afd73ad0b50037bdb58130c7a21e080de88ea7d
client/src/components/Settings/Dns/Upstream/Examples.js
</Trans> </span> </li> <li> <code>sdns://...</code>: <span> <Trans components={[ <a href="https://dnscrypt.info/stamps/" target="_blank" rel="noopener noreferrer" key="0" > DNS Stamps </a>, <a href="https://dnscrypt.info/" target="_blank" rel="noopener noreferrer" key="1" > DNSCrypt </a>, <a href="https://en.wikipedia.org/wiki/DNS_over_HTTPS" target="_blank" rel="noopener noreferrer" key="2" > DNS-over-HTTPS </a>, ]} > example_upstream_sdns </Trans> </span> </li> <li> <code>[/example.local/]94.140.14.140</code>: <span> <Trans
</s> remove <code>https://unfiltered.adguard-dns.com/dns-query</code>: <span> <Trans components={[ <a href="https://en.wikipedia.org/wiki/DNS_over_HTTPS" target="_blank" rel="noopener noreferrer" key="0" > DNS-over-HTTPS </a>, ]} > example_upstream_doh </Trans> </span> </s> add <code>https://unfiltered.adguard-dns.com/dns-query</code>: <Trans components={[ <a href="https://en.wikipedia.org/wiki/DNS_over_HTTPS" target="_blank" rel="noopener noreferrer" key="0" > DNS-over-HTTPS </a>, ]} > example_upstream_doh </Trans> </s> remove <code>[/example.local/]94.140.14.140</code>: <span> <Trans components={[ <a href="https://github.com/AdguardTeam/AdGuardHome/wiki/Configuration#upstreams-for-domains" target="_blank" rel="noopener noreferrer" key="0" > Link </a>, ]} > example_upstream_reserved </Trans> </span> </s> add <code>[/example.local/]94.140.14.140</code>: <Trans components={[ <a href="https://github.com/AdguardTeam/AdGuardHome/wiki/Configuration#upstreams-for-domains" target="_blank" rel="noopener noreferrer" key="0" > Link </a>, ]} > example_upstream_reserved </Trans> </s> remove <code>quic://unfiltered.adguard-dns.com:784</code>: <span> <Trans components={[ <a href="https://datatracker.ietf.org/doc/html/rfc9250" target="_blank" rel="noopener noreferrer" key="0" > DNS-over-QUIC </a>, ]} > example_upstream_doq </Trans> </span> </s> add <code>quic://unfiltered.adguard-dns.com</code>: <Trans components={[ <a href="https://datatracker.ietf.org/doc/html/rfc9250" target="_blank" rel="noopener noreferrer" key="0" > DNS-over-QUIC </a>, ]} > example_upstream_doq </Trans> </s> remove <code>tls://unfiltered.adguard-dns.com</code>: <span> <Trans components={[ <a href="https://en.wikipedia.org/wiki/DNS_over_TLS" target="_blank" rel="noopener noreferrer" key="0" > DNS-over-TLS </a>, ]} > example_upstream_dot </Trans> </span> </s> add <code>tls://unfiltered.adguard-dns.com</code>: <Trans components={[ <a href="https://en.wikipedia.org/wiki/DNS_over_TLS" target="_blank" rel="noopener noreferrer" key="0" > DNS-over-TLS </a>, ]} > example_upstream_dot </Trans> </s> remove * `quic://unfiltered.adguard-dns.com:784`: encrypted DNS-over-QUIC (experimental). </s> add * `quic://unfiltered.adguard-dns.com`: encrypted DNS-over-QUIC.
<code>sdns://...</code>: <Trans components={[ <a href="https://dnscrypt.info/stamps/" target="_blank" rel="noopener noreferrer" key="0" > DNS Stamps </a>, <a href="https://dnscrypt.info/" target="_blank" rel="noopener noreferrer" key="1" > DNSCrypt </a>, <a href="https://en.wikipedia.org/wiki/DNS_over_HTTPS" target="_blank" rel="noopener noreferrer" key="2" > DNS-over-HTTPS </a>, ]} > example_upstream_sdns </Trans>
</Trans> </span> </li> <li> <code>sdns://...</code>: <Trans components={[ <a href="https://dnscrypt.info/stamps/" target="_blank" rel="noopener noreferrer" key="0" > DNS Stamps </a>, <a href="https://dnscrypt.info/" target="_blank" rel="noopener noreferrer" key="1" > DNSCrypt </a>, <a href="https://en.wikipedia.org/wiki/DNS_over_HTTPS" target="_blank" rel="noopener noreferrer" key="2" > DNS-over-HTTPS </a>, ]} > example_upstream_sdns </Trans> <code>sdns://...</code>: <Trans components={[ <a href="https://dnscrypt.info/stamps/" target="_blank" rel="noopener noreferrer" key="0" > DNS Stamps </a>, <a href="https://dnscrypt.info/" target="_blank" rel="noopener noreferrer" key="1" > DNSCrypt </a>, <a href="https://en.wikipedia.org/wiki/DNS_over_HTTPS" target="_blank" rel="noopener noreferrer" key="2" > DNS-over-HTTPS </a>, ]} > example_upstream_sdns </Trans> <code>sdns://...</code>: <Trans components={[ <a href="https://dnscrypt.info/stamps/" target="_blank" rel="noopener noreferrer" key="0" > DNS Stamps </a>, <a href="https://dnscrypt.info/" target="_blank" rel="noopener noreferrer" key="1" > DNSCrypt </a>, <a href="https://en.wikipedia.org/wiki/DNS_over_HTTPS" target="_blank" rel="noopener noreferrer" key="2" > DNS-over-HTTPS </a>, ]} > example_upstream_sdns </Trans> <code>sdns://...</code>: <Trans components={[ <a href="https://dnscrypt.info/stamps/" target="_blank" rel="noopener noreferrer" key="0" > DNS Stamps </a>, <a href="https://dnscrypt.info/" target="_blank" rel="noopener noreferrer" key="1" > DNSCrypt </a>, <a href="https://en.wikipedia.org/wiki/DNS_over_HTTPS" target="_blank" rel="noopener noreferrer" key="2" > DNS-over-HTTPS </a>, ]} > example_upstream_sdns </Trans> <code>sdns://...</code>: <Trans components={[ <a href="https://dnscrypt.info/stamps/" target="_blank" rel="noopener noreferrer" key="0" > DNS Stamps </a>, <a href="https://dnscrypt.info/" target="_blank" rel="noopener noreferrer" key="1" > DNSCrypt </a>, <a href="https://en.wikipedia.org/wiki/DNS_over_HTTPS" target="_blank" rel="noopener noreferrer" key="2" > DNS-over-HTTPS </a>, ]} > example_upstream_sdns </Trans> <code>sdns://...</code>: <Trans components={[ <a href="https://dnscrypt.info/stamps/" target="_blank" rel="noopener noreferrer" key="0" > DNS Stamps </a>, <a href="https://dnscrypt.info/" target="_blank" rel="noopener noreferrer" key="1" > DNSCrypt </a>, <a href="https://en.wikipedia.org/wiki/DNS_over_HTTPS" target="_blank" rel="noopener noreferrer" key="2" > DNS-over-HTTPS </a>, ]} > example_upstream_sdns </Trans> <code>sdns://...</code>: <Trans components={[ <a href="https://dnscrypt.info/stamps/" target="_blank" rel="noopener noreferrer" key="0" > DNS Stamps </a>, <a href="https://dnscrypt.info/" target="_blank" rel="noopener noreferrer" key="1" > DNSCrypt </a>, <a href="https://en.wikipedia.org/wiki/DNS_over_HTTPS" target="_blank" rel="noopener noreferrer" key="2" > DNS-over-HTTPS </a>, ]} > example_upstream_sdns </Trans> <code>sdns://...</code>: <Trans components={[ <a href="https://dnscrypt.info/stamps/" target="_blank" rel="noopener noreferrer" key="0" > DNS Stamps </a>, <a href="https://dnscrypt.info/" target="_blank" rel="noopener noreferrer" key="1" > DNSCrypt </a>, <a href="https://en.wikipedia.org/wiki/DNS_over_HTTPS" target="_blank" rel="noopener noreferrer" key="2" > DNS-over-HTTPS </a>, ]} > example_upstream_sdns </Trans> <code>sdns://...</code>: <Trans components={[ <a href="https://dnscrypt.info/stamps/" target="_blank" rel="noopener noreferrer" key="0" > DNS Stamps </a>, <a href="https://dnscrypt.info/" target="_blank" rel="noopener noreferrer" key="1" > DNSCrypt </a>, <a href="https://en.wikipedia.org/wiki/DNS_over_HTTPS" target="_blank" rel="noopener noreferrer" key="2" > DNS-over-HTTPS </a>, ]} > example_upstream_sdns </Trans> <code>sdns://...</code>: <Trans components={[ <a href="https://dnscrypt.info/stamps/" target="_blank" rel="noopener noreferrer" key="0" > DNS Stamps </a>, <a href="https://dnscrypt.info/" target="_blank" rel="noopener noreferrer" key="1" > DNSCrypt </a>, <a href="https://en.wikipedia.org/wiki/DNS_over_HTTPS" target="_blank" rel="noopener noreferrer" key="2" > DNS-over-HTTPS </a>, ]} > example_upstream_sdns </Trans> <code>sdns://...</code>: <Trans components={[ <a href="https://dnscrypt.info/stamps/" target="_blank" rel="noopener noreferrer" key="0" > DNS Stamps </a>, <a href="https://dnscrypt.info/" target="_blank" rel="noopener noreferrer" key="1" > DNSCrypt </a>, <a href="https://en.wikipedia.org/wiki/DNS_over_HTTPS" target="_blank" rel="noopener noreferrer" key="2" > DNS-over-HTTPS </a>, ]} > example_upstream_sdns </Trans> <code>sdns://...</code>: <Trans components={[ <a href="https://dnscrypt.info/stamps/" target="_blank" rel="noopener noreferrer" key="0" > DNS Stamps </a>, <a href="https://dnscrypt.info/" target="_blank" rel="noopener noreferrer" key="1" > DNSCrypt </a>, <a href="https://en.wikipedia.org/wiki/DNS_over_HTTPS" target="_blank" rel="noopener noreferrer" key="2" > DNS-over-HTTPS </a>, ]} > example_upstream_sdns </Trans> <code>sdns://...</code>: <Trans components={[ <a href="https://dnscrypt.info/stamps/" target="_blank" rel="noopener noreferrer" key="0" > DNS Stamps </a>, <a href="https://dnscrypt.info/" target="_blank" rel="noopener noreferrer" key="1" > DNSCrypt </a>, <a href="https://en.wikipedia.org/wiki/DNS_over_HTTPS" target="_blank" rel="noopener noreferrer" key="2" > DNS-over-HTTPS </a>, ]} > example_upstream_sdns </Trans> <code>sdns://...</code>: <Trans components={[ <a href="https://dnscrypt.info/stamps/" target="_blank" rel="noopener noreferrer" key="0" > DNS Stamps </a>, <a href="https://dnscrypt.info/" target="_blank" rel="noopener noreferrer" key="1" > DNSCrypt </a>, <a href="https://en.wikipedia.org/wiki/DNS_over_HTTPS" target="_blank" rel="noopener noreferrer" key="2" > DNS-over-HTTPS </a>, ]} > example_upstream_sdns </Trans> <code>sdns://...</code>: <Trans components={[ <a href="https://dnscrypt.info/stamps/" target="_blank" rel="noopener noreferrer" key="0" > DNS Stamps </a>, <a href="https://dnscrypt.info/" target="_blank" rel="noopener noreferrer" key="1" > DNSCrypt </a>, <a href="https://en.wikipedia.org/wiki/DNS_over_HTTPS" target="_blank" rel="noopener noreferrer" key="2" > DNS-over-HTTPS </a>, ]} > example_upstream_sdns </Trans> <code>sdns://...</code>: <Trans components={[ <a href="https://dnscrypt.info/stamps/" target="_blank" rel="noopener noreferrer" key="0" > DNS Stamps </a>, <a href="https://dnscrypt.info/" target="_blank" rel="noopener noreferrer" key="1" > DNSCrypt </a>, <a href="https://en.wikipedia.org/wiki/DNS_over_HTTPS" target="_blank" rel="noopener noreferrer" key="2" > DNS-over-HTTPS </a>, ]} > example_upstream_sdns </Trans> <code>sdns://...</code>: <Trans components={[ <a href="https://dnscrypt.info/stamps/" target="_blank" rel="noopener noreferrer" key="0" > DNS Stamps </a>, <a href="https://dnscrypt.info/" target="_blank" rel="noopener noreferrer" key="1" > DNSCrypt </a>, <a href="https://en.wikipedia.org/wiki/DNS_over_HTTPS" target="_blank" rel="noopener noreferrer" key="2" > DNS-over-HTTPS </a>, ]} > example_upstream_sdns </Trans> <code>sdns://...</code>: <Trans components={[ <a href="https://dnscrypt.info/stamps/" target="_blank" rel="noopener noreferrer" key="0" > DNS Stamps </a>, <a href="https://dnscrypt.info/" target="_blank" rel="noopener noreferrer" key="1" > DNSCrypt </a>, <a href="https://en.wikipedia.org/wiki/DNS_over_HTTPS" target="_blank" rel="noopener noreferrer" key="2" > DNS-over-HTTPS </a>, ]} > example_upstream_sdns </Trans> <code>sdns://...</code>: <Trans components={[ <a href="https://dnscrypt.info/stamps/" target="_blank" rel="noopener noreferrer" key="0" > DNS Stamps </a>, <a href="https://dnscrypt.info/" target="_blank" rel="noopener noreferrer" key="1" > DNSCrypt </a>, <a href="https://en.wikipedia.org/wiki/DNS_over_HTTPS" target="_blank" rel="noopener noreferrer" key="2" > DNS-over-HTTPS </a>, ]} > example_upstream_sdns </Trans> <code>sdns://...</code>: <Trans components={[ <a href="https://dnscrypt.info/stamps/" target="_blank" rel="noopener noreferrer" key="0" > DNS Stamps </a>, <a href="https://dnscrypt.info/" target="_blank" rel="noopener noreferrer" key="1" > DNSCrypt </a>, <a href="https://en.wikipedia.org/wiki/DNS_over_HTTPS" target="_blank" rel="noopener noreferrer" key="2" > DNS-over-HTTPS </a>, ]} > example_upstream_sdns </Trans> <code>sdns://...</code>: <Trans components={[ <a href="https://dnscrypt.info/stamps/" target="_blank" rel="noopener noreferrer" key="0" > DNS Stamps </a>, <a href="https://dnscrypt.info/" target="_blank" rel="noopener noreferrer" key="1" > DNSCrypt </a>, <a href="https://en.wikipedia.org/wiki/DNS_over_HTTPS" target="_blank" rel="noopener noreferrer" key="2" > DNS-over-HTTPS </a>, ]} > example_upstream_sdns </Trans> <code>sdns://...</code>: <Trans components={[ <a href="https://dnscrypt.info/stamps/" target="_blank" rel="noopener noreferrer" key="0" > DNS Stamps </a>, <a href="https://dnscrypt.info/" target="_blank" rel="noopener noreferrer" key="1" > DNSCrypt </a>, <a href="https://en.wikipedia.org/wiki/DNS_over_HTTPS" target="_blank" rel="noopener noreferrer" key="2" > DNS-over-HTTPS </a>, ]} > example_upstream_sdns </Trans> <code>sdns://...</code>: <Trans components={[ <a href="https://dnscrypt.info/stamps/" target="_blank" rel="noopener noreferrer" key="0" > DNS Stamps </a>, <a href="https://dnscrypt.info/" target="_blank" rel="noopener noreferrer" key="1" > DNSCrypt </a>, <a href="https://en.wikipedia.org/wiki/DNS_over_HTTPS" target="_blank" rel="noopener noreferrer" key="2" > DNS-over-HTTPS </a>, ]} > example_upstream_sdns </Trans> <code>sdns://...</code>: <Trans components={[ <a href="https://dnscrypt.info/stamps/" target="_blank" rel="noopener noreferrer" key="0" > DNS Stamps </a>, <a href="https://dnscrypt.info/" target="_blank" rel="noopener noreferrer" key="1" > DNSCrypt </a>, <a href="https://en.wikipedia.org/wiki/DNS_over_HTTPS" target="_blank" rel="noopener noreferrer" key="2" > DNS-over-HTTPS </a>, ]} > example_upstream_sdns </Trans> <code>sdns://...</code>: <Trans components={[ <a href="https://dnscrypt.info/stamps/" target="_blank" rel="noopener noreferrer" key="0" > DNS Stamps </a>, <a href="https://dnscrypt.info/" target="_blank" rel="noopener noreferrer" key="1" > DNSCrypt </a>, <a href="https://en.wikipedia.org/wiki/DNS_over_HTTPS" target="_blank" rel="noopener noreferrer" key="2" > DNS-over-HTTPS </a>, ]} > example_upstream_sdns </Trans> <code>sdns://...</code>: <Trans components={[ <a href="https://dnscrypt.info/stamps/" target="_blank" rel="noopener noreferrer" key="0" > DNS Stamps </a>, <a href="https://dnscrypt.info/" target="_blank" rel="noopener noreferrer" key="1" > DNSCrypt </a>, <a href="https://en.wikipedia.org/wiki/DNS_over_HTTPS" target="_blank" rel="noopener noreferrer" key="2" > DNS-over-HTTPS </a>, ]} > example_upstream_sdns </Trans> <code>sdns://...</code>: <Trans components={[ <a href="https://dnscrypt.info/stamps/" target="_blank" rel="noopener noreferrer" key="0" > DNS Stamps </a>, <a href="https://dnscrypt.info/" target="_blank" rel="noopener noreferrer" key="1" > DNSCrypt </a>, <a href="https://en.wikipedia.org/wiki/DNS_over_HTTPS" target="_blank" rel="noopener noreferrer" key="2" > DNS-over-HTTPS </a>, ]} > example_upstream_sdns </Trans> <code>sdns://...</code>: <Trans components={[ <a href="https://dnscrypt.info/stamps/" target="_blank" rel="noopener noreferrer" key="0" > DNS Stamps </a>, <a href="https://dnscrypt.info/" target="_blank" rel="noopener noreferrer" key="1" > DNSCrypt </a>, <a href="https://en.wikipedia.org/wiki/DNS_over_HTTPS" target="_blank" rel="noopener noreferrer" key="2" > DNS-over-HTTPS </a>, ]} > example_upstream_sdns </Trans> <code>sdns://...</code>: <Trans components={[ <a href="https://dnscrypt.info/stamps/" target="_blank" rel="noopener noreferrer" key="0" > DNS Stamps </a>, <a href="https://dnscrypt.info/" target="_blank" rel="noopener noreferrer" key="1" > DNSCrypt </a>, <a href="https://en.wikipedia.org/wiki/DNS_over_HTTPS" target="_blank" rel="noopener noreferrer" key="2" > DNS-over-HTTPS </a>, ]} > example_upstream_sdns </Trans> <code>sdns://...</code>: <Trans components={[ <a href="https://dnscrypt.info/stamps/" target="_blank" rel="noopener noreferrer" key="0" > DNS Stamps </a>, <a href="https://dnscrypt.info/" target="_blank" rel="noopener noreferrer" key="1" > DNSCrypt </a>, <a href="https://en.wikipedia.org/wiki/DNS_over_HTTPS" target="_blank" rel="noopener noreferrer" key="2" > DNS-over-HTTPS </a>, ]} > example_upstream_sdns </Trans> <code>sdns://...</code>: <Trans components={[ <a href="https://dnscrypt.info/stamps/" target="_blank" rel="noopener noreferrer" key="0" > DNS Stamps </a>, <a href="https://dnscrypt.info/" target="_blank" rel="noopener noreferrer" key="1" > DNSCrypt </a>, <a href="https://en.wikipedia.org/wiki/DNS_over_HTTPS" target="_blank" rel="noopener noreferrer" key="2" > DNS-over-HTTPS </a>, ]} > example_upstream_sdns </Trans> <code>sdns://...</code>: <Trans components={[ <a href="https://dnscrypt.info/stamps/" target="_blank" rel="noopener noreferrer" key="0" > DNS Stamps </a>, <a href="https://dnscrypt.info/" target="_blank" rel="noopener noreferrer" key="1" > DNSCrypt </a>, <a href="https://en.wikipedia.org/wiki/DNS_over_HTTPS" target="_blank" rel="noopener noreferrer" key="2" > DNS-over-HTTPS </a>, ]} > example_upstream_sdns </Trans> <code>sdns://...</code>: <Trans components={[ <a href="https://dnscrypt.info/stamps/" target="_blank" rel="noopener noreferrer" key="0" > DNS Stamps </a>, <a href="https://dnscrypt.info/" target="_blank" rel="noopener noreferrer" key="1" > DNSCrypt </a>, <a href="https://en.wikipedia.org/wiki/DNS_over_HTTPS" target="_blank" rel="noopener noreferrer" key="2" > DNS-over-HTTPS </a>, ]} > example_upstream_sdns </Trans> </li> <li> <code>[/example.local/]94.140.14.140</code>: <span> <Trans
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
Pull request #1572: 4640-imp-upstream-doc Updates #4640. Squashed commit of the following: commit 764b024e7a5a5f6ea2b18b5e13fdc4fa38c49af2 Merge: 7bace870 6856a803 Author: Ainar Garipov <[email protected]> Date: Fri Aug 19 17:17:44 2022 +0300 Merge branch 'master' into 4640-imp-upstream-doc commit 7bace870102633a2b8323c5f448ed38b65f4b482 Author: Ainar Garipov <[email protected]> Date: Thu Aug 18 19:49:07 2022 +0300 all: imp upstream examples
https://github.com/AdguardTeam/AdGuardHome/commit/1afd73ad0b50037bdb58130c7a21e080de88ea7d
client/src/components/Settings/Dns/Upstream/Examples.js
</Trans> </span> </li> <li> <code>[/example.local/]94.140.14.140</code>: <span> <Trans components={[ <a href="https://github.com/AdguardTeam/AdGuardHome/wiki/Configuration#upstreams-for-domains" target="_blank" rel="noopener noreferrer" key="0" > Link </a>, ]} > example_upstream_reserved </Trans> </span> </li> <li> <code>{COMMENT_LINE_DEFAULT_TOKEN} comment</code>: <span> <Trans>example_upstream_comment</Trans>
</s> remove <code>sdns://...</code>: <span> <Trans components={[ <a href="https://dnscrypt.info/stamps/" target="_blank" rel="noopener noreferrer" key="0" > DNS Stamps </a>, <a href="https://dnscrypt.info/" target="_blank" rel="noopener noreferrer" key="1" > DNSCrypt </a>, <a href="https://en.wikipedia.org/wiki/DNS_over_HTTPS" target="_blank" rel="noopener noreferrer" key="2" > DNS-over-HTTPS </a>, ]} > example_upstream_sdns </Trans> </span> </s> add <code>sdns://...</code>: <Trans components={[ <a href="https://dnscrypt.info/stamps/" target="_blank" rel="noopener noreferrer" key="0" > DNS Stamps </a>, <a href="https://dnscrypt.info/" target="_blank" rel="noopener noreferrer" key="1" > DNSCrypt </a>, <a href="https://en.wikipedia.org/wiki/DNS_over_HTTPS" target="_blank" rel="noopener noreferrer" key="2" > DNS-over-HTTPS </a>, ]} > example_upstream_sdns </Trans> </s> remove <code>quic://unfiltered.adguard-dns.com:784</code>: <span> <Trans components={[ <a href="https://datatracker.ietf.org/doc/html/rfc9250" target="_blank" rel="noopener noreferrer" key="0" > DNS-over-QUIC </a>, ]} > example_upstream_doq </Trans> </span> </s> add <code>quic://unfiltered.adguard-dns.com</code>: <Trans components={[ <a href="https://datatracker.ietf.org/doc/html/rfc9250" target="_blank" rel="noopener noreferrer" key="0" > DNS-over-QUIC </a>, ]} > example_upstream_doq </Trans> </s> remove <code>https://unfiltered.adguard-dns.com/dns-query</code>: <span> <Trans components={[ <a href="https://en.wikipedia.org/wiki/DNS_over_HTTPS" target="_blank" rel="noopener noreferrer" key="0" > DNS-over-HTTPS </a>, ]} > example_upstream_doh </Trans> </span> </s> add <code>https://unfiltered.adguard-dns.com/dns-query</code>: <Trans components={[ <a href="https://en.wikipedia.org/wiki/DNS_over_HTTPS" target="_blank" rel="noopener noreferrer" key="0" > DNS-over-HTTPS </a>, ]} > example_upstream_doh </Trans> </s> remove <code>tls://unfiltered.adguard-dns.com</code>: <span> <Trans components={[ <a href="https://en.wikipedia.org/wiki/DNS_over_TLS" target="_blank" rel="noopener noreferrer" key="0" > DNS-over-TLS </a>, ]} > example_upstream_dot </Trans> </span> </s> add <code>tls://unfiltered.adguard-dns.com</code>: <Trans components={[ <a href="https://en.wikipedia.org/wiki/DNS_over_TLS" target="_blank" rel="noopener noreferrer" key="0" > DNS-over-TLS </a>, ]} > example_upstream_dot </Trans> </s> remove <code>{COMMENT_LINE_DEFAULT_TOKEN} comment</code>: <span> <Trans>example_upstream_comment</Trans> </span> </s> add <code>{COMMENT_LINE_DEFAULT_TOKEN} comment</code>: <Trans> example_upstream_comment </Trans>
<code>[/example.local/]94.140.14.140</code>: <Trans components={[ <a href="https://github.com/AdguardTeam/AdGuardHome/wiki/Configuration#upstreams-for-domains" target="_blank" rel="noopener noreferrer" key="0" > Link </a>, ]} > example_upstream_reserved </Trans>
</Trans> </span> </li> <li> <code>[/example.local/]94.140.14.140</code>: <Trans components={[ <a href="https://github.com/AdguardTeam/AdGuardHome/wiki/Configuration#upstreams-for-domains" target="_blank" rel="noopener noreferrer" key="0" > Link </a>, ]} > example_upstream_reserved </Trans> <code>[/example.local/]94.140.14.140</code>: <Trans components={[ <a href="https://github.com/AdguardTeam/AdGuardHome/wiki/Configuration#upstreams-for-domains" target="_blank" rel="noopener noreferrer" key="0" > Link </a>, ]} > example_upstream_reserved </Trans> <code>[/example.local/]94.140.14.140</code>: <Trans components={[ <a href="https://github.com/AdguardTeam/AdGuardHome/wiki/Configuration#upstreams-for-domains" target="_blank" rel="noopener noreferrer" key="0" > Link </a>, ]} > example_upstream_reserved </Trans> <code>[/example.local/]94.140.14.140</code>: <Trans components={[ <a href="https://github.com/AdguardTeam/AdGuardHome/wiki/Configuration#upstreams-for-domains" target="_blank" rel="noopener noreferrer" key="0" > Link </a>, ]} > example_upstream_reserved </Trans> <code>[/example.local/]94.140.14.140</code>: <Trans components={[ <a href="https://github.com/AdguardTeam/AdGuardHome/wiki/Configuration#upstreams-for-domains" target="_blank" rel="noopener noreferrer" key="0" > Link </a>, ]} > example_upstream_reserved </Trans> <code>[/example.local/]94.140.14.140</code>: <Trans components={[ <a href="https://github.com/AdguardTeam/AdGuardHome/wiki/Configuration#upstreams-for-domains" target="_blank" rel="noopener noreferrer" key="0" > Link </a>, ]} > example_upstream_reserved </Trans> <code>[/example.local/]94.140.14.140</code>: <Trans components={[ <a href="https://github.com/AdguardTeam/AdGuardHome/wiki/Configuration#upstreams-for-domains" target="_blank" rel="noopener noreferrer" key="0" > Link </a>, ]} > example_upstream_reserved </Trans> <code>[/example.local/]94.140.14.140</code>: <Trans components={[ <a href="https://github.com/AdguardTeam/AdGuardHome/wiki/Configuration#upstreams-for-domains" target="_blank" rel="noopener noreferrer" key="0" > Link </a>, ]} > example_upstream_reserved </Trans> <code>[/example.local/]94.140.14.140</code>: <Trans components={[ <a href="https://github.com/AdguardTeam/AdGuardHome/wiki/Configuration#upstreams-for-domains" target="_blank" rel="noopener noreferrer" key="0" > Link </a>, ]} > example_upstream_reserved </Trans> <code>[/example.local/]94.140.14.140</code>: <Trans components={[ <a href="https://github.com/AdguardTeam/AdGuardHome/wiki/Configuration#upstreams-for-domains" target="_blank" rel="noopener noreferrer" key="0" > Link </a>, ]} > example_upstream_reserved </Trans> <code>[/example.local/]94.140.14.140</code>: <Trans components={[ <a href="https://github.com/AdguardTeam/AdGuardHome/wiki/Configuration#upstreams-for-domains" target="_blank" rel="noopener noreferrer" key="0" > Link </a>, ]} > example_upstream_reserved </Trans> <code>[/example.local/]94.140.14.140</code>: <Trans components={[ <a href="https://github.com/AdguardTeam/AdGuardHome/wiki/Configuration#upstreams-for-domains" target="_blank" rel="noopener noreferrer" key="0" > Link </a>, ]} > example_upstream_reserved </Trans> <code>[/example.local/]94.140.14.140</code>: <Trans components={[ <a href="https://github.com/AdguardTeam/AdGuardHome/wiki/Configuration#upstreams-for-domains" target="_blank" rel="noopener noreferrer" key="0" > Link </a>, ]} > example_upstream_reserved </Trans> <code>[/example.local/]94.140.14.140</code>: <Trans components={[ <a href="https://github.com/AdguardTeam/AdGuardHome/wiki/Configuration#upstreams-for-domains" target="_blank" rel="noopener noreferrer" key="0" > Link </a>, ]} > example_upstream_reserved </Trans> <code>[/example.local/]94.140.14.140</code>: <Trans components={[ <a href="https://github.com/AdguardTeam/AdGuardHome/wiki/Configuration#upstreams-for-domains" target="_blank" rel="noopener noreferrer" key="0" > Link </a>, ]} > example_upstream_reserved </Trans> <code>[/example.local/]94.140.14.140</code>: <Trans components={[ <a href="https://github.com/AdguardTeam/AdGuardHome/wiki/Configuration#upstreams-for-domains" target="_blank" rel="noopener noreferrer" key="0" > Link </a>, ]} > example_upstream_reserved </Trans> <code>[/example.local/]94.140.14.140</code>: <Trans components={[ <a href="https://github.com/AdguardTeam/AdGuardHome/wiki/Configuration#upstreams-for-domains" target="_blank" rel="noopener noreferrer" key="0" > Link </a>, ]} > example_upstream_reserved </Trans> </li> <li> <code>{COMMENT_LINE_DEFAULT_TOKEN} comment</code>: <span> <Trans>example_upstream_comment</Trans>
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
Pull request #1572: 4640-imp-upstream-doc Updates #4640. Squashed commit of the following: commit 764b024e7a5a5f6ea2b18b5e13fdc4fa38c49af2 Merge: 7bace870 6856a803 Author: Ainar Garipov <[email protected]> Date: Fri Aug 19 17:17:44 2022 +0300 Merge branch 'master' into 4640-imp-upstream-doc commit 7bace870102633a2b8323c5f448ed38b65f4b482 Author: Ainar Garipov <[email protected]> Date: Thu Aug 18 19:49:07 2022 +0300 all: imp upstream examples
https://github.com/AdguardTeam/AdGuardHome/commit/1afd73ad0b50037bdb58130c7a21e080de88ea7d
client/src/components/Settings/Dns/Upstream/Examples.js
</Trans> </span> </li> <li> <code>{COMMENT_LINE_DEFAULT_TOKEN} comment</code>: <span> <Trans>example_upstream_comment</Trans> </span> </li> </ol> </div> );
</s> remove <code>[/example.local/]94.140.14.140</code>: <span> <Trans components={[ <a href="https://github.com/AdguardTeam/AdGuardHome/wiki/Configuration#upstreams-for-domains" target="_blank" rel="noopener noreferrer" key="0" > Link </a>, ]} > example_upstream_reserved </Trans> </span> </s> add <code>[/example.local/]94.140.14.140</code>: <Trans components={[ <a href="https://github.com/AdguardTeam/AdGuardHome/wiki/Configuration#upstreams-for-domains" target="_blank" rel="noopener noreferrer" key="0" > Link </a>, ]} > example_upstream_reserved </Trans> </s> remove <code>https://unfiltered.adguard-dns.com/dns-query</code>: <span> <Trans components={[ <a href="https://en.wikipedia.org/wiki/DNS_over_HTTPS" target="_blank" rel="noopener noreferrer" key="0" > DNS-over-HTTPS </a>, ]} > example_upstream_doh </Trans> </span> </s> add <code>https://unfiltered.adguard-dns.com/dns-query</code>: <Trans components={[ <a href="https://en.wikipedia.org/wiki/DNS_over_HTTPS" target="_blank" rel="noopener noreferrer" key="0" > DNS-over-HTTPS </a>, ]} > example_upstream_doh </Trans> </s> remove <code>quic://unfiltered.adguard-dns.com:784</code>: <span> <Trans components={[ <a href="https://datatracker.ietf.org/doc/html/rfc9250" target="_blank" rel="noopener noreferrer" key="0" > DNS-over-QUIC </a>, ]} > example_upstream_doq </Trans> </span> </s> add <code>quic://unfiltered.adguard-dns.com</code>: <Trans components={[ <a href="https://datatracker.ietf.org/doc/html/rfc9250" target="_blank" rel="noopener noreferrer" key="0" > DNS-over-QUIC </a>, ]} > example_upstream_doq </Trans> </s> remove <code>tls://unfiltered.adguard-dns.com</code>: <span> <Trans components={[ <a href="https://en.wikipedia.org/wiki/DNS_over_TLS" target="_blank" rel="noopener noreferrer" key="0" > DNS-over-TLS </a>, ]} > example_upstream_dot </Trans> </span> </s> add <code>tls://unfiltered.adguard-dns.com</code>: <Trans components={[ <a href="https://en.wikipedia.org/wiki/DNS_over_TLS" target="_blank" rel="noopener noreferrer" key="0" > DNS-over-TLS </a>, ]} > example_upstream_dot </Trans> </s> remove <code>sdns://...</code>: <span> <Trans components={[ <a href="https://dnscrypt.info/stamps/" target="_blank" rel="noopener noreferrer" key="0" > DNS Stamps </a>, <a href="https://dnscrypt.info/" target="_blank" rel="noopener noreferrer" key="1" > DNSCrypt </a>, <a href="https://en.wikipedia.org/wiki/DNS_over_HTTPS" target="_blank" rel="noopener noreferrer" key="2" > DNS-over-HTTPS </a>, ]} > example_upstream_sdns </Trans> </span> </s> add <code>sdns://...</code>: <Trans components={[ <a href="https://dnscrypt.info/stamps/" target="_blank" rel="noopener noreferrer" key="0" > DNS Stamps </a>, <a href="https://dnscrypt.info/" target="_blank" rel="noopener noreferrer" key="1" > DNSCrypt </a>, <a href="https://en.wikipedia.org/wiki/DNS_over_HTTPS" target="_blank" rel="noopener noreferrer" key="2" > DNS-over-HTTPS </a>, ]} > example_upstream_sdns </Trans>
<code>{COMMENT_LINE_DEFAULT_TOKEN} comment</code>: <Trans> example_upstream_comment </Trans>
</Trans> </span> </li> <li> <code>{COMMENT_LINE_DEFAULT_TOKEN} comment</code>: <Trans> example_upstream_comment </Trans> <code>{COMMENT_LINE_DEFAULT_TOKEN} comment</code>: <Trans> example_upstream_comment </Trans> <code>{COMMENT_LINE_DEFAULT_TOKEN} comment</code>: <Trans> example_upstream_comment </Trans> <code>{COMMENT_LINE_DEFAULT_TOKEN} comment</code>: <Trans> example_upstream_comment </Trans> </li> </ol> </div> );
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
Pull request #1572: 4640-imp-upstream-doc Updates #4640. Squashed commit of the following: commit 764b024e7a5a5f6ea2b18b5e13fdc4fa38c49af2 Merge: 7bace870 6856a803 Author: Ainar Garipov <[email protected]> Date: Fri Aug 19 17:17:44 2022 +0300 Merge branch 'master' into 4640-imp-upstream-doc commit 7bace870102633a2b8323c5f448ed38b65f4b482 Author: Ainar Garipov <[email protected]> Date: Thu Aug 18 19:49:07 2022 +0300 all: imp upstream examples
https://github.com/AdguardTeam/AdGuardHome/commit/1afd73ad0b50037bdb58130c7a21e080de88ea7d
client/src/components/Settings/Dns/Upstream/Examples.js
export const STANDARD_DNS_PORT = 53; export const STANDARD_WEB_PORT = 80; export const STANDARD_HTTPS_PORT = 443; export const DNS_OVER_TLS_PORT = 853; export const DNS_OVER_QUIC_PORT = 784; export const MAX_PORT = 65535; export const EMPTY_DATE = '0001-01-01T00:00:00Z'; export const DEBOUNCE_TIMEOUT = 300;
</s> remove <code>sdns://...</code>: <span> <Trans components={[ <a href="https://dnscrypt.info/stamps/" target="_blank" rel="noopener noreferrer" key="0" > DNS Stamps </a>, <a href="https://dnscrypt.info/" target="_blank" rel="noopener noreferrer" key="1" > DNSCrypt </a>, <a href="https://en.wikipedia.org/wiki/DNS_over_HTTPS" target="_blank" rel="noopener noreferrer" key="2" > DNS-over-HTTPS </a>, ]} > example_upstream_sdns </Trans> </span> </s> add <code>sdns://...</code>: <Trans components={[ <a href="https://dnscrypt.info/stamps/" target="_blank" rel="noopener noreferrer" key="0" > DNS Stamps </a>, <a href="https://dnscrypt.info/" target="_blank" rel="noopener noreferrer" key="1" > DNSCrypt </a>, <a href="https://en.wikipedia.org/wiki/DNS_over_HTTPS" target="_blank" rel="noopener noreferrer" key="2" > DNS-over-HTTPS </a>, ]} > example_upstream_sdns </Trans> </s> remove <code>94.140.14.140</code>: {props.t('example_upstream_regular')} </s> add <code>94.140.14.140</code>, <code>2a10:50c0::1:ff</code>: {props.t('example_upstream_regular')} </li> <li> <code>94.140.14.140:53</code>, <code>[2a10:50c0::1:ff]:53</code>: {props.t('example_upstream_regular_port')} </s> remove <code>tcp://94.140.14.140</code>: <Trans>example_upstream_tcp</Trans> </s> add <code>tcp://94.140.14.140</code>, <code>tcp://[2a10:50c0::1:ff]</code>: <Trans>example_upstream_tcp</Trans> </li> <li> <code>tcp://94.140.14.140:53</code>, <code>tcp://[2a10:50c0::1:ff]:53</code>: <Trans>example_upstream_tcp_port</Trans>
export const DNS_OVER_QUIC_PORT = 853;
export const STANDARD_DNS_PORT = 53; export const STANDARD_WEB_PORT = 80; export const STANDARD_HTTPS_PORT = 443; export const DNS_OVER_TLS_PORT = 853; export const DNS_OVER_QUIC_PORT = 853; export const MAX_PORT = 65535; export const EMPTY_DATE = '0001-01-01T00:00:00Z'; export const DEBOUNCE_TIMEOUT = 300;
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
Pull request #1572: 4640-imp-upstream-doc Updates #4640. Squashed commit of the following: commit 764b024e7a5a5f6ea2b18b5e13fdc4fa38c49af2 Merge: 7bace870 6856a803 Author: Ainar Garipov <[email protected]> Date: Fri Aug 19 17:17:44 2022 +0300 Merge branch 'master' into 4640-imp-upstream-doc commit 7bace870102633a2b8323c5f448ed38b65f4b482 Author: Ainar Garipov <[email protected]> Date: Thu Aug 18 19:49:07 2022 +0300 all: imp upstream examples
https://github.com/AdguardTeam/AdGuardHome/commit/1afd73ad0b50037bdb58130c7a21e080de88ea7d
client/src/helpers/constants.js
'description': > Validatable TLS settings. 'example': 'certificate_path': '/etc/ssl/example.com.cert' 'port_dns_over_quic': 784 'port_dns_over_tls': 853 'port_https': 443 'private_key_path': '/etc/ssl/example.com.key' 'server_name': 'dns.example.com' 'properties':
</s> remove 'port_dns_over_quic': 784 </s> add 'port_dns_over_quic': 853 </s> remove 'default': 784 </s> add 'default': 853 </s> remove 'default': 784 </s> add 'default': 853 </s> remove <code>sdns://...</code>: <span> <Trans components={[ <a href="https://dnscrypt.info/stamps/" target="_blank" rel="noopener noreferrer" key="0" > DNS Stamps </a>, <a href="https://dnscrypt.info/" target="_blank" rel="noopener noreferrer" key="1" > DNSCrypt </a>, <a href="https://en.wikipedia.org/wiki/DNS_over_HTTPS" target="_blank" rel="noopener noreferrer" key="2" > DNS-over-HTTPS </a>, ]} > example_upstream_sdns </Trans> </span> </s> add <code>sdns://...</code>: <Trans components={[ <a href="https://dnscrypt.info/stamps/" target="_blank" rel="noopener noreferrer" key="0" > DNS Stamps </a>, <a href="https://dnscrypt.info/" target="_blank" rel="noopener noreferrer" key="1" > DNSCrypt </a>, <a href="https://en.wikipedia.org/wiki/DNS_over_HTTPS" target="_blank" rel="noopener noreferrer" key="2" > DNS-over-HTTPS </a>, ]} > example_upstream_sdns </Trans>
'port_dns_over_quic': 853
'description': > Validatable TLS settings. 'example': 'certificate_path': '/etc/ssl/example.com.cert' 'port_dns_over_quic': 853 'port_dns_over_tls': 853 'port_https': 443 'private_key_path': '/etc/ssl/example.com.key' 'server_name': 'dns.example.com' 'properties':
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
Pull request #1572: 4640-imp-upstream-doc Updates #4640. Squashed commit of the following: commit 764b024e7a5a5f6ea2b18b5e13fdc4fa38c49af2 Merge: 7bace870 6856a803 Author: Ainar Garipov <[email protected]> Date: Fri Aug 19 17:17:44 2022 +0300 Merge branch 'master' into 4640-imp-upstream-doc commit 7bace870102633a2b8323c5f448ed38b65f4b482 Author: Ainar Garipov <[email protected]> Date: Thu Aug 18 19:49:07 2022 +0300 all: imp upstream examples
https://github.com/AdguardTeam/AdGuardHome/commit/1afd73ad0b50037bdb58130c7a21e080de88ea7d
openapi/v1.yaml
Should not be sent if `certificate` is sent. Otherwise, must be sent. 'type': 'string' 'port_dns_over_quic': 'default': 784 'description': > The DNS-over-QUIC port. If `0`, DNS-over-QUIC is disabled. 'format': 'int64' 'maximum': 65535 'minimum': 0
</s> remove 'default': 784 </s> add 'default': 853 </s> remove 'port_dns_over_quic': 784 </s> add 'port_dns_over_quic': 853 </s> remove 'port_dns_over_quic': 784 </s> add 'port_dns_over_quic': 853
'default': 853
Should not be sent if `certificate` is sent. Otherwise, must be sent. 'type': 'string' 'port_dns_over_quic': 'default': 853 'description': > The DNS-over-QUIC port. If `0`, DNS-over-QUIC is disabled. 'format': 'int64' 'maximum': 65535 'minimum': 0
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
Pull request #1572: 4640-imp-upstream-doc Updates #4640. Squashed commit of the following: commit 764b024e7a5a5f6ea2b18b5e13fdc4fa38c49af2 Merge: 7bace870 6856a803 Author: Ainar Garipov <[email protected]> Date: Fri Aug 19 17:17:44 2022 +0300 Merge branch 'master' into 4640-imp-upstream-doc commit 7bace870102633a2b8323c5f448ed38b65f4b482 Author: Ainar Garipov <[email protected]> Date: Thu Aug 18 19:49:07 2022 +0300 all: imp upstream examples
https://github.com/AdguardTeam/AdGuardHome/commit/1afd73ad0b50037bdb58130c7a21e080de88ea7d
openapi/v1.yaml
TLS and encryption settings. 'example': 'certificate_path': '/etc/ssl/example.com.cert' 'enabled': true 'port_dns_over_quic': 784 'port_dns_over_tls': 853 'port_https': 443 'private_key_path': '/etc/ssl/example.com.key' 'server_name': 'dns.example.com' 'required':
</s> remove 'port_dns_over_quic': 784 </s> add 'port_dns_over_quic': 853 </s> remove 'default': 784 </s> add 'default': 853 </s> remove 'default': 784 </s> add 'default': 853 </s> remove <code>https://unfiltered.adguard-dns.com/dns-query</code>: <span> <Trans components={[ <a href="https://en.wikipedia.org/wiki/DNS_over_HTTPS" target="_blank" rel="noopener noreferrer" key="0" > DNS-over-HTTPS </a>, ]} > example_upstream_doh </Trans> </span> </s> add <code>https://unfiltered.adguard-dns.com/dns-query</code>: <Trans components={[ <a href="https://en.wikipedia.org/wiki/DNS_over_HTTPS" target="_blank" rel="noopener noreferrer" key="0" > DNS-over-HTTPS </a>, ]} > example_upstream_doh </Trans>
'port_dns_over_quic': 853
TLS and encryption settings. 'example': 'certificate_path': '/etc/ssl/example.com.cert' 'enabled': true 'port_dns_over_quic': 853 'port_dns_over_tls': 853 'port_https': 443 'private_key_path': '/etc/ssl/example.com.key' 'server_name': 'dns.example.com' 'required':
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
Pull request #1572: 4640-imp-upstream-doc Updates #4640. Squashed commit of the following: commit 764b024e7a5a5f6ea2b18b5e13fdc4fa38c49af2 Merge: 7bace870 6856a803 Author: Ainar Garipov <[email protected]> Date: Fri Aug 19 17:17:44 2022 +0300 Merge branch 'master' into 4640-imp-upstream-doc commit 7bace870102633a2b8323c5f448ed38b65f4b482 Author: Ainar Garipov <[email protected]> Date: Thu Aug 18 19:49:07 2022 +0300 all: imp upstream examples
https://github.com/AdguardTeam/AdGuardHome/commit/1afd73ad0b50037bdb58130c7a21e080de88ea7d
openapi/v1.yaml
over HTTPS, and the DNS server will listen requests over DNS-over-TLS and other protocols. 'type': 'boolean' 'port_dns_over_quic': 'default': 784 'description': > The DNS-over-QUIC port. If `0`, DNS-over-QUIC is disabled. 'format': 'int64' 'maximum': 65535 'minimum': 0
</s> remove 'default': 784 </s> add 'default': 853 </s> remove 'port_dns_over_quic': 784 </s> add 'port_dns_over_quic': 853 </s> remove 'port_dns_over_quic': 784 </s> add 'port_dns_over_quic': 853 </s> remove * `quic://unfiltered.adguard-dns.com:784`: encrypted DNS-over-QUIC (experimental). </s> add * `quic://unfiltered.adguard-dns.com`: encrypted DNS-over-QUIC.
'default': 853
over HTTPS, and the DNS server will listen requests over DNS-over-TLS and other protocols. 'type': 'boolean' 'port_dns_over_quic': 'default': 853 'description': > The DNS-over-QUIC port. If `0`, DNS-over-QUIC is disabled. 'format': 'int64' 'maximum': 65535 'minimum': 0
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
Pull request #1572: 4640-imp-upstream-doc Updates #4640. Squashed commit of the following: commit 764b024e7a5a5f6ea2b18b5e13fdc4fa38c49af2 Merge: 7bace870 6856a803 Author: Ainar Garipov <[email protected]> Date: Fri Aug 19 17:17:44 2022 +0300 Merge branch 'master' into 4640-imp-upstream-doc commit 7bace870102633a2b8323c5f448ed38b65f4b482 Author: Ainar Garipov <[email protected]> Date: Thu Aug 18 19:49:07 2022 +0300 all: imp upstream examples
https://github.com/AdguardTeam/AdGuardHome/commit/1afd73ad0b50037bdb58130c7a21e080de88ea7d
openapi/v1.yaml
* `https://unfiltered.adguard-dns.com/dns-query`: encrypted DNS-over-HTTPS. * `quic://unfiltered.adguard-dns.com:784`: encrypted DNS-over-QUIC (experimental). * `tcp://94.140.14.140`: plain DNS-over-TCP. * `sdns://...`: DNS Stamps for DNSCrypt or DNS-over-HTTPS resolvers.
</s> remove <code>sdns://...</code>: <span> <Trans components={[ <a href="https://dnscrypt.info/stamps/" target="_blank" rel="noopener noreferrer" key="0" > DNS Stamps </a>, <a href="https://dnscrypt.info/" target="_blank" rel="noopener noreferrer" key="1" > DNSCrypt </a>, <a href="https://en.wikipedia.org/wiki/DNS_over_HTTPS" target="_blank" rel="noopener noreferrer" key="2" > DNS-over-HTTPS </a>, ]} > example_upstream_sdns </Trans> </span> </s> add <code>sdns://...</code>: <Trans components={[ <a href="https://dnscrypt.info/stamps/" target="_blank" rel="noopener noreferrer" key="0" > DNS Stamps </a>, <a href="https://dnscrypt.info/" target="_blank" rel="noopener noreferrer" key="1" > DNSCrypt </a>, <a href="https://en.wikipedia.org/wiki/DNS_over_HTTPS" target="_blank" rel="noopener noreferrer" key="2" > DNS-over-HTTPS </a>, ]} > example_upstream_sdns </Trans> </s> remove 'default': 784 </s> add 'default': 853 </s> remove <code>https://unfiltered.adguard-dns.com/dns-query</code>: <span> <Trans components={[ <a href="https://en.wikipedia.org/wiki/DNS_over_HTTPS" target="_blank" rel="noopener noreferrer" key="0" > DNS-over-HTTPS </a>, ]} > example_upstream_doh </Trans> </span> </s> add <code>https://unfiltered.adguard-dns.com/dns-query</code>: <Trans components={[ <a href="https://en.wikipedia.org/wiki/DNS_over_HTTPS" target="_blank" rel="noopener noreferrer" key="0" > DNS-over-HTTPS </a>, ]} > example_upstream_doh </Trans>
* `quic://unfiltered.adguard-dns.com`: encrypted DNS-over-QUIC.
* `https://unfiltered.adguard-dns.com/dns-query`: encrypted DNS-over-HTTPS. * `quic://unfiltered.adguard-dns.com`: encrypted DNS-over-QUIC. * `quic://unfiltered.adguard-dns.com`: encrypted DNS-over-QUIC. * `tcp://94.140.14.140`: plain DNS-over-TCP. * `sdns://...`: DNS Stamps for DNSCrypt or DNS-over-HTTPS resolvers.
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
Pull request #1572: 4640-imp-upstream-doc Updates #4640. Squashed commit of the following: commit 764b024e7a5a5f6ea2b18b5e13fdc4fa38c49af2 Merge: 7bace870 6856a803 Author: Ainar Garipov <[email protected]> Date: Fri Aug 19 17:17:44 2022 +0300 Merge branch 'master' into 4640-imp-upstream-doc commit 7bace870102633a2b8323c5f448ed38b65f4b482 Author: Ainar Garipov <[email protected]> Date: Thu Aug 18 19:49:07 2022 +0300 all: imp upstream examples
https://github.com/AdguardTeam/AdGuardHome/commit/1afd73ad0b50037bdb58130c7a21e080de88ea7d
openapi/v1.yaml
# 6060 : TCP : HTTP (pprof) # 8853 : UDP : DNS-over-QUIC (experimental) EXPOSE 53/tcp 53/udp 67/udp 68/udp 80/tcp 443/tcp 443/udp 784/udp\ 853/tcp 853/udp 3000/tcp 3000/udp 3001/tcp 3001/udp 5443/tcp\ 5443/udp 6060/tcp 8853/udp
</s> remove 'default': 784 </s> add 'default': 853 </s> remove 'default': 784 </s> add 'default': 853 </s> remove <code>quic://unfiltered.adguard-dns.com:784</code>: <span> <Trans components={[ <a href="https://datatracker.ietf.org/doc/html/rfc9250" target="_blank" rel="noopener noreferrer" key="0" > DNS-over-QUIC </a>, ]} > example_upstream_doq </Trans> </span> </s> add <code>quic://unfiltered.adguard-dns.com</code>: <Trans components={[ <a href="https://datatracker.ietf.org/doc/html/rfc9250" target="_blank" rel="noopener noreferrer" key="0" > DNS-over-QUIC </a>, ]} > example_upstream_doq </Trans> </s> remove * `quic://unfiltered.adguard-dns.com:784`: encrypted DNS-over-QUIC (experimental). </s> add * `quic://unfiltered.adguard-dns.com`: encrypted DNS-over-QUIC.
# # TODO(a.garipov): Remove the old, non-standard 784 and 8853 ports for # DNS-over-QUIC in a future release.
# 6060 : TCP : HTTP (pprof) # 8853 : UDP : DNS-over-QUIC (experimental) # # TODO(a.garipov): Remove the old, non-standard 784 and 8853 ports for # DNS-over-QUIC in a future release. EXPOSE 53/tcp 53/udp 67/udp 68/udp 80/tcp 443/tcp 443/udp 784/udp\ 853/tcp 853/udp 3000/tcp 3000/udp 3001/tcp 3001/udp 5443/tcp\ 5443/udp 6060/tcp 8853/udp
[ "keep", "add", "keep", "keep", "keep", "keep" ]
Pull request #1572: 4640-imp-upstream-doc Updates #4640. Squashed commit of the following: commit 764b024e7a5a5f6ea2b18b5e13fdc4fa38c49af2 Merge: 7bace870 6856a803 Author: Ainar Garipov <[email protected]> Date: Fri Aug 19 17:17:44 2022 +0300 Merge branch 'master' into 4640-imp-upstream-doc commit 7bace870102633a2b8323c5f448ed38b65f4b482 Author: Ainar Garipov <[email protected]> Date: Thu Aug 18 19:49:07 2022 +0300 all: imp upstream examples
https://github.com/AdguardTeam/AdGuardHome/commit/1afd73ad0b50037bdb58130c7a21e080de88ea7d
scripts/make/Dockerfile
httpError(w, http.StatusBadRequest, "Failed to parse new upstreams config json: %s", err) return } config.DNS.UpstreamDNS = defaultDNS if len(newconfig.Upstreams) > 0 { config.DNS.UpstreamDNS = newconfig.Upstreams } // bootstrap servers are plain DNS only.
</s> remove // bootstrap servers are plain DNS only. We should return http error if there are tls:// https:// or sdns:// hosts in slice </s> add // bootstrap servers are plain DNS only. </s> remove err := checkPlainDNS(host) if err != nil { </s> add if err := checkPlainDNS(host); err != nil { </s> remove return fmt.Errorf("%s is not valid port: %s", port, err) </s> add return fmt.Errorf("%s is not a valid port: %s", port, err) </s> remove return fmt.Errorf("%s is not valid IP", ip) </s> add return fmt.Errorf("%s is not a valid IP", ip)
for _, u := range newconfig.Upstreams { if err = validateUpstream(u); err != nil { httpError(w, http.StatusBadRequest, "%s can not be used as upstream cause: %s", u, err) return } }
httpError(w, http.StatusBadRequest, "Failed to parse new upstreams config json: %s", err) return } for _, u := range newconfig.Upstreams { if err = validateUpstream(u); err != nil { httpError(w, http.StatusBadRequest, "%s can not be used as upstream cause: %s", u, err) return } } config.DNS.UpstreamDNS = defaultDNS if len(newconfig.Upstreams) > 0 { config.DNS.UpstreamDNS = newconfig.Upstreams } // bootstrap servers are plain DNS only.
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
[change] control: add upstreams validation
https://github.com/AdguardTeam/AdGuardHome/commit/1b15bee2b09df5b2c31edf6d6d594aa53ac9124c
control.go
if len(newconfig.Upstreams) > 0 { config.DNS.UpstreamDNS = newconfig.Upstreams } // bootstrap servers are plain DNS only. We should return http error if there are tls:// https:// or sdns:// hosts in slice for _, host := range newconfig.BootstrapDNS { err := checkPlainDNS(host) if err != nil { httpError(w, http.StatusBadRequest, "%s can not be used as bootstrap dns cause: %s", host, err) return
</s> remove err := checkPlainDNS(host) if err != nil { </s> add if err := checkPlainDNS(host); err != nil { </s> remove if net.ParseIP(host) != nil { </s> add if net.ParseIP(upstream) != nil { </s> remove ip, port, err := net.SplitHostPort(host) </s> add ip, port, err := net.SplitHostPort(upstream) </s> remove return fmt.Errorf("%s is not valid IP", ip) </s> add return fmt.Errorf("%s is not a valid IP", ip)
// bootstrap servers are plain DNS only.
if len(newconfig.Upstreams) > 0 { config.DNS.UpstreamDNS = newconfig.Upstreams } // bootstrap servers are plain DNS only. for _, host := range newconfig.BootstrapDNS { err := checkPlainDNS(host) if err != nil { httpError(w, http.StatusBadRequest, "%s can not be used as bootstrap dns cause: %s", host, err) return
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
[change] control: add upstreams validation
https://github.com/AdguardTeam/AdGuardHome/commit/1b15bee2b09df5b2c31edf6d6d594aa53ac9124c
control.go
} // bootstrap servers are plain DNS only. We should return http error if there are tls:// https:// or sdns:// hosts in slice for _, host := range newconfig.BootstrapDNS { err := checkPlainDNS(host) if err != nil { httpError(w, http.StatusBadRequest, "%s can not be used as bootstrap dns cause: %s", host, err) return } }
</s> remove // bootstrap servers are plain DNS only. We should return http error if there are tls:// https:// or sdns:// hosts in slice </s> add // bootstrap servers are plain DNS only. </s> remove ip, port, err := net.SplitHostPort(host) </s> add ip, port, err := net.SplitHostPort(upstream) </s> remove if net.ParseIP(host) != nil { </s> add if net.ParseIP(upstream) != nil { </s> remove return fmt.Errorf("%s is not valid port: %s", port, err) </s> add return fmt.Errorf("%s is not a valid port: %s", port, err)
if err := checkPlainDNS(host); err != nil {
} // bootstrap servers are plain DNS only. We should return http error if there are tls:// https:// or sdns:// hosts in slice for _, host := range newconfig.BootstrapDNS { if err := checkPlainDNS(host); err != nil { if err := checkPlainDNS(host); err != nil { httpError(w, http.StatusBadRequest, "%s can not be used as bootstrap dns cause: %s", host, err) return } }
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
[change] control: add upstreams validation
https://github.com/AdguardTeam/AdGuardHome/commit/1b15bee2b09df5b2c31edf6d6d594aa53ac9124c
control.go
} // checkPlainDNS checks if host is plain DNS func checkPlainDNS(upstream string) error { // Check if host is ip without port if net.ParseIP(upstream) != nil { return nil
</s> remove func checkPlainDNS(host string) error { </s> add func checkPlainDNS(upstream string) error { </s> remove if net.ParseIP(host) != nil { </s> add if net.ParseIP(upstream) != nil { </s> remove ip, port, err := net.SplitHostPort(host) </s> add ip, port, err := net.SplitHostPort(upstream) </s> remove err := checkPlainDNS(host) if err != nil { </s> add if err := checkPlainDNS(host); err != nil { </s> remove // bootstrap servers are plain DNS only. We should return http error if there are tls:// https:// or sdns:// hosts in slice </s> add // bootstrap servers are plain DNS only.
func validateUpstream(upstream string) error { if strings.HasPrefix(upstream, "tls://") || strings.HasPrefix(upstream, "https://") || strings.HasPrefix(upstream, "sdns://") || strings.HasPrefix(upstream, "tcp://") { return nil } if strings.Contains(upstream, "://") { return fmt.Errorf("wrong protocol") } return checkPlainDNS(upstream) }
} func validateUpstream(upstream string) error { if strings.HasPrefix(upstream, "tls://") || strings.HasPrefix(upstream, "https://") || strings.HasPrefix(upstream, "sdns://") || strings.HasPrefix(upstream, "tcp://") { return nil } if strings.Contains(upstream, "://") { return fmt.Errorf("wrong protocol") } return checkPlainDNS(upstream) } // checkPlainDNS checks if host is plain DNS func checkPlainDNS(upstream string) error { // Check if host is ip without port if net.ParseIP(upstream) != nil { return nil
[ "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
[change] control: add upstreams validation
https://github.com/AdguardTeam/AdGuardHome/commit/1b15bee2b09df5b2c31edf6d6d594aa53ac9124c
control.go
httpUpdateConfigReloadDNSReturnOK(w, r) } // checkPlainDNS checks if host is plain DNS func checkPlainDNS(host string) error { // Check if host is ip without port if net.ParseIP(host) != nil { return nil }
</s> remove if net.ParseIP(host) != nil { </s> add if net.ParseIP(upstream) != nil { </s> remove ip, port, err := net.SplitHostPort(host) </s> add ip, port, err := net.SplitHostPort(upstream) </s> remove err := checkPlainDNS(host) if err != nil { </s> add if err := checkPlainDNS(host); err != nil { </s> remove // bootstrap servers are plain DNS only. We should return http error if there are tls:// https:// or sdns:// hosts in slice </s> add // bootstrap servers are plain DNS only.
func checkPlainDNS(upstream string) error {
httpUpdateConfigReloadDNSReturnOK(w, r) } // checkPlainDNS checks if host is plain DNS func checkPlainDNS(upstream string) error { // Check if host is ip without port if net.ParseIP(host) != nil { return nil }
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
[change] control: add upstreams validation
https://github.com/AdguardTeam/AdGuardHome/commit/1b15bee2b09df5b2c31edf6d6d594aa53ac9124c
control.go
// checkPlainDNS checks if host is plain DNS func checkPlainDNS(host string) error { // Check if host is ip without port if net.ParseIP(host) != nil { return nil } // Check if host is ip with port ip, port, err := net.SplitHostPort(host)
</s> remove func checkPlainDNS(host string) error { </s> add func checkPlainDNS(upstream string) error { </s> remove ip, port, err := net.SplitHostPort(host) </s> add ip, port, err := net.SplitHostPort(upstream) </s> remove err := checkPlainDNS(host) if err != nil { </s> add if err := checkPlainDNS(host); err != nil { </s> remove // bootstrap servers are plain DNS only. We should return http error if there are tls:// https:// or sdns:// hosts in slice </s> add // bootstrap servers are plain DNS only.
if net.ParseIP(upstream) != nil {
// checkPlainDNS checks if host is plain DNS func checkPlainDNS(host string) error { // Check if host is ip without port if net.ParseIP(upstream) != nil { return nil } // Check if host is ip with port ip, port, err := net.SplitHostPort(host)
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
[change] control: add upstreams validation
https://github.com/AdguardTeam/AdGuardHome/commit/1b15bee2b09df5b2c31edf6d6d594aa53ac9124c
control.go
return nil } // Check if host is ip with port ip, port, err := net.SplitHostPort(host) if err != nil { return err } if net.ParseIP(ip) == nil {
</s> remove if net.ParseIP(host) != nil { </s> add if net.ParseIP(upstream) != nil { </s> remove return fmt.Errorf("%s is not valid IP", ip) </s> add return fmt.Errorf("%s is not a valid IP", ip) </s> remove func checkPlainDNS(host string) error { </s> add func checkPlainDNS(upstream string) error { </s> remove err := checkPlainDNS(host) if err != nil { </s> add if err := checkPlainDNS(host); err != nil {
ip, port, err := net.SplitHostPort(upstream)
return nil } // Check if host is ip with port ip, port, err := net.SplitHostPort(upstream) if err != nil { return err } if net.ParseIP(ip) == nil {
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
[change] control: add upstreams validation
https://github.com/AdguardTeam/AdGuardHome/commit/1b15bee2b09df5b2c31edf6d6d594aa53ac9124c
control.go
return err } if net.ParseIP(ip) == nil { return fmt.Errorf("%s is not valid IP", ip) } _, err = strconv.ParseInt(port, 0, 64) if err != nil { return fmt.Errorf("%s is not valid port: %s", port, err)
</s> remove return fmt.Errorf("%s is not valid port: %s", port, err) </s> add return fmt.Errorf("%s is not a valid port: %s", port, err) </s> remove ip, port, err := net.SplitHostPort(host) </s> add ip, port, err := net.SplitHostPort(upstream) </s> remove err := checkPlainDNS(host) if err != nil { </s> add if err := checkPlainDNS(host); err != nil { </s> remove if net.ParseIP(host) != nil { </s> add if net.ParseIP(upstream) != nil {
return fmt.Errorf("%s is not a valid IP", ip)
return err } if net.ParseIP(ip) == nil { return fmt.Errorf("%s is not a valid IP", ip) } _, err = strconv.ParseInt(port, 0, 64) if err != nil { return fmt.Errorf("%s is not valid port: %s", port, err)
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
[change] control: add upstreams validation
https://github.com/AdguardTeam/AdGuardHome/commit/1b15bee2b09df5b2c31edf6d6d594aa53ac9124c
control.go
} _, err = strconv.ParseInt(port, 0, 64) if err != nil { return fmt.Errorf("%s is not valid port: %s", port, err) } return nil }
</s> remove return fmt.Errorf("%s is not valid IP", ip) </s> add return fmt.Errorf("%s is not a valid IP", ip) </s> remove ip, port, err := net.SplitHostPort(host) </s> add ip, port, err := net.SplitHostPort(upstream) </s> remove err := checkPlainDNS(host) if err != nil { </s> add if err := checkPlainDNS(host); err != nil { </s> remove if net.ParseIP(host) != nil { </s> add if net.ParseIP(upstream) != nil {
return fmt.Errorf("%s is not a valid port: %s", port, err)
} _, err = strconv.ParseInt(port, 0, 64) if err != nil { return fmt.Errorf("%s is not a valid port: %s", port, err) } return nil }
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
[change] control: add upstreams validation
https://github.com/AdguardTeam/AdGuardHome/commit/1b15bee2b09df5b2c31edf6d6d594aa53ac9124c
control.go
const defaultParentalURL = "%s://%s/check-parental-control-hash?prefixes=%s&sensitivity=%d" const defaultParentalSensitivity = 13 // use "TEEN" by default const maxDialCacheSize = 2 // the number of host names for safebrowsing and parental control // Custom filtering settings type RequestFilteringSettings struct { FilteringEnabled bool SafeSearchEnabled bool SafeBrowsingEnabled bool ParentalEnabled bool
</s> remove msg := d.Req host := strings.TrimSuffix(msg.Question[0].Name, ".") </s> add var res dnsfilter.Result req := d.Req host := strings.TrimSuffix(req.Question[0].Name, ".") origHost := host
// RequestFilteringSettings is custom filtering settings
const defaultParentalURL = "%s://%s/check-parental-control-hash?prefixes=%s&sensitivity=%d" const defaultParentalSensitivity = 13 // use "TEEN" by default const maxDialCacheSize = 2 // the number of host names for safebrowsing and parental control // RequestFilteringSettings is custom filtering settings type RequestFilteringSettings struct { FilteringEnabled bool SafeSearchEnabled bool SafeBrowsingEnabled bool ParentalEnabled bool
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
+ dnsforward: use Rewrites table
https://github.com/AdguardTeam/AdGuardHome/commit/1bb6638db796bd733a4b3a0066e7d045579119ec
dnsfilter/dnsfilter.go
} // Config allows you to configure DNS filtering with New() or just change variables directly. type Config struct { ParentalSensitivity int `yaml:"parental_sensitivity"` // must be either 3, 10, 13 or 17 ParentalEnabled bool `yaml:"parental_enabled"` UsePlainHTTP bool `yaml:"-"` // use plain HTTP for requests to parental and safe browsing servers
</s> remove // Custom filtering settings </s> add // RequestFilteringSettings is custom filtering settings
// RewriteEntry is a rewrite array element type RewriteEntry struct { Domain string `yaml:"domain"` Answer string `yaml:"answer"` // IP address or canonical name }
} // RewriteEntry is a rewrite array element type RewriteEntry struct { Domain string `yaml:"domain"` Answer string `yaml:"answer"` // IP address or canonical name } // Config allows you to configure DNS filtering with New() or just change variables directly. type Config struct { ParentalSensitivity int `yaml:"parental_sensitivity"` // must be either 3, 10, 13 or 17 ParentalEnabled bool `yaml:"parental_enabled"` UsePlainHTTP bool `yaml:"-"` // use plain HTTP for requests to parental and safe browsing servers
[ "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
+ dnsforward: use Rewrites table
https://github.com/AdguardTeam/AdGuardHome/commit/1bb6638db796bd733a4b3a0066e7d045579119ec
dnsfilter/dnsfilter.go
SafeBrowsingCacheSize int `yaml:"safebrowsing_cache_size"` SafeSearchCacheSize int `yaml:"safesearch_cache_size"` ParentalCacheSize int `yaml:"parental_cache_size"` // Filtering callback function FilterHandler func(clientAddr string, settings *RequestFilteringSettings) `yaml:"-"` } type privateConfig struct { parentalServer string // access via methods
</s> remove // Custom filtering settings </s> add // RequestFilteringSettings is custom filtering settings
Rewrites []RewriteEntry `yaml:"rewrites"`
SafeBrowsingCacheSize int `yaml:"safebrowsing_cache_size"` SafeSearchCacheSize int `yaml:"safesearch_cache_size"` ParentalCacheSize int `yaml:"parental_cache_size"` Rewrites []RewriteEntry `yaml:"rewrites"` // Filtering callback function FilterHandler func(clientAddr string, settings *RequestFilteringSettings) `yaml:"-"` } type privateConfig struct { parentalServer string // access via methods
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
+ dnsforward: use Rewrites table
https://github.com/AdguardTeam/AdGuardHome/commit/1bb6638db796bd733a4b3a0066e7d045579119ec
dnsfilter/dnsfilter.go
// FilteredSafeSearch - the host was replaced with safesearch variant FilteredSafeSearch ) func (i Reason) String() string { names := []string{
</s> remove // Custom filtering settings </s> add // RequestFilteringSettings is custom filtering settings </s> remove msg := d.Req host := strings.TrimSuffix(msg.Question[0].Name, ".") </s> add var res dnsfilter.Result req := d.Req host := strings.TrimSuffix(req.Question[0].Name, ".") origHost := host
// ReasonRewrite - rewrite rule was applied ReasonRewrite
// FilteredSafeSearch - the host was replaced with safesearch variant FilteredSafeSearch // ReasonRewrite - rewrite rule was applied ReasonRewrite ) func (i Reason) String() string { names := []string{
[ "keep", "add", "keep", "keep", "keep", "keep" ]
+ dnsforward: use Rewrites table
https://github.com/AdguardTeam/AdGuardHome/commit/1bb6638db796bd733a4b3a0066e7d045579119ec
dnsfilter/dnsfilter.go
"FilteredSafeBrowsing", "FilteredParental", "FilteredInvalid", "FilteredSafeSearch", } if uint(i) >= uint(len(names)) { return "" } return names[i] }
</s> remove var res dnsfilter.Result </s> add if host != origHost { log.Debug("Rewrite: not supported: CNAME for %s is %s", origHost, host) }
"Rewrite",
"FilteredSafeBrowsing", "FilteredParental", "FilteredInvalid", "FilteredSafeSearch", "Rewrite", } if uint(i) >= uint(len(names)) { return "" } return names[i] }
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
+ dnsforward: use Rewrites table
https://github.com/AdguardTeam/AdGuardHome/commit/1bb6638db796bd733a4b3a0066e7d045579119ec
dnsfilter/dnsfilter.go
IP net.IP `json:",omitempty"` // Not nil only in the case of a hosts file syntax FilterID int64 `json:",omitempty"` // Filter ID the rule belongs to } // Matched can be used to see if any match at all was found, no matter filtered or not func (r Reason) Matched() bool { return r != NotFilteredNotFound
</s> remove // Custom filtering settings </s> add // RequestFilteringSettings is custom filtering settings </s> remove msg := d.Req host := strings.TrimSuffix(msg.Question[0].Name, ".") </s> add var res dnsfilter.Result req := d.Req host := strings.TrimSuffix(req.Question[0].Name, ".") origHost := host
// for ReasonRewrite: CanonName string `json:",omitempty"` // CNAME value IPList []net.IP `json:",omitempty"` // list of IP addresses
IP net.IP `json:",omitempty"` // Not nil only in the case of a hosts file syntax FilterID int64 `json:",omitempty"` // Filter ID the rule belongs to // for ReasonRewrite: CanonName string `json:",omitempty"` // CNAME value IPList []net.IP `json:",omitempty"` // list of IP addresses } // Matched can be used to see if any match at all was found, no matter filtered or not func (r Reason) Matched() bool { return r != NotFilteredNotFound
[ "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
+ dnsforward: use Rewrites table
https://github.com/AdguardTeam/AdGuardHome/commit/1bb6638db796bd733a4b3a0066e7d045579119ec
dnsfilter/dnsfilter.go
var result Result var err error // try filter lists first if setts.FilteringEnabled { result, err = d.matchHost(host, qtype) if err != nil {
</s> remove var res dnsfilter.Result </s> add if host != origHost { log.Debug("Rewrite: not supported: CNAME for %s is %s", origHost, host) } </s> remove msg := d.Req host := strings.TrimSuffix(msg.Question[0].Name, ".") </s> add var res dnsfilter.Result req := d.Req host := strings.TrimSuffix(req.Question[0].Name, ".") origHost := host
result = d.processRewrites(host, qtype) if result.Reason == ReasonRewrite { return result, nil }
var result Result var err error result = d.processRewrites(host, qtype) if result.Reason == ReasonRewrite { return result, nil } // try filter lists first if setts.FilteringEnabled { result, err = d.matchHost(host, qtype) if err != nil {
[ "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
+ dnsforward: use Rewrites table
https://github.com/AdguardTeam/AdGuardHome/commit/1bb6638db796bd733a4b3a0066e7d045579119ec
dnsfilter/dnsfilter.go
if d.Res == nil { // request was not filtered so let it be processed further err = p.Resolve(d) if err != nil { return err }
</s> remove var res dnsfilter.Result </s> add if host != origHost { log.Debug("Rewrite: not supported: CNAME for %s is %s", origHost, host) } </s> remove msg := d.Req host := strings.TrimSuffix(msg.Question[0].Name, ".") </s> add var res dnsfilter.Result req := d.Req host := strings.TrimSuffix(req.Question[0].Name, ".") origHost := host
answer := []dns.RR{} originalQuestion := d.Req.Question[0] if res.Reason == dnsfilter.ReasonRewrite && len(res.CanonName) != 0 { answer = append(answer, s.genCNAMEAnswer(d.Req, res.CanonName)) // resolve canonical name, not the original host name d.Req.Question[0].Name = dns.Fqdn(res.CanonName) }
if d.Res == nil { answer := []dns.RR{} originalQuestion := d.Req.Question[0] if res.Reason == dnsfilter.ReasonRewrite && len(res.CanonName) != 0 { answer = append(answer, s.genCNAMEAnswer(d.Req, res.CanonName)) // resolve canonical name, not the original host name d.Req.Question[0].Name = dns.Fqdn(res.CanonName) } // request was not filtered so let it be processed further err = p.Resolve(d) if err != nil { return err }
[ "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
+ dnsforward: use Rewrites table
https://github.com/AdguardTeam/AdGuardHome/commit/1bb6638db796bd733a4b3a0066e7d045579119ec
dnsforward/dnsforward.go
return err } } shouldLog := true msg := d.Req
</s> remove msg := d.Req host := strings.TrimSuffix(msg.Question[0].Name, ".") </s> add var res dnsfilter.Result req := d.Req host := strings.TrimSuffix(req.Question[0].Name, ".") origHost := host
if res.Reason == dnsfilter.ReasonRewrite && len(res.CanonName) != 0 { d.Req.Question[0] = originalQuestion d.Res.Question[0] = originalQuestion if len(d.Res.Answer) != 0 { answer = append(answer, d.Res.Answer...) // host -> IP d.Res.Answer = answer } }
return err } if res.Reason == dnsfilter.ReasonRewrite && len(res.CanonName) != 0 { d.Req.Question[0] = originalQuestion d.Res.Question[0] = originalQuestion if len(d.Res.Answer) != 0 { answer = append(answer, d.Res.Answer...) // host -> IP d.Res.Answer = answer } } } shouldLog := true msg := d.Req
[ "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
+ dnsforward: use Rewrites table
https://github.com/AdguardTeam/AdGuardHome/commit/1bb6638db796bd733a4b3a0066e7d045579119ec
dnsforward/dnsforward.go
} // filterDNSRequest applies the dnsFilter and sets d.Res if the request was filtered func (s *Server) filterDNSRequest(d *proxy.DNSContext) (*dnsfilter.Result, error) { msg := d.Req host := strings.TrimSuffix(msg.Question[0].Name, ".") s.RLock() protectionEnabled := s.conf.ProtectionEnabled dnsFilter := s.dnsFilter s.RUnlock()
</s>
var res dnsfilter.Result req := d.Req host := strings.TrimSuffix(req.Question[0].Name, ".") origHost := host
} // filterDNSRequest applies the dnsFilter and sets d.Res if the request was filtered func (s *Server) filterDNSRequest(d *proxy.DNSContext) (*dnsfilter.Result, error) { var res dnsfilter.Result req := d.Req host := strings.TrimSuffix(req.Question[0].Name, ".") origHost := host var res dnsfilter.Result req := d.Req host := strings.TrimSuffix(req.Question[0].Name, ".") origHost := host s.RLock() protectionEnabled := s.conf.ProtectionEnabled dnsFilter := s.dnsFilter s.RUnlock()
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
+ dnsforward: use Rewrites table
https://github.com/AdguardTeam/AdGuardHome/commit/1bb6638db796bd733a4b3a0066e7d045579119ec
dnsforward/dnsforward.go
if !protectionEnabled { return nil, nil } var res dnsfilter.Result var err error clientAddr := "" if d.Addr != nil { clientAddr, _, _ = net.SplitHostPort(d.Addr.String())
</s> remove msg := d.Req host := strings.TrimSuffix(msg.Question[0].Name, ".") </s> add var res dnsfilter.Result req := d.Req host := strings.TrimSuffix(req.Question[0].Name, ".") origHost := host
if host != origHost { log.Debug("Rewrite: not supported: CNAME for %s is %s", origHost, host) }
if !protectionEnabled { return nil, nil } if host != origHost { log.Debug("Rewrite: not supported: CNAME for %s is %s", origHost, host) } var err error clientAddr := "" if d.Addr != nil { clientAddr, _, _ = net.SplitHostPort(d.Addr.String())
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
+ dnsforward: use Rewrites table
https://github.com/AdguardTeam/AdGuardHome/commit/1bb6638db796bd733a4b3a0066e7d045579119ec
dnsforward/dnsforward.go
return &resp } func (s *Server) genNXDomain(request *dns.Msg) *dns.Msg { resp := dns.Msg{} resp.SetRcode(request, dns.RcodeNameError) resp.RecursionAvailable = true
</s> remove msg := d.Req host := strings.TrimSuffix(msg.Question[0].Name, ".") </s> add var res dnsfilter.Result req := d.Req host := strings.TrimSuffix(req.Question[0].Name, ".") origHost := host </s> remove var res dnsfilter.Result </s> add if host != origHost { log.Debug("Rewrite: not supported: CNAME for %s is %s", origHost, host) }
// Make a CNAME response func (s *Server) genCNAMEAnswer(req *dns.Msg, cname string) *dns.CNAME { answer := new(dns.CNAME) answer.Hdr = dns.RR_Header{ Name: req.Question[0].Name, Rrtype: dns.TypeCNAME, Ttl: s.conf.BlockedResponseTTL, Class: dns.ClassINET, } answer.Target = dns.Fqdn(cname) return answer }
return &resp } // Make a CNAME response func (s *Server) genCNAMEAnswer(req *dns.Msg, cname string) *dns.CNAME { answer := new(dns.CNAME) answer.Hdr = dns.RR_Header{ Name: req.Question[0].Name, Rrtype: dns.TypeCNAME, Ttl: s.conf.BlockedResponseTTL, Class: dns.ClassINET, } answer.Target = dns.Fqdn(cname) return answer } func (s *Server) genNXDomain(request *dns.Msg) *dns.Msg { resp := dns.Msg{} resp.SetRcode(request, dns.RcodeNameError) resp.RecursionAvailable = true
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
+ dnsforward: use Rewrites table
https://github.com/AdguardTeam/AdGuardHome/commit/1bb6638db796bd733a4b3a0066e7d045579119ec
dnsforward/dnsforward.go
} } func TestParseService(t *testing.T) { if testParseOk(t).serviceControlAction != "" { t.Fatal("empty is no service command") }
</s> remove serviceControlAction: "run", configFilename: "config", workDir: "work", pidFile: "pid", disableUpdate: true, }, "-c", "config", "-w", "work", "-s", "run", "--pidfile", "pid", "--no-check-update") </s> add serviceControlAction: "run", configFilename: "config", workDir: "work", pidFile: "pid", disableUpdate: true, disableMemoryOptimization: true, }, "-c", "config", "-w", "work", "-s", "run", "--pidfile", "pid", "--no-check-update", "--no-mem-optimization")
func TestParseDisableMemoryOptimization(t *testing.T) { if testParseOk(t).disableMemoryOptimization { t.Fatal("empty is not disable update") } if !testParseOk(t, "--no-mem-optimization").disableMemoryOptimization { t.Fatal("--no-mem-optimization is disable update") } }
} } func TestParseDisableMemoryOptimization(t *testing.T) { if testParseOk(t).disableMemoryOptimization { t.Fatal("empty is not disable update") } if !testParseOk(t, "--no-mem-optimization").disableMemoryOptimization { t.Fatal("--no-mem-optimization is disable update") } } func TestParseService(t *testing.T) { if testParseOk(t).serviceControlAction != "" { t.Fatal("empty is no service command") }
[ "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
* (home): added tests for no-mem-optimization flag
https://github.com/AdguardTeam/AdGuardHome/commit/1c88667306e7a52d36a6a1cbf3eca86fd612bd7f
home/options_test.go
func TestSerializeGLInet(t *testing.T) { testSerialize(t, options{glinetMode: true}, "--glinet") } func TestSerializeMultiple(t *testing.T) { testSerialize(t, options{ serviceControlAction: "run", configFilename: "config", workDir: "work", pidFile: "pid",
</s> remove serviceControlAction: "run", configFilename: "config", workDir: "work", pidFile: "pid", disableUpdate: true, }, "-c", "config", "-w", "work", "-s", "run", "--pidfile", "pid", "--no-check-update") </s> add serviceControlAction: "run", configFilename: "config", workDir: "work", pidFile: "pid", disableUpdate: true, disableMemoryOptimization: true, }, "-c", "config", "-w", "work", "-s", "run", "--pidfile", "pid", "--no-check-update", "--no-mem-optimization")
func TestSerializeDisableMemoryOptimization(t *testing.T) { testSerialize(t, options{disableMemoryOptimization: true}, "--no-mem-optimization") }
func TestSerializeGLInet(t *testing.T) { testSerialize(t, options{glinetMode: true}, "--glinet") } func TestSerializeDisableMemoryOptimization(t *testing.T) { testSerialize(t, options{disableMemoryOptimization: true}, "--no-mem-optimization") } func TestSerializeMultiple(t *testing.T) { testSerialize(t, options{ serviceControlAction: "run", configFilename: "config", workDir: "work", pidFile: "pid",
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
* (home): added tests for no-mem-optimization flag
https://github.com/AdguardTeam/AdGuardHome/commit/1c88667306e7a52d36a6a1cbf3eca86fd612bd7f
home/options_test.go
} func TestSerializeMultiple(t *testing.T) { testSerialize(t, options{ serviceControlAction: "run", configFilename: "config", workDir: "work", pidFile: "pid", disableUpdate: true, }, "-c", "config", "-w", "work", "-s", "run", "--pidfile", "pid", "--no-check-update") }
</s>
serviceControlAction: "run", configFilename: "config", workDir: "work", pidFile: "pid", disableUpdate: true, disableMemoryOptimization: true, }, "-c", "config", "-w", "work", "-s", "run", "--pidfile", "pid", "--no-check-update", "--no-mem-optimization")
} func TestSerializeMultiple(t *testing.T) { testSerialize(t, options{ serviceControlAction: "run", configFilename: "config", workDir: "work", pidFile: "pid", disableUpdate: true, disableMemoryOptimization: true, }, "-c", "config", "-w", "work", "-s", "run", "--pidfile", "pid", "--no-check-update", "--no-mem-optimization") serviceControlAction: "run", configFilename: "config", workDir: "work", pidFile: "pid", disableUpdate: true, disableMemoryOptimization: true, }, "-c", "config", "-w", "work", "-s", "run", "--pidfile", "pid", "--no-check-update", "--no-mem-optimization") serviceControlAction: "run", configFilename: "config", workDir: "work", pidFile: "pid", disableUpdate: true, disableMemoryOptimization: true, }, "-c", "config", "-w", "work", "-s", "run", "--pidfile", "pid", "--no-check-update", "--no-mem-optimization") serviceControlAction: "run", configFilename: "config", workDir: "work", pidFile: "pid", disableUpdate: true, disableMemoryOptimization: true, }, "-c", "config", "-w", "work", "-s", "run", "--pidfile", "pid", "--no-check-update", "--no-mem-optimization") serviceControlAction: "run", configFilename: "config", workDir: "work", pidFile: "pid", disableUpdate: true, disableMemoryOptimization: true, }, "-c", "config", "-w", "work", "-s", "run", "--pidfile", "pid", "--no-check-update", "--no-mem-optimization") serviceControlAction: "run", configFilename: "config", workDir: "work", pidFile: "pid", disableUpdate: true, disableMemoryOptimization: true, }, "-c", "config", "-w", "work", "-s", "run", "--pidfile", "pid", "--no-check-update", "--no-mem-optimization") }
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "keep" ]
* (home): added tests for no-mem-optimization flag
https://github.com/AdguardTeam/AdGuardHome/commit/1c88667306e7a52d36a6a1cbf3eca86fd612bd7f
home/options_test.go
sync.RWMutex ServerConfig } // uncomment this block to have tracing of locks /* func (s *Server) Lock() { pc := make([]uintptr, 10) // at least 1 entry needed runtime.Callers(2, pc) f := runtime.FuncForPC(pc[0])
</s> remove upstream := s.chooseUpstream() </s> add
const ( safeBrowsingBlockHost = "standard-block.dns.adguard.com" parentalBlockHost = "family-block.dns.adguard.com" )
sync.RWMutex ServerConfig } const ( safeBrowsingBlockHost = "standard-block.dns.adguard.com" parentalBlockHost = "family-block.dns.adguard.com" ) // uncomment this block to have tracing of locks /* func (s *Server) Lock() { pc := make([]uintptr, 10) // at least 1 entry needed runtime.Callers(2, pc) f := runtime.FuncForPC(pc[0])
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
Resolve into a stub page when blocked by parental or safebrowsing. Closes #475.
https://github.com/AdguardTeam/AdGuardHome/commit/1c89e1df32d5fcb9d69156c9bfcc1680f733d1dd
dnsforward/dnsforward.go
return s.genNotImpl(msg), nil, nil, nil } host := strings.TrimSuffix(msg.Question[0].Name, ".") // use dnsfilter before cache -- changed settings or filters would require cache invalidation otherwise var res dnsfilter.Result var err error
</s> remove upstream := s.chooseUpstream() </s> add
// we need upstream to resolve A records upstream := s.chooseUpstream()
return s.genNotImpl(msg), nil, nil, nil } // we need upstream to resolve A records upstream := s.chooseUpstream() host := strings.TrimSuffix(msg.Question[0].Name, ".") // use dnsfilter before cache -- changed settings or filters would require cache invalidation otherwise var res dnsfilter.Result var err error
[ "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
Resolve into a stub page when blocked by parental or safebrowsing. Closes #475.
https://github.com/AdguardTeam/AdGuardHome/commit/1c89e1df32d5fcb9d69156c9bfcc1680f733d1dd
dnsforward/dnsforward.go
log.Printf("dnsfilter failed to check host '%s': %s", host, err) return s.genServerFailure(msg), &res, nil, err } else if res.IsFiltered { log.Printf("Host %s is filtered, reason - '%s', matched rule: '%s'", host, res.Reason, res.Rule) return s.genNXDomain(msg), &res, nil, nil } } {
</s> remove upstream := s.chooseUpstream() </s> add
switch res.Reason { case dnsfilter.FilteredSafeBrowsing: return s.genArecord(msg, safeBrowsingBlockHost, upstream), &res, nil, nil case dnsfilter.FilteredParental: return s.genArecord(msg, parentalBlockHost, upstream), &res, nil, nil }
log.Printf("dnsfilter failed to check host '%s': %s", host, err) return s.genServerFailure(msg), &res, nil, err } else if res.IsFiltered { log.Printf("Host %s is filtered, reason - '%s', matched rule: '%s'", host, res.Reason, res.Rule) switch res.Reason { case dnsfilter.FilteredSafeBrowsing: return s.genArecord(msg, safeBrowsingBlockHost, upstream), &res, nil, nil case dnsfilter.FilteredParental: return s.genArecord(msg, parentalBlockHost, upstream), &res, nil, nil } return s.genNXDomain(msg), &res, nil, nil } } {
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
Resolve into a stub page when blocked by parental or safebrowsing. Closes #475.
https://github.com/AdguardTeam/AdGuardHome/commit/1c89e1df32d5fcb9d69156c9bfcc1680f733d1dd
dnsforward/dnsforward.go
} } // TODO: replace with single-socket implementation upstream := s.chooseUpstream() reply, err := upstream.Exchange(msg) if err != nil { log.Printf("talking to upstream failed for host '%s': %s", host, err) return s.genServerFailure(msg), &res, upstream, err }
</s>
} } // TODO: replace with single-socket implementation reply, err := upstream.Exchange(msg) if err != nil { log.Printf("talking to upstream failed for host '%s': %s", host, err) return s.genServerFailure(msg), &res, upstream, err }
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
Resolve into a stub page when blocked by parental or safebrowsing. Closes #475.
https://github.com/AdguardTeam/AdGuardHome/commit/1c89e1df32d5fcb9d69156c9bfcc1680f733d1dd
dnsforward/dnsforward.go
// these variables need to survive coredns reload var ( stats Stats safebrowsingCache = gcache.New(defaultCacheSize).LRU().Expiration(defaultCacheTime).Build() parentalCache = gcache.New(defaultCacheSize).LRU().Expiration(defaultCacheTime).Build() ) // Result holds state of hostname check type Result struct { IsFiltered bool
</s> remove d.transport.CloseIdleConnections() </s> add if d != nil && d.transport != nil { d.transport.CloseIdleConnections() }
safebrowsingCache gcache.Cache parentalCache gcache.Cache
// these variables need to survive coredns reload var ( stats Stats safebrowsingCache gcache.Cache parentalCache gcache.Cache safebrowsingCache gcache.Cache parentalCache gcache.Cache ) // Result holds state of hostname check type Result struct { IsFiltered bool
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
dnsfilter -- lazily initialize safebrowsing and parental lookup cache
https://github.com/AdguardTeam/AdGuardHome/commit/1cc1e3749df6ccefb741232d7949fd5893d84f66
dnsfilter/dnsfilter.go
return result, nil } result, err := d.lookupCommon(host, &stats.Safebrowsing, safebrowsingCache, true, format, handleBody) return result, err } func (d *Dnsfilter) checkParental(host string) (Result, error) { // prevent recursion -- checking the host of parental safety server makes no sense
</s> remove d.transport.CloseIdleConnections() </s> add if d != nil && d.transport != nil { d.transport.CloseIdleConnections() } </s> remove safebrowsingCache = gcache.New(defaultCacheSize).LRU().Expiration(defaultCacheTime).Build() parentalCache = gcache.New(defaultCacheSize).LRU().Expiration(defaultCacheTime).Build() </s> add safebrowsingCache gcache.Cache parentalCache gcache.Cache
if safebrowsingCache == nil { safebrowsingCache = gcache.New(defaultCacheSize).LRU().Expiration(defaultCacheTime).Build() }
return result, nil } if safebrowsingCache == nil { safebrowsingCache = gcache.New(defaultCacheSize).LRU().Expiration(defaultCacheTime).Build() } result, err := d.lookupCommon(host, &stats.Safebrowsing, safebrowsingCache, true, format, handleBody) return result, err } func (d *Dnsfilter) checkParental(host string) (Result, error) { // prevent recursion -- checking the host of parental safety server makes no sense
[ "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
dnsfilter -- lazily initialize safebrowsing and parental lookup cache
https://github.com/AdguardTeam/AdGuardHome/commit/1cc1e3749df6ccefb741232d7949fd5893d84f66
dnsfilter/dnsfilter.go
return result, nil } result, err := d.lookupCommon(host, &stats.Parental, parentalCache, false, format, handleBody) return result, err } // real implementation of lookup/check
</s> remove d.transport.CloseIdleConnections() </s> add if d != nil && d.transport != nil { d.transport.CloseIdleConnections() } </s> remove safebrowsingCache = gcache.New(defaultCacheSize).LRU().Expiration(defaultCacheTime).Build() parentalCache = gcache.New(defaultCacheSize).LRU().Expiration(defaultCacheTime).Build() </s> add safebrowsingCache gcache.Cache parentalCache gcache.Cache
if parentalCache == nil { parentalCache = gcache.New(defaultCacheSize).LRU().Expiration(defaultCacheTime).Build() }
return result, nil } if parentalCache == nil { parentalCache = gcache.New(defaultCacheSize).LRU().Expiration(defaultCacheTime).Build() } result, err := d.lookupCommon(host, &stats.Parental, parentalCache, false, format, handleBody) return result, err } // real implementation of lookup/check
[ "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
dnsfilter -- lazily initialize safebrowsing and parental lookup cache
https://github.com/AdguardTeam/AdGuardHome/commit/1cc1e3749df6ccefb741232d7949fd5893d84f66
dnsfilter/dnsfilter.go
// Destroy is optional if you want to tidy up goroutines without waiting for them to die off // right now it closes idle HTTP connections if there are any func (d *Dnsfilter) Destroy() { d.transport.CloseIdleConnections() } // // config manipulation helpers //
</s> remove safebrowsingCache = gcache.New(defaultCacheSize).LRU().Expiration(defaultCacheTime).Build() parentalCache = gcache.New(defaultCacheSize).LRU().Expiration(defaultCacheTime).Build() </s> add safebrowsingCache gcache.Cache parentalCache gcache.Cache
if d != nil && d.transport != nil { d.transport.CloseIdleConnections() }
// Destroy is optional if you want to tidy up goroutines without waiting for them to die off // right now it closes idle HTTP connections if there are any func (d *Dnsfilter) Destroy() { if d != nil && d.transport != nil { d.transport.CloseIdleConnections() } } // // config manipulation helpers //
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
dnsfilter -- lazily initialize safebrowsing and parental lookup cache
https://github.com/AdguardTeam/AdGuardHome/commit/1cc1e3749df6ccefb741232d7949fd5893d84f66
dnsfilter/dnsfilter.go
import { saveAs } from 'file-saver/FileSaver'; import escapeRegExp from 'lodash/escapeRegExp'; import endsWith from 'lodash/endsWith'; import PageTitle from '../ui/PageTitle'; import Card from '../ui/Card'; import Loading from '../ui/Loading'; import Tooltip from '../ui/Tooltip'; import './Logs.css';
</s> remove const formatTime = (time) => { </s> add export const formatTime = (time) => { </s> remove time: formatTime(time), </s> add time, </s> remove {queryLogEnabled && queryLogs.processing && <Loading />} {queryLogEnabled && !queryLogs.processing && </s> add {queryLogEnabled && queryLogs.getLogsProcessing && <Loading />} {queryLogEnabled && !queryLogs.getLogsProcessing &&
import { formatTime } from '../../helpers/helpers';
import { saveAs } from 'file-saver/FileSaver'; import escapeRegExp from 'lodash/escapeRegExp'; import endsWith from 'lodash/endsWith'; import { formatTime } from '../../helpers/helpers'; import PageTitle from '../ui/PageTitle'; import Card from '../ui/Card'; import Loading from '../ui/Loading'; import Tooltip from '../ui/Tooltip'; import './Logs.css';
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
Fix sorting issue and show loader Closes #362
https://github.com/AdguardTeam/AdGuardHome/commit/1cdbe3f879566f8e08ad0fa88daad5b568750820
client/src/components/Logs/index.js
Header: 'Time', accessor: 'time', maxWidth: 110, filterable: false, }, { Header: 'Domain name', accessor: 'domain', Cell: (row) => { const response = row.value;
</s> remove const formatTime = (time) => { </s> add export const formatTime = (time) => { </s> remove time: formatTime(time), </s> add time, </s> remove {queryLogEnabled && queryLogs.processing && <Loading />} {queryLogEnabled && !queryLogs.processing && </s> add {queryLogEnabled && queryLogs.getLogsProcessing && <Loading />} {queryLogEnabled && !queryLogs.getLogsProcessing &&
Cell: ({ value }) => (<div className="logs__row"><span className="logs__text" title={value}>{formatTime(value)}</span></div>),
Header: 'Time', accessor: 'time', maxWidth: 110, filterable: false, Cell: ({ value }) => (<div className="logs__row"><span className="logs__text" title={value}>{formatTime(value)}</span></div>), }, { Header: 'Domain name', accessor: 'domain', Cell: (row) => { const response = row.value;
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
Fix sorting issue and show loader Closes #362
https://github.com/AdguardTeam/AdGuardHome/commit/1cdbe3f879566f8e08ad0fa88daad5b568750820
client/src/components/Logs/index.js
{this.renderButtons(queryLogEnabled)} </div> </PageTitle> <Card> {queryLogEnabled && queryLogs.processing && <Loading />} {queryLogEnabled && !queryLogs.processing && this.renderLogs(queryLogs.logs)} </Card> </Fragment> ); }
</s> remove time: formatTime(time), </s> add time, </s> remove const formatTime = (time) => { </s> add export const formatTime = (time) => {
{queryLogEnabled && queryLogs.getLogsProcessing && <Loading />} {queryLogEnabled && !queryLogs.getLogsProcessing &&
{this.renderButtons(queryLogEnabled)} </div> </PageTitle> <Card> {queryLogEnabled && queryLogs.getLogsProcessing && <Loading />} {queryLogEnabled && !queryLogs.getLogsProcessing && {queryLogEnabled && queryLogs.getLogsProcessing && <Loading />} {queryLogEnabled && !queryLogs.getLogsProcessing && this.renderLogs(queryLogs.logs)} </Card> </Fragment> ); }
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
Fix sorting issue and show loader Closes #362
https://github.com/AdguardTeam/AdGuardHome/commit/1cdbe3f879566f8e08ad0fa88daad5b568750820
client/src/components/Logs/index.js
import round from 'lodash/round'; import { STATS_NAMES } from './constants'; const formatTime = (time) => { const parsedTime = dateParse(time); return dateFormat(parsedTime, 'HH:mm:ss'); }; export const normalizeLogs = logs => logs.map((log) => {
</s> remove time: formatTime(time), </s> add time, </s> remove {queryLogEnabled && queryLogs.processing && <Loading />} {queryLogEnabled && !queryLogs.processing && </s> add {queryLogEnabled && queryLogs.getLogsProcessing && <Loading />} {queryLogEnabled && !queryLogs.getLogsProcessing &&
export const formatTime = (time) => {
import round from 'lodash/round'; import { STATS_NAMES } from './constants'; export const formatTime = (time) => { const parsedTime = dateParse(time); return dateFormat(parsedTime, 'HH:mm:ss'); }; export const normalizeLogs = logs => logs.map((log) => {
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
Fix sorting issue and show loader Closes #362
https://github.com/AdguardTeam/AdGuardHome/commit/1cdbe3f879566f8e08ad0fa88daad5b568750820
client/src/helpers/helpers.js
const { value, type, ttl } = response; return `${type}: ${value} (ttl=${ttl})`; }) : []; return { time: formatTime(time), domain, type, response: responsesArray, reason, client,
</s> remove const formatTime = (time) => { </s> add export const formatTime = (time) => { </s> remove {queryLogEnabled && queryLogs.processing && <Loading />} {queryLogEnabled && !queryLogs.processing && </s> add {queryLogEnabled && queryLogs.getLogsProcessing && <Loading />} {queryLogEnabled && !queryLogs.getLogsProcessing &&
time,
const { value, type, ttl } = response; return `${type}: ${value} (ttl=${ttl})`; }) : []; return { time, domain, type, response: responsesArray, reason, client,
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
Fix sorting issue and show loader Closes #362
https://github.com/AdguardTeam/AdGuardHome/commit/1cdbe3f879566f8e08ad0fa88daad5b568750820
client/src/helpers/helpers.js
columns={[ { Header: 'MAC', accessor: 'mac', Cell: this.cellWrap, }, { Header: 'IP', accessor: 'ip', minWidth: 230,
</s>
minWidth: 160,
columns={[ { Header: 'MAC', accessor: 'mac', minWidth: 160, Cell: this.cellWrap, }, { Header: 'IP', accessor: 'ip', minWidth: 230,
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
Pull request 1775: 5581-leases-table-mobile Updates #5581. Squashed commit of the following: commit 2034c2f9c369f5e2a6e9826090fffa356fc16624 Author: Vladislav Abdulmyanov <[email protected]> Date: Mon Mar 20 17:44:40 2023 +0200 client: fix static leases commit be509f0037af58a0e0e8c82d283b14910c20110b Author: Vladislav Abdulmyanov <[email protected]> Date: Mon Mar 20 17:23:34 2023 +0200 client: fix leases table on mobile
https://github.com/AdguardTeam/AdGuardHome/commit/1daabb97e54e3cc2fa8a5046ddaae3c01dd60d2c
client/src/components/Settings/Dhcp/Leases.js
Cell: this.cellWrap, }, { Header: 'IP', accessor: 'ip', Cell: this.cellWrap, sortMethod: sortIp, }, { Header: <Trans>dhcp_table_hostname</Trans>, accessor: 'hostname', minWidth: 230,
</s>
minWidth: 230,
Cell: this.cellWrap, }, { Header: 'IP', accessor: 'ip', minWidth: 230, Cell: this.cellWrap, sortMethod: sortIp, }, { Header: <Trans>dhcp_table_hostname</Trans>, accessor: 'hostname', minWidth: 230,
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
Pull request 1775: 5581-leases-table-mobile Updates #5581. Squashed commit of the following: commit 2034c2f9c369f5e2a6e9826090fffa356fc16624 Author: Vladislav Abdulmyanov <[email protected]> Date: Mon Mar 20 17:44:40 2023 +0200 client: fix static leases commit be509f0037af58a0e0e8c82d283b14910c20110b Author: Vladislav Abdulmyanov <[email protected]> Date: Mon Mar 20 17:23:34 2023 +0200 client: fix leases table on mobile
https://github.com/AdguardTeam/AdGuardHome/commit/1daabb97e54e3cc2fa8a5046ddaae3c01dd60d2c
client/src/components/Settings/Dhcp/Leases.js
}, { Header: <Trans>dhcp_table_hostname</Trans>, accessor: 'hostname', Cell: this.cellWrap, }, { Header: <Trans>dhcp_table_expires</Trans>, accessor: 'expires',
</s>
minWidth: 230,
}, { Header: <Trans>dhcp_table_hostname</Trans>, accessor: 'hostname', minWidth: 230, Cell: this.cellWrap, }, { Header: <Trans>dhcp_table_expires</Trans>, accessor: 'expires',
[ "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
Pull request 1775: 5581-leases-table-mobile Updates #5581. Squashed commit of the following: commit 2034c2f9c369f5e2a6e9826090fffa356fc16624 Author: Vladislav Abdulmyanov <[email protected]> Date: Mon Mar 20 17:44:40 2023 +0200 client: fix static leases commit be509f0037af58a0e0e8c82d283b14910c20110b Author: Vladislav Abdulmyanov <[email protected]> Date: Mon Mar 20 17:23:34 2023 +0200 client: fix leases table on mobile
https://github.com/AdguardTeam/AdGuardHome/commit/1daabb97e54e3cc2fa8a5046ddaae3c01dd60d2c
client/src/components/Settings/Dhcp/Leases.js
Cell: this.cellWrap, }, { Header: <Trans>dhcp_table_expires</Trans>, accessor: 'expires', Cell: this.cellWrap, }, ]} pageSize={LEASES_TABLE_DEFAULT_PAGE_SIZE} showPageSizeOptions={false} showPagination={leases.length > LEASES_TABLE_DEFAULT_PAGE_SIZE}
</s>
minWidth: 130,
Cell: this.cellWrap, }, { Header: <Trans>dhcp_table_expires</Trans>, accessor: 'expires', minWidth: 130, Cell: this.cellWrap, }, ]} pageSize={LEASES_TABLE_DEFAULT_PAGE_SIZE} showPageSizeOptions={false} showPagination={leases.length > LEASES_TABLE_DEFAULT_PAGE_SIZE}
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
Pull request 1775: 5581-leases-table-mobile Updates #5581. Squashed commit of the following: commit 2034c2f9c369f5e2a6e9826090fffa356fc16624 Author: Vladislav Abdulmyanov <[email protected]> Date: Mon Mar 20 17:44:40 2023 +0200 client: fix static leases commit be509f0037af58a0e0e8c82d283b14910c20110b Author: Vladislav Abdulmyanov <[email protected]> Date: Mon Mar 20 17:23:34 2023 +0200 client: fix leases table on mobile
https://github.com/AdguardTeam/AdGuardHome/commit/1daabb97e54e3cc2fa8a5046ddaae3c01dd60d2c
client/src/components/Settings/Dhcp/Leases.js
{ Header: 'MAC', accessor: 'mac', Cell: cellWrap, }, { Header: 'IP',
</s>
minWidth: 160,
{ Header: 'MAC', accessor: 'mac', minWidth: 160, Cell: cellWrap, }, { Header: 'IP',
[ "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
Pull request 1775: 5581-leases-table-mobile Updates #5581. Squashed commit of the following: commit 2034c2f9c369f5e2a6e9826090fffa356fc16624 Author: Vladislav Abdulmyanov <[email protected]> Date: Mon Mar 20 17:44:40 2023 +0200 client: fix static leases commit be509f0037af58a0e0e8c82d283b14910c20110b Author: Vladislav Abdulmyanov <[email protected]> Date: Mon Mar 20 17:23:34 2023 +0200 client: fix leases table on mobile
https://github.com/AdguardTeam/AdGuardHome/commit/1daabb97e54e3cc2fa8a5046ddaae3c01dd60d2c
client/src/components/Settings/Dhcp/StaticLeases/index.js
Header: 'IP', accessor: 'ip', sortMethod: sortIp, Cell: cellWrap, }, {
</s>
minWidth: 230,
Header: 'IP', accessor: 'ip', minWidth: 230, sortMethod: sortIp, Cell: cellWrap, }, {
[ "keep", "add", "keep", "keep", "keep", "keep" ]
Pull request 1775: 5581-leases-table-mobile Updates #5581. Squashed commit of the following: commit 2034c2f9c369f5e2a6e9826090fffa356fc16624 Author: Vladislav Abdulmyanov <[email protected]> Date: Mon Mar 20 17:44:40 2023 +0200 client: fix static leases commit be509f0037af58a0e0e8c82d283b14910c20110b Author: Vladislav Abdulmyanov <[email protected]> Date: Mon Mar 20 17:23:34 2023 +0200 client: fix leases table on mobile
https://github.com/AdguardTeam/AdGuardHome/commit/1daabb97e54e3cc2fa8a5046ddaae3c01dd60d2c
client/src/components/Settings/Dhcp/StaticLeases/index.js
Header: <Trans>dhcp_table_hostname</Trans>, accessor: 'hostname', Cell: cellWrap, }, { Header: <Trans>actions_table_header</Trans>, accessor: 'actions',
</s>
minWidth: 230,
Header: <Trans>dhcp_table_hostname</Trans>, accessor: 'hostname', minWidth: 230, Cell: cellWrap, }, { Header: <Trans>actions_table_header</Trans>, accessor: 'actions',
[ "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
Pull request 1775: 5581-leases-table-mobile Updates #5581. Squashed commit of the following: commit 2034c2f9c369f5e2a6e9826090fffa356fc16624 Author: Vladislav Abdulmyanov <[email protected]> Date: Mon Mar 20 17:44:40 2023 +0200 client: fix static leases commit be509f0037af58a0e0e8c82d283b14910c20110b Author: Vladislav Abdulmyanov <[email protected]> Date: Mon Mar 20 17:23:34 2023 +0200 client: fix leases table on mobile
https://github.com/AdguardTeam/AdGuardHome/commit/1daabb97e54e3cc2fa8a5046ddaae3c01dd60d2c
client/src/components/Settings/Dhcp/StaticLeases/index.js
"local_ptr_title": "Private reverse DNS servers", "local_ptr_desc": "The DNS servers that AdGuard Home uses for local PTR queries. These servers are used to resolve the hostnames of clients with private IP addresses, for example \"192.168.12.34\", using rDNS. If not set, AdGuard Home uses the default DNS resolvers of your OS.", "local_ptr_placeholder": "Enter one server address per line", "resolve_clients_title": "Enable reverse resolving of clients' IP addresses", "resolve_clients_desc": "If enabled, AdGuard Home will attempt to reversely resolve clients' IP addresses into their hostnames by sending PTR queries to corresponding resolvers (private DNS servers for local clients, upstream servers for clients with public IP addresses).", "use_private_ptr_resolvers_title": "Use private rDNS resolvers", "use_private_ptr_resolvers_desc": "Perform reverse DNS lookups for locally-served addresses using these upstream servers. If disabled, AdGuard Home responds with NXDOMAIN to all such PTR requests except for clients known from DHCP, /etc/hosts, and so on.",
</s> remove // Get returns the slice of local resolvers' addresses. // It should be safe for concurrent use. </s> add // Get returns the slice of local resolvers' addresses. It should be // safe for concurrent use. </s> remove ourAddrsSet := aghstrings.NewSet(ourAddrs...) // TODO(e.burkov): The approach of subtracting sets of strings is not // really applicable here since in case of listening on all network // interfaces we should check the whole interface's network to cut off // all the loopback addresses as well. localAddrs = aghstrings.FilterOut(localAddrs, ourAddrsSet.Has) </s> add log.Debug("upstreams to resolve PTR for local addresses: %v", localAddrs) </s> remove log.Debug("upstreams to resolve PTR for local addresses: %v", localAddrs) </s> add </s> remove var ourAddrs []string ourAddrs, err = s.collectDNSIPAddrs() </s> add localAddrs, err = s.filterOurDNSAddrs(localAddrs)
"local_ptr_default_resolver": "By default, AdGuard Home will use the following DNS resolvers: {{ip}}", "local_ptr_no_default_resolver": "AdGuard Home could not determine suitable private rDNS resolvers for this system.",
"local_ptr_title": "Private reverse DNS servers", "local_ptr_desc": "The DNS servers that AdGuard Home uses for local PTR queries. These servers are used to resolve the hostnames of clients with private IP addresses, for example \"192.168.12.34\", using rDNS. If not set, AdGuard Home uses the default DNS resolvers of your OS.", "local_ptr_default_resolver": "By default, AdGuard Home will use the following DNS resolvers: {{ip}}", "local_ptr_no_default_resolver": "AdGuard Home could not determine suitable private rDNS resolvers for this system.", "local_ptr_placeholder": "Enter one server address per line", "resolve_clients_title": "Enable reverse resolving of clients' IP addresses", "resolve_clients_desc": "If enabled, AdGuard Home will attempt to reversely resolve clients' IP addresses into their hostnames by sending PTR queries to corresponding resolvers (private DNS servers for local clients, upstream servers for clients with public IP addresses).", "use_private_ptr_resolvers_title": "Use private rDNS resolvers", "use_private_ptr_resolvers_desc": "Perform reverse DNS lookups for locally-served addresses using these upstream servers. If disabled, AdGuard Home responds with NXDOMAIN to all such PTR requests except for clients known from DHCP, /etc/hosts, and so on.",
[ "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
Pull request: 3136 show default resolvers Merge in DNS/adguard-home from 3136-show-default to master Closes #3136. Squashed commit of the following: commit add09a772dddcccd404056e7649c2d3350a79fec Author: Eugene Burkov <[email protected]> Date: Tue Jun 1 11:11:24 2021 +0300 openapi: fix typo commit 69e402c49318d53a0d03b81207644d9fb04a139a Merge: 76e8492c e17e1f20 Author: Eugene Burkov <[email protected]> Date: Tue Jun 1 11:09:51 2021 +0300 Merge branch 'master' into 3136-show-default commit 76e8492c8da679e204ceb7a77f1c6f73a2488040 Author: Ildar Kamalov <[email protected]> Date: Tue Jun 1 10:55:09 2021 +0300 client: check upstreams commit 05fe6ea196a1ed9386eec25dbfbe22779fe7bcfd Author: Vlad <[email protected]> Date: Mon May 31 19:23:35 2021 +0300 add defaul resolvers line commit 8d63c7df9947c9588478d1173834b42569fd8951 Author: Eugene Burkov <[email protected]> Date: Mon May 31 11:56:08 2021 +0300 all: imp changelog commit e3912e3b20eca9dcf90ddddaa5edb54d1e0cfe6e Author: Eugene Burkov <[email protected]> Date: Fri May 28 20:23:05 2021 +0300 all: add local ptr resolvers addresses output
https://github.com/AdguardTeam/AdGuardHome/commit/1e55db408f78eccb36f2bd4afa719c1c9d88c470
client/src/__locales/en.json
const { t } = useTranslation(); const upstream_dns = useSelector((store) => store.form[FORM_NAME.UPSTREAM].values.upstream_dns); const processingTestUpstream = useSelector((state) => state.settings.processingTestUpstream); const processingSetConfig = useSelector((state) => state.dnsConfig.processingSetConfig); const handleUpstreamTest = () => dispatch(testUpstreamWithFormValues()); const testButtonClass = classnames('btn btn-primary btn-standard mr-2', { 'btn-loading': processingTestUpstream,
</s> remove log.Debug("upstreams to resolve PTR for local addresses: %v", localAddrs) </s> add </s> remove var ourAddrs []string ourAddrs, err = s.collectDNSIPAddrs() </s> add localAddrs, err = s.filterOurDNSAddrs(localAddrs) </s> remove var sysRes aghnet.SystemResolvers // TODO(e.burkov): Enable the refresher after the actual // implementation passes the public testing. sysRes, err = aghnet.NewSystemResolvers(0, nil) if err != nil { return err } localAddrs = sysRes.Get() </s> add localAddrs = s.sysResolvers.Get()
const defaultLocalPtrUpstreams = useSelector( (state) => state.dnsConfig.default_local_ptr_upstreams, );
const { t } = useTranslation(); const upstream_dns = useSelector((store) => store.form[FORM_NAME.UPSTREAM].values.upstream_dns); const processingTestUpstream = useSelector((state) => state.settings.processingTestUpstream); const processingSetConfig = useSelector((state) => state.dnsConfig.processingSetConfig); const defaultLocalPtrUpstreams = useSelector( (state) => state.dnsConfig.default_local_ptr_upstreams, ); const handleUpstreamTest = () => dispatch(testUpstreamWithFormValues()); const testButtonClass = classnames('btn btn-primary btn-standard mr-2', { 'btn-loading': processingTestUpstream,
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
Pull request: 3136 show default resolvers Merge in DNS/adguard-home from 3136-show-default to master Closes #3136. Squashed commit of the following: commit add09a772dddcccd404056e7649c2d3350a79fec Author: Eugene Burkov <[email protected]> Date: Tue Jun 1 11:11:24 2021 +0300 openapi: fix typo commit 69e402c49318d53a0d03b81207644d9fb04a139a Merge: 76e8492c e17e1f20 Author: Eugene Burkov <[email protected]> Date: Tue Jun 1 11:09:51 2021 +0300 Merge branch 'master' into 3136-show-default commit 76e8492c8da679e204ceb7a77f1c6f73a2488040 Author: Ildar Kamalov <[email protected]> Date: Tue Jun 1 10:55:09 2021 +0300 client: check upstreams commit 05fe6ea196a1ed9386eec25dbfbe22779fe7bcfd Author: Vlad <[email protected]> Date: Mon May 31 19:23:35 2021 +0300 add defaul resolvers line commit 8d63c7df9947c9588478d1173834b42569fd8951 Author: Eugene Burkov <[email protected]> Date: Mon May 31 11:56:08 2021 +0300 all: imp changelog commit e3912e3b20eca9dcf90ddddaa5edb54d1e0cfe6e Author: Eugene Burkov <[email protected]> Date: Fri May 28 20:23:05 2021 +0300 all: add local ptr resolvers addresses output
https://github.com/AdguardTeam/AdGuardHome/commit/1e55db408f78eccb36f2bd4afa719c1c9d88c470
client/src/components/Settings/Dns/Upstream/Form.js
<Trans>local_ptr_desc</Trans> </div> <Field id="local_ptr_upstreams" name="local_ptr_upstreams" component={renderTextareaField} type="text"
</s> remove '$ref': '#/components/schemas/DNSConfig' </s> add 'allOf': - '$ref': '#/components/schemas/DNSConfig' - 'type': 'object' 'properties': 'default_local_ptr_upstreams': 'type': 'array' 'items': 'type': 'string' 'example': - '192.168.168.192' - '10.0.0.10' </s> remove // Get returns the slice of local resolvers' addresses. // It should be safe for concurrent use. </s> add // Get returns the slice of local resolvers' addresses. It should be // safe for concurrent use.
<div className="form__desc form__desc--top"> {/** TODO: Add internazionalization for "" */} {defaultLocalPtrUpstreams?.length > 0 ? ( <Trans values={{ ip: defaultLocalPtrUpstreams.map((s) => `"${s}"`).join(', ') }}>local_ptr_default_resolver</Trans> ) : ( <Trans>local_ptr_no_default_resolver</Trans> )} </div>
<Trans>local_ptr_desc</Trans> </div> <div className="form__desc form__desc--top"> {/** TODO: Add internazionalization for "" */} {defaultLocalPtrUpstreams?.length > 0 ? ( <Trans values={{ ip: defaultLocalPtrUpstreams.map((s) => `"${s}"`).join(', ') }}>local_ptr_default_resolver</Trans> ) : ( <Trans>local_ptr_no_default_resolver</Trans> )} </div> <Field id="local_ptr_upstreams" name="local_ptr_upstreams" component={renderTextareaField} type="text"
[ "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
Pull request: 3136 show default resolvers Merge in DNS/adguard-home from 3136-show-default to master Closes #3136. Squashed commit of the following: commit add09a772dddcccd404056e7649c2d3350a79fec Author: Eugene Burkov <[email protected]> Date: Tue Jun 1 11:11:24 2021 +0300 openapi: fix typo commit 69e402c49318d53a0d03b81207644d9fb04a139a Merge: 76e8492c e17e1f20 Author: Eugene Burkov <[email protected]> Date: Tue Jun 1 11:09:51 2021 +0300 Merge branch 'master' into 3136-show-default commit 76e8492c8da679e204ceb7a77f1c6f73a2488040 Author: Ildar Kamalov <[email protected]> Date: Tue Jun 1 10:55:09 2021 +0300 client: check upstreams commit 05fe6ea196a1ed9386eec25dbfbe22779fe7bcfd Author: Vlad <[email protected]> Date: Mon May 31 19:23:35 2021 +0300 add defaul resolvers line commit 8d63c7df9947c9588478d1173834b42569fd8951 Author: Eugene Burkov <[email protected]> Date: Mon May 31 11:56:08 2021 +0300 all: imp changelog commit e3912e3b20eca9dcf90ddddaa5edb54d1e0cfe6e Author: Eugene Burkov <[email protected]> Date: Fri May 28 20:23:05 2021 +0300 all: add local ptr resolvers addresses output
https://github.com/AdguardTeam/AdGuardHome/commit/1e55db408f78eccb36f2bd4afa719c1c9d88c470
client/src/components/Settings/Dns/Upstream/Form.js
type HostGenFunc func() (host string) // SystemResolvers helps to work with local resolvers' addresses provided by OS. type SystemResolvers interface { // Get returns the slice of local resolvers' addresses. // It should be safe for concurrent use. Get() (rs []string) // refresh refreshes the local resolvers' addresses cache. It should be // safe for concurrent use. refresh() (err error) }
</s> remove ourAddrsSet := aghstrings.NewSet(ourAddrs...) // TODO(e.burkov): The approach of subtracting sets of strings is not // really applicable here since in case of listening on all network // interfaces we should check the whole interface's network to cut off // all the loopback addresses as well. localAddrs = aghstrings.FilterOut(localAddrs, ourAddrsSet.Has) </s> add log.Debug("upstreams to resolve PTR for local addresses: %v", localAddrs) </s> remove var sysRes aghnet.SystemResolvers // TODO(e.burkov): Enable the refresher after the actual // implementation passes the public testing. sysRes, err = aghnet.NewSystemResolvers(0, nil) if err != nil { return err } localAddrs = sysRes.Get() </s> add localAddrs = s.sysResolvers.Get()
// Get returns the slice of local resolvers' addresses. It should be // safe for concurrent use.
type HostGenFunc func() (host string) // SystemResolvers helps to work with local resolvers' addresses provided by OS. type SystemResolvers interface { // Get returns the slice of local resolvers' addresses. It should be // safe for concurrent use. // Get returns the slice of local resolvers' addresses. It should be // safe for concurrent use. Get() (rs []string) // refresh refreshes the local resolvers' addresses cache. It should be // safe for concurrent use. refresh() (err error) }
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
Pull request: 3136 show default resolvers Merge in DNS/adguard-home from 3136-show-default to master Closes #3136. Squashed commit of the following: commit add09a772dddcccd404056e7649c2d3350a79fec Author: Eugene Burkov <[email protected]> Date: Tue Jun 1 11:11:24 2021 +0300 openapi: fix typo commit 69e402c49318d53a0d03b81207644d9fb04a139a Merge: 76e8492c e17e1f20 Author: Eugene Burkov <[email protected]> Date: Tue Jun 1 11:09:51 2021 +0300 Merge branch 'master' into 3136-show-default commit 76e8492c8da679e204ceb7a77f1c6f73a2488040 Author: Ildar Kamalov <[email protected]> Date: Tue Jun 1 10:55:09 2021 +0300 client: check upstreams commit 05fe6ea196a1ed9386eec25dbfbe22779fe7bcfd Author: Vlad <[email protected]> Date: Mon May 31 19:23:35 2021 +0300 add defaul resolvers line commit 8d63c7df9947c9588478d1173834b42569fd8951 Author: Eugene Burkov <[email protected]> Date: Mon May 31 11:56:08 2021 +0300 all: imp changelog commit e3912e3b20eca9dcf90ddddaa5edb54d1e0cfe6e Author: Eugene Burkov <[email protected]> Date: Fri May 28 20:23:05 2021 +0300 all: add local ptr resolvers addresses output
https://github.com/AdguardTeam/AdGuardHome/commit/1e55db408f78eccb36f2bd4afa719c1c9d88c470
internal/aghnet/systemresolvers.go
ipset ipsetCtx subnetDetector *aghnet.SubnetDetector localResolvers *proxy.Proxy recDetector *recursionDetector tableHostToIP hostToIPTable tableHostToIPLock sync.Mutex
</s> remove '$ref': '#/components/schemas/DNSConfig' </s> add 'allOf': - '$ref': '#/components/schemas/DNSConfig' - 'type': 'object' 'properties': 'default_local_ptr_upstreams': 'type': 'array' 'items': 'type': 'string' 'example': - '192.168.168.192' - '10.0.0.10' </s> remove // Get returns the slice of local resolvers' addresses. // It should be safe for concurrent use. </s> add // Get returns the slice of local resolvers' addresses. It should be // safe for concurrent use.
sysResolvers aghnet.SystemResolvers
ipset ipsetCtx subnetDetector *aghnet.SubnetDetector localResolvers *proxy.Proxy sysResolvers aghnet.SystemResolvers recDetector *recursionDetector tableHostToIP hostToIPTable tableHostToIPLock sync.Mutex
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
Pull request: 3136 show default resolvers Merge in DNS/adguard-home from 3136-show-default to master Closes #3136. Squashed commit of the following: commit add09a772dddcccd404056e7649c2d3350a79fec Author: Eugene Burkov <[email protected]> Date: Tue Jun 1 11:11:24 2021 +0300 openapi: fix typo commit 69e402c49318d53a0d03b81207644d9fb04a139a Merge: 76e8492c e17e1f20 Author: Eugene Burkov <[email protected]> Date: Tue Jun 1 11:09:51 2021 +0300 Merge branch 'master' into 3136-show-default commit 76e8492c8da679e204ceb7a77f1c6f73a2488040 Author: Ildar Kamalov <[email protected]> Date: Tue Jun 1 10:55:09 2021 +0300 client: check upstreams commit 05fe6ea196a1ed9386eec25dbfbe22779fe7bcfd Author: Vlad <[email protected]> Date: Mon May 31 19:23:35 2021 +0300 add defaul resolvers line commit 8d63c7df9947c9588478d1173834b42569fd8951 Author: Eugene Burkov <[email protected]> Date: Mon May 31 11:56:08 2021 +0300 all: imp changelog commit e3912e3b20eca9dcf90ddddaa5edb54d1e0cfe6e Author: Eugene Burkov <[email protected]> Date: Fri May 28 20:23:05 2021 +0300 all: add local ptr resolvers addresses output
https://github.com/AdguardTeam/AdGuardHome/commit/1e55db408f78eccb36f2bd4afa719c1c9d88c470
internal/dnsforward/dnsforward.go
localDomainSuffix: localDomainSuffix, recDetector: newRecursionDetector(recursionTTL, cachedRecurrentReqNum), } if p.DHCPServer != nil { s.dhcpServer = p.DHCPServer s.dhcpServer.SetOnLeaseChanged(s.onDHCPLeaseChanged) s.onDHCPLeaseChanged(dhcpd.LeaseChangedAdded) }
</s> remove enc := json.NewEncoder(w) if err := enc.Encode(resp); err != nil { </s> add if err = json.NewEncoder(w).Encode(resp); err != nil { </s> remove var ourAddrs []string ourAddrs, err = s.collectDNSIPAddrs() </s> add localAddrs, err = s.filterOurDNSAddrs(localAddrs) </s> remove var sysRes aghnet.SystemResolvers // TODO(e.burkov): Enable the refresher after the actual // implementation passes the public testing. sysRes, err = aghnet.NewSystemResolvers(0, nil) if err != nil { return err } localAddrs = sysRes.Get() </s> add localAddrs = s.sysResolvers.Get() </s> remove log.Debug("upstreams to resolve PTR for local addresses: %v", localAddrs) </s> add
// TODO(e.burkov): Enable the refresher after the actual implementation // passes the public testing. s.sysResolvers, err = aghnet.NewSystemResolvers(0, nil) if err != nil { return nil, fmt.Errorf("initializing system resolvers: %w", err) }
localDomainSuffix: localDomainSuffix, recDetector: newRecursionDetector(recursionTTL, cachedRecurrentReqNum), } // TODO(e.burkov): Enable the refresher after the actual implementation // passes the public testing. s.sysResolvers, err = aghnet.NewSystemResolvers(0, nil) if err != nil { return nil, fmt.Errorf("initializing system resolvers: %w", err) } if p.DHCPServer != nil { s.dhcpServer = p.DHCPServer s.dhcpServer.SetOnLeaseChanged(s.onDHCPLeaseChanged) s.onDHCPLeaseChanged(dhcpd.LeaseChangedAdded) }
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
Pull request: 3136 show default resolvers Merge in DNS/adguard-home from 3136-show-default to master Closes #3136. Squashed commit of the following: commit add09a772dddcccd404056e7649c2d3350a79fec Author: Eugene Burkov <[email protected]> Date: Tue Jun 1 11:11:24 2021 +0300 openapi: fix typo commit 69e402c49318d53a0d03b81207644d9fb04a139a Merge: 76e8492c e17e1f20 Author: Eugene Burkov <[email protected]> Date: Tue Jun 1 11:09:51 2021 +0300 Merge branch 'master' into 3136-show-default commit 76e8492c8da679e204ceb7a77f1c6f73a2488040 Author: Ildar Kamalov <[email protected]> Date: Tue Jun 1 10:55:09 2021 +0300 client: check upstreams commit 05fe6ea196a1ed9386eec25dbfbe22779fe7bcfd Author: Vlad <[email protected]> Date: Mon May 31 19:23:35 2021 +0300 add defaul resolvers line commit 8d63c7df9947c9588478d1173834b42569fd8951 Author: Eugene Burkov <[email protected]> Date: Mon May 31 11:56:08 2021 +0300 all: imp changelog commit e3912e3b20eca9dcf90ddddaa5edb54d1e0cfe6e Author: Eugene Burkov <[email protected]> Date: Fri May 28 20:23:05 2021 +0300 all: add local ptr resolvers addresses output
https://github.com/AdguardTeam/AdGuardHome/commit/1e55db408f78eccb36f2bd4afa719c1c9d88c470
internal/dnsforward/dnsforward.go
return addrs[:i], nil } // setupResolvers initializes the resolvers for local addresses. For internal // use only. func (s *Server) setupResolvers(localAddrs []string) (err error) { bootstraps := s.conf.BootstrapDNS if len(localAddrs) == 0 {
</s> remove var sysRes aghnet.SystemResolvers // TODO(e.burkov): Enable the refresher after the actual // implementation passes the public testing. sysRes, err = aghnet.NewSystemResolvers(0, nil) if err != nil { return err } localAddrs = sysRes.Get() </s> add localAddrs = s.sysResolvers.Get() </s> remove // Get returns the slice of local resolvers' addresses. // It should be safe for concurrent use. </s> add // Get returns the slice of local resolvers' addresses. It should be // safe for concurrent use. </s> remove resp := s.getDNSConfig() </s> add defLocalPTRUps, err := s.filterOurDNSAddrs(s.sysResolvers.Get()) if err != nil { log.Debug("getting dns configuration: %s", err) } resp := struct { dnsConfig // DefautLocalPTRUpstreams is used to pass the addresses from // systemResolvers to the front-end. It's not a pointer to the slice // since there is no need to omit it while decoding from JSON. DefautLocalPTRUpstreams []string `json:"default_local_ptr_upstreams,omitempty"` }{ dnsConfig: s.getDNSConfig(), DefautLocalPTRUpstreams: defLocalPTRUps, } </s> remove log.Debug("upstreams to resolve PTR for local addresses: %v", localAddrs) </s> add
func (s *Server) filterOurDNSAddrs(addrs []string) (filtered []string, err error) { var ourAddrs []string ourAddrs, err = s.collectDNSIPAddrs() if err != nil { return nil, err } ourAddrsSet := aghstrings.NewSet(ourAddrs...) // TODO(e.burkov): The approach of subtracting sets of strings is not // really applicable here since in case of listening on all network // interfaces we should check the whole interface's network to cut off // all the loopback addresses as well. return aghstrings.FilterOut(addrs, ourAddrsSet.Has), nil }
return addrs[:i], nil } func (s *Server) filterOurDNSAddrs(addrs []string) (filtered []string, err error) { var ourAddrs []string ourAddrs, err = s.collectDNSIPAddrs() if err != nil { return nil, err } ourAddrsSet := aghstrings.NewSet(ourAddrs...) // TODO(e.burkov): The approach of subtracting sets of strings is not // really applicable here since in case of listening on all network // interfaces we should check the whole interface's network to cut off // all the loopback addresses as well. return aghstrings.FilterOut(addrs, ourAddrsSet.Has), nil } // setupResolvers initializes the resolvers for local addresses. For internal // use only. func (s *Server) setupResolvers(localAddrs []string) (err error) { bootstraps := s.conf.BootstrapDNS if len(localAddrs) == 0 {
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
Pull request: 3136 show default resolvers Merge in DNS/adguard-home from 3136-show-default to master Closes #3136. Squashed commit of the following: commit add09a772dddcccd404056e7649c2d3350a79fec Author: Eugene Burkov <[email protected]> Date: Tue Jun 1 11:11:24 2021 +0300 openapi: fix typo commit 69e402c49318d53a0d03b81207644d9fb04a139a Merge: 76e8492c e17e1f20 Author: Eugene Burkov <[email protected]> Date: Tue Jun 1 11:09:51 2021 +0300 Merge branch 'master' into 3136-show-default commit 76e8492c8da679e204ceb7a77f1c6f73a2488040 Author: Ildar Kamalov <[email protected]> Date: Tue Jun 1 10:55:09 2021 +0300 client: check upstreams commit 05fe6ea196a1ed9386eec25dbfbe22779fe7bcfd Author: Vlad <[email protected]> Date: Mon May 31 19:23:35 2021 +0300 add defaul resolvers line commit 8d63c7df9947c9588478d1173834b42569fd8951 Author: Eugene Burkov <[email protected]> Date: Mon May 31 11:56:08 2021 +0300 all: imp changelog commit e3912e3b20eca9dcf90ddddaa5edb54d1e0cfe6e Author: Eugene Burkov <[email protected]> Date: Fri May 28 20:23:05 2021 +0300 all: add local ptr resolvers addresses output
https://github.com/AdguardTeam/AdGuardHome/commit/1e55db408f78eccb36f2bd4afa719c1c9d88c470
internal/dnsforward/dnsforward.go
// use only. func (s *Server) setupResolvers(localAddrs []string) (err error) { bootstraps := s.conf.BootstrapDNS if len(localAddrs) == 0 { var sysRes aghnet.SystemResolvers // TODO(e.burkov): Enable the refresher after the actual // implementation passes the public testing. sysRes, err = aghnet.NewSystemResolvers(0, nil) if err != nil { return err } localAddrs = sysRes.Get() bootstraps = nil } log.Debug("upstreams to resolve PTR for local addresses: %v", localAddrs) var ourAddrs []string
</s> remove log.Debug("upstreams to resolve PTR for local addresses: %v", localAddrs) </s> add </s> remove var ourAddrs []string ourAddrs, err = s.collectDNSIPAddrs() </s> add localAddrs, err = s.filterOurDNSAddrs(localAddrs) </s> remove ourAddrsSet := aghstrings.NewSet(ourAddrs...) // TODO(e.burkov): The approach of subtracting sets of strings is not // really applicable here since in case of listening on all network // interfaces we should check the whole interface's network to cut off // all the loopback addresses as well. localAddrs = aghstrings.FilterOut(localAddrs, ourAddrsSet.Has) </s> add log.Debug("upstreams to resolve PTR for local addresses: %v", localAddrs)
localAddrs = s.sysResolvers.Get()
// use only. func (s *Server) setupResolvers(localAddrs []string) (err error) { bootstraps := s.conf.BootstrapDNS if len(localAddrs) == 0 { localAddrs = s.sysResolvers.Get() localAddrs = s.sysResolvers.Get() localAddrs = s.sysResolvers.Get() localAddrs = s.sysResolvers.Get() localAddrs = s.sysResolvers.Get() localAddrs = s.sysResolvers.Get() localAddrs = s.sysResolvers.Get() localAddrs = s.sysResolvers.Get() localAddrs = s.sysResolvers.Get() bootstraps = nil } log.Debug("upstreams to resolve PTR for local addresses: %v", localAddrs) var ourAddrs []string
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
Pull request: 3136 show default resolvers Merge in DNS/adguard-home from 3136-show-default to master Closes #3136. Squashed commit of the following: commit add09a772dddcccd404056e7649c2d3350a79fec Author: Eugene Burkov <[email protected]> Date: Tue Jun 1 11:11:24 2021 +0300 openapi: fix typo commit 69e402c49318d53a0d03b81207644d9fb04a139a Merge: 76e8492c e17e1f20 Author: Eugene Burkov <[email protected]> Date: Tue Jun 1 11:09:51 2021 +0300 Merge branch 'master' into 3136-show-default commit 76e8492c8da679e204ceb7a77f1c6f73a2488040 Author: Ildar Kamalov <[email protected]> Date: Tue Jun 1 10:55:09 2021 +0300 client: check upstreams commit 05fe6ea196a1ed9386eec25dbfbe22779fe7bcfd Author: Vlad <[email protected]> Date: Mon May 31 19:23:35 2021 +0300 add defaul resolvers line commit 8d63c7df9947c9588478d1173834b42569fd8951 Author: Eugene Burkov <[email protected]> Date: Mon May 31 11:56:08 2021 +0300 all: imp changelog commit e3912e3b20eca9dcf90ddddaa5edb54d1e0cfe6e Author: Eugene Burkov <[email protected]> Date: Fri May 28 20:23:05 2021 +0300 all: add local ptr resolvers addresses output
https://github.com/AdguardTeam/AdGuardHome/commit/1e55db408f78eccb36f2bd4afa719c1c9d88c470
internal/dnsforward/dnsforward.go
localAddrs = sysRes.Get() bootstraps = nil } log.Debug("upstreams to resolve PTR for local addresses: %v", localAddrs) var ourAddrs []string ourAddrs, err = s.collectDNSIPAddrs() if err != nil { return err
</s> remove var ourAddrs []string ourAddrs, err = s.collectDNSIPAddrs() </s> add localAddrs, err = s.filterOurDNSAddrs(localAddrs) </s> remove var sysRes aghnet.SystemResolvers // TODO(e.burkov): Enable the refresher after the actual // implementation passes the public testing. sysRes, err = aghnet.NewSystemResolvers(0, nil) if err != nil { return err } localAddrs = sysRes.Get() </s> add localAddrs = s.sysResolvers.Get() </s> remove ourAddrsSet := aghstrings.NewSet(ourAddrs...) // TODO(e.burkov): The approach of subtracting sets of strings is not // really applicable here since in case of listening on all network // interfaces we should check the whole interface's network to cut off // all the loopback addresses as well. localAddrs = aghstrings.FilterOut(localAddrs, ourAddrsSet.Has) </s> add log.Debug("upstreams to resolve PTR for local addresses: %v", localAddrs) </s> remove enc := json.NewEncoder(w) if err := enc.Encode(resp); err != nil { </s> add if err = json.NewEncoder(w).Encode(resp); err != nil {
localAddrs = sysRes.Get() bootstraps = nil } var ourAddrs []string ourAddrs, err = s.collectDNSIPAddrs() if err != nil { return err
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
Pull request: 3136 show default resolvers Merge in DNS/adguard-home from 3136-show-default to master Closes #3136. Squashed commit of the following: commit add09a772dddcccd404056e7649c2d3350a79fec Author: Eugene Burkov <[email protected]> Date: Tue Jun 1 11:11:24 2021 +0300 openapi: fix typo commit 69e402c49318d53a0d03b81207644d9fb04a139a Merge: 76e8492c e17e1f20 Author: Eugene Burkov <[email protected]> Date: Tue Jun 1 11:09:51 2021 +0300 Merge branch 'master' into 3136-show-default commit 76e8492c8da679e204ceb7a77f1c6f73a2488040 Author: Ildar Kamalov <[email protected]> Date: Tue Jun 1 10:55:09 2021 +0300 client: check upstreams commit 05fe6ea196a1ed9386eec25dbfbe22779fe7bcfd Author: Vlad <[email protected]> Date: Mon May 31 19:23:35 2021 +0300 add defaul resolvers line commit 8d63c7df9947c9588478d1173834b42569fd8951 Author: Eugene Burkov <[email protected]> Date: Mon May 31 11:56:08 2021 +0300 all: imp changelog commit e3912e3b20eca9dcf90ddddaa5edb54d1e0cfe6e Author: Eugene Burkov <[email protected]> Date: Fri May 28 20:23:05 2021 +0300 all: add local ptr resolvers addresses output
https://github.com/AdguardTeam/AdGuardHome/commit/1e55db408f78eccb36f2bd4afa719c1c9d88c470
internal/dnsforward/dnsforward.go
bootstraps = nil } log.Debug("upstreams to resolve PTR for local addresses: %v", localAddrs) var ourAddrs []string ourAddrs, err = s.collectDNSIPAddrs() if err != nil { return err } ourAddrsSet := aghstrings.NewSet(ourAddrs...)
</s> remove log.Debug("upstreams to resolve PTR for local addresses: %v", localAddrs) </s> add </s> remove var sysRes aghnet.SystemResolvers // TODO(e.burkov): Enable the refresher after the actual // implementation passes the public testing. sysRes, err = aghnet.NewSystemResolvers(0, nil) if err != nil { return err } localAddrs = sysRes.Get() </s> add localAddrs = s.sysResolvers.Get() </s> remove ourAddrsSet := aghstrings.NewSet(ourAddrs...) // TODO(e.burkov): The approach of subtracting sets of strings is not // really applicable here since in case of listening on all network // interfaces we should check the whole interface's network to cut off // all the loopback addresses as well. localAddrs = aghstrings.FilterOut(localAddrs, ourAddrsSet.Has) </s> add log.Debug("upstreams to resolve PTR for local addresses: %v", localAddrs) </s> remove enc := json.NewEncoder(w) if err := enc.Encode(resp); err != nil { </s> add if err = json.NewEncoder(w).Encode(resp); err != nil {
localAddrs, err = s.filterOurDNSAddrs(localAddrs)
bootstraps = nil } log.Debug("upstreams to resolve PTR for local addresses: %v", localAddrs) localAddrs, err = s.filterOurDNSAddrs(localAddrs) localAddrs, err = s.filterOurDNSAddrs(localAddrs) if err != nil { return err } ourAddrsSet := aghstrings.NewSet(ourAddrs...)
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
Pull request: 3136 show default resolvers Merge in DNS/adguard-home from 3136-show-default to master Closes #3136. Squashed commit of the following: commit add09a772dddcccd404056e7649c2d3350a79fec Author: Eugene Burkov <[email protected]> Date: Tue Jun 1 11:11:24 2021 +0300 openapi: fix typo commit 69e402c49318d53a0d03b81207644d9fb04a139a Merge: 76e8492c e17e1f20 Author: Eugene Burkov <[email protected]> Date: Tue Jun 1 11:09:51 2021 +0300 Merge branch 'master' into 3136-show-default commit 76e8492c8da679e204ceb7a77f1c6f73a2488040 Author: Ildar Kamalov <[email protected]> Date: Tue Jun 1 10:55:09 2021 +0300 client: check upstreams commit 05fe6ea196a1ed9386eec25dbfbe22779fe7bcfd Author: Vlad <[email protected]> Date: Mon May 31 19:23:35 2021 +0300 add defaul resolvers line commit 8d63c7df9947c9588478d1173834b42569fd8951 Author: Eugene Burkov <[email protected]> Date: Mon May 31 11:56:08 2021 +0300 all: imp changelog commit e3912e3b20eca9dcf90ddddaa5edb54d1e0cfe6e Author: Eugene Burkov <[email protected]> Date: Fri May 28 20:23:05 2021 +0300 all: add local ptr resolvers addresses output
https://github.com/AdguardTeam/AdGuardHome/commit/1e55db408f78eccb36f2bd4afa719c1c9d88c470
internal/dnsforward/dnsforward.go
if err != nil { return err } ourAddrsSet := aghstrings.NewSet(ourAddrs...) // TODO(e.burkov): The approach of subtracting sets of strings is not // really applicable here since in case of listening on all network // interfaces we should check the whole interface's network to cut off // all the loopback addresses as well. localAddrs = aghstrings.FilterOut(localAddrs, ourAddrsSet.Has) var upsConfig proxy.UpstreamConfig upsConfig, err = proxy.ParseUpstreamsConfig(localAddrs, upstream.Options{ Bootstrap: bootstraps, Timeout: defaultLocalTimeout,
</s> remove var sysRes aghnet.SystemResolvers // TODO(e.burkov): Enable the refresher after the actual // implementation passes the public testing. sysRes, err = aghnet.NewSystemResolvers(0, nil) if err != nil { return err } localAddrs = sysRes.Get() </s> add localAddrs = s.sysResolvers.Get() </s> remove var ourAddrs []string ourAddrs, err = s.collectDNSIPAddrs() </s> add localAddrs, err = s.filterOurDNSAddrs(localAddrs) </s> remove // Get returns the slice of local resolvers' addresses. // It should be safe for concurrent use. </s> add // Get returns the slice of local resolvers' addresses. It should be // safe for concurrent use. </s> remove resp := s.getDNSConfig() </s> add defLocalPTRUps, err := s.filterOurDNSAddrs(s.sysResolvers.Get()) if err != nil { log.Debug("getting dns configuration: %s", err) } resp := struct { dnsConfig // DefautLocalPTRUpstreams is used to pass the addresses from // systemResolvers to the front-end. It's not a pointer to the slice // since there is no need to omit it while decoding from JSON. DefautLocalPTRUpstreams []string `json:"default_local_ptr_upstreams,omitempty"` }{ dnsConfig: s.getDNSConfig(), DefautLocalPTRUpstreams: defLocalPTRUps, }
log.Debug("upstreams to resolve PTR for local addresses: %v", localAddrs)
if err != nil { return err } log.Debug("upstreams to resolve PTR for local addresses: %v", localAddrs) log.Debug("upstreams to resolve PTR for local addresses: %v", localAddrs) log.Debug("upstreams to resolve PTR for local addresses: %v", localAddrs) log.Debug("upstreams to resolve PTR for local addresses: %v", localAddrs) log.Debug("upstreams to resolve PTR for local addresses: %v", localAddrs) log.Debug("upstreams to resolve PTR for local addresses: %v", localAddrs) log.Debug("upstreams to resolve PTR for local addresses: %v", localAddrs) var upsConfig proxy.UpstreamConfig upsConfig, err = proxy.ParseUpstreamsConfig(localAddrs, upstream.Options{ Bootstrap: bootstraps, Timeout: defaultLocalTimeout,
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
Pull request: 3136 show default resolvers Merge in DNS/adguard-home from 3136-show-default to master Closes #3136. Squashed commit of the following: commit add09a772dddcccd404056e7649c2d3350a79fec Author: Eugene Burkov <[email protected]> Date: Tue Jun 1 11:11:24 2021 +0300 openapi: fix typo commit 69e402c49318d53a0d03b81207644d9fb04a139a Merge: 76e8492c e17e1f20 Author: Eugene Burkov <[email protected]> Date: Tue Jun 1 11:09:51 2021 +0300 Merge branch 'master' into 3136-show-default commit 76e8492c8da679e204ceb7a77f1c6f73a2488040 Author: Ildar Kamalov <[email protected]> Date: Tue Jun 1 10:55:09 2021 +0300 client: check upstreams commit 05fe6ea196a1ed9386eec25dbfbe22779fe7bcfd Author: Vlad <[email protected]> Date: Mon May 31 19:23:35 2021 +0300 add defaul resolvers line commit 8d63c7df9947c9588478d1173834b42569fd8951 Author: Eugene Burkov <[email protected]> Date: Mon May 31 11:56:08 2021 +0300 all: imp changelog commit e3912e3b20eca9dcf90ddddaa5edb54d1e0cfe6e Author: Eugene Burkov <[email protected]> Date: Fri May 28 20:23:05 2021 +0300 all: add local ptr resolvers addresses output
https://github.com/AdguardTeam/AdGuardHome/commit/1e55db408f78eccb36f2bd4afa719c1c9d88c470
internal/dnsforward/dnsforward.go
} } func (s *Server) handleGetConfig(w http.ResponseWriter, r *http.Request) { resp := s.getDNSConfig() w.Header().Set("Content-Type", "application/json") enc := json.NewEncoder(w) if err := enc.Encode(resp); err != nil {
</s> remove enc := json.NewEncoder(w) if err := enc.Encode(resp); err != nil { </s> add if err = json.NewEncoder(w).Encode(resp); err != nil { </s> remove var sysRes aghnet.SystemResolvers // TODO(e.burkov): Enable the refresher after the actual // implementation passes the public testing. sysRes, err = aghnet.NewSystemResolvers(0, nil) if err != nil { return err } localAddrs = sysRes.Get() </s> add localAddrs = s.sysResolvers.Get() </s> remove var ourAddrs []string ourAddrs, err = s.collectDNSIPAddrs() </s> add localAddrs, err = s.filterOurDNSAddrs(localAddrs)
defLocalPTRUps, err := s.filterOurDNSAddrs(s.sysResolvers.Get()) if err != nil { log.Debug("getting dns configuration: %s", err) } resp := struct { dnsConfig // DefautLocalPTRUpstreams is used to pass the addresses from // systemResolvers to the front-end. It's not a pointer to the slice // since there is no need to omit it while decoding from JSON. DefautLocalPTRUpstreams []string `json:"default_local_ptr_upstreams,omitempty"` }{ dnsConfig: s.getDNSConfig(), DefautLocalPTRUpstreams: defLocalPTRUps, }
} } func (s *Server) handleGetConfig(w http.ResponseWriter, r *http.Request) { defLocalPTRUps, err := s.filterOurDNSAddrs(s.sysResolvers.Get()) if err != nil { log.Debug("getting dns configuration: %s", err) } resp := struct { dnsConfig // DefautLocalPTRUpstreams is used to pass the addresses from // systemResolvers to the front-end. It's not a pointer to the slice // since there is no need to omit it while decoding from JSON. DefautLocalPTRUpstreams []string `json:"default_local_ptr_upstreams,omitempty"` }{ dnsConfig: s.getDNSConfig(), DefautLocalPTRUpstreams: defLocalPTRUps, } w.Header().Set("Content-Type", "application/json") enc := json.NewEncoder(w) if err := enc.Encode(resp); err != nil {
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
Pull request: 3136 show default resolvers Merge in DNS/adguard-home from 3136-show-default to master Closes #3136. Squashed commit of the following: commit add09a772dddcccd404056e7649c2d3350a79fec Author: Eugene Burkov <[email protected]> Date: Tue Jun 1 11:11:24 2021 +0300 openapi: fix typo commit 69e402c49318d53a0d03b81207644d9fb04a139a Merge: 76e8492c e17e1f20 Author: Eugene Burkov <[email protected]> Date: Tue Jun 1 11:09:51 2021 +0300 Merge branch 'master' into 3136-show-default commit 76e8492c8da679e204ceb7a77f1c6f73a2488040 Author: Ildar Kamalov <[email protected]> Date: Tue Jun 1 10:55:09 2021 +0300 client: check upstreams commit 05fe6ea196a1ed9386eec25dbfbe22779fe7bcfd Author: Vlad <[email protected]> Date: Mon May 31 19:23:35 2021 +0300 add defaul resolvers line commit 8d63c7df9947c9588478d1173834b42569fd8951 Author: Eugene Burkov <[email protected]> Date: Mon May 31 11:56:08 2021 +0300 all: imp changelog commit e3912e3b20eca9dcf90ddddaa5edb54d1e0cfe6e Author: Eugene Burkov <[email protected]> Date: Fri May 28 20:23:05 2021 +0300 all: add local ptr resolvers addresses output
https://github.com/AdguardTeam/AdGuardHome/commit/1e55db408f78eccb36f2bd4afa719c1c9d88c470
internal/dnsforward/http.go
resp := s.getDNSConfig() w.Header().Set("Content-Type", "application/json") enc := json.NewEncoder(w) if err := enc.Encode(resp); err != nil { httpError(r, w, http.StatusInternalServerError, "json.Encoder: %s", err) return } }
</s> remove resp := s.getDNSConfig() </s> add defLocalPTRUps, err := s.filterOurDNSAddrs(s.sysResolvers.Get()) if err != nil { log.Debug("getting dns configuration: %s", err) } resp := struct { dnsConfig // DefautLocalPTRUpstreams is used to pass the addresses from // systemResolvers to the front-end. It's not a pointer to the slice // since there is no need to omit it while decoding from JSON. DefautLocalPTRUpstreams []string `json:"default_local_ptr_upstreams,omitempty"` }{ dnsConfig: s.getDNSConfig(), DefautLocalPTRUpstreams: defLocalPTRUps, } </s> remove var ourAddrs []string ourAddrs, err = s.collectDNSIPAddrs() </s> add localAddrs, err = s.filterOurDNSAddrs(localAddrs) </s> remove log.Debug("upstreams to resolve PTR for local addresses: %v", localAddrs) </s> add </s> remove var sysRes aghnet.SystemResolvers // TODO(e.burkov): Enable the refresher after the actual // implementation passes the public testing. sysRes, err = aghnet.NewSystemResolvers(0, nil) if err != nil { return err } localAddrs = sysRes.Get() </s> add localAddrs = s.sysResolvers.Get()
if err = json.NewEncoder(w).Encode(resp); err != nil {
resp := s.getDNSConfig() w.Header().Set("Content-Type", "application/json") if err = json.NewEncoder(w).Encode(resp); err != nil { if err = json.NewEncoder(w).Encode(resp); err != nil { httpError(r, w, http.StatusInternalServerError, "json.Encoder: %s", err) return } }
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
Pull request: 3136 show default resolvers Merge in DNS/adguard-home from 3136-show-default to master Closes #3136. Squashed commit of the following: commit add09a772dddcccd404056e7649c2d3350a79fec Author: Eugene Burkov <[email protected]> Date: Tue Jun 1 11:11:24 2021 +0300 openapi: fix typo commit 69e402c49318d53a0d03b81207644d9fb04a139a Merge: 76e8492c e17e1f20 Author: Eugene Burkov <[email protected]> Date: Tue Jun 1 11:09:51 2021 +0300 Merge branch 'master' into 3136-show-default commit 76e8492c8da679e204ceb7a77f1c6f73a2488040 Author: Ildar Kamalov <[email protected]> Date: Tue Jun 1 10:55:09 2021 +0300 client: check upstreams commit 05fe6ea196a1ed9386eec25dbfbe22779fe7bcfd Author: Vlad <[email protected]> Date: Mon May 31 19:23:35 2021 +0300 add defaul resolvers line commit 8d63c7df9947c9588478d1173834b42569fd8951 Author: Eugene Burkov <[email protected]> Date: Mon May 31 11:56:08 2021 +0300 all: imp changelog commit e3912e3b20eca9dcf90ddddaa5edb54d1e0cfe6e Author: Eugene Burkov <[email protected]> Date: Fri May 28 20:23:05 2021 +0300 all: add local ptr resolvers addresses output
https://github.com/AdguardTeam/AdGuardHome/commit/1e55db408f78eccb36f2bd4afa719c1c9d88c470
internal/dnsforward/http.go
"testing" "github.com/AdguardTeam/AdGuardHome/internal/filtering" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) // fakeSystemResolvers is a mock aghnet.SystemResolvers implementation for tests.
</s> remove var sysRes aghnet.SystemResolvers // TODO(e.burkov): Enable the refresher after the actual // implementation passes the public testing. sysRes, err = aghnet.NewSystemResolvers(0, nil) if err != nil { return err } localAddrs = sysRes.Get() </s> add localAddrs = s.sysResolvers.Get() </s> remove resp := s.getDNSConfig() </s> add defLocalPTRUps, err := s.filterOurDNSAddrs(s.sysResolvers.Get()) if err != nil { log.Debug("getting dns configuration: %s", err) } resp := struct { dnsConfig // DefautLocalPTRUpstreams is used to pass the addresses from // systemResolvers to the front-end. It's not a pointer to the slice // since there is no need to omit it while decoding from JSON. DefautLocalPTRUpstreams []string `json:"default_local_ptr_upstreams,omitempty"` }{ dnsConfig: s.getDNSConfig(), DefautLocalPTRUpstreams: defLocalPTRUps, }
"github.com/AdguardTeam/AdGuardHome/internal/aghnet"
"testing" "github.com/AdguardTeam/AdGuardHome/internal/aghnet" "github.com/AdguardTeam/AdGuardHome/internal/filtering" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) // fakeSystemResolvers is a mock aghnet.SystemResolvers implementation for tests.
[ "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
Pull request: 3136 show default resolvers Merge in DNS/adguard-home from 3136-show-default to master Closes #3136. Squashed commit of the following: commit add09a772dddcccd404056e7649c2d3350a79fec Author: Eugene Burkov <[email protected]> Date: Tue Jun 1 11:11:24 2021 +0300 openapi: fix typo commit 69e402c49318d53a0d03b81207644d9fb04a139a Merge: 76e8492c e17e1f20 Author: Eugene Burkov <[email protected]> Date: Tue Jun 1 11:09:51 2021 +0300 Merge branch 'master' into 3136-show-default commit 76e8492c8da679e204ceb7a77f1c6f73a2488040 Author: Ildar Kamalov <[email protected]> Date: Tue Jun 1 10:55:09 2021 +0300 client: check upstreams commit 05fe6ea196a1ed9386eec25dbfbe22779fe7bcfd Author: Vlad <[email protected]> Date: Mon May 31 19:23:35 2021 +0300 add defaul resolvers line commit 8d63c7df9947c9588478d1173834b42569fd8951 Author: Eugene Burkov <[email protected]> Date: Mon May 31 11:56:08 2021 +0300 all: imp changelog commit e3912e3b20eca9dcf90ddddaa5edb54d1e0cfe6e Author: Eugene Burkov <[email protected]> Date: Fri May 28 20:23:05 2021 +0300 all: add local ptr resolvers addresses output
https://github.com/AdguardTeam/AdGuardHome/commit/1e55db408f78eccb36f2bd4afa719c1c9d88c470
internal/dnsforward/http_test.go
) func loadTestData(t *testing.T, casesFileName string, cases interface{}) { t.Helper() var f *os.File f, err := os.Open(filepath.Join("testdata", casesFileName))
</s> remove var sysRes aghnet.SystemResolvers // TODO(e.burkov): Enable the refresher after the actual // implementation passes the public testing. sysRes, err = aghnet.NewSystemResolvers(0, nil) if err != nil { return err } localAddrs = sysRes.Get() </s> add localAddrs = s.sysResolvers.Get() </s> remove resp := s.getDNSConfig() </s> add defLocalPTRUps, err := s.filterOurDNSAddrs(s.sysResolvers.Get()) if err != nil { log.Debug("getting dns configuration: %s", err) } resp := struct { dnsConfig // DefautLocalPTRUpstreams is used to pass the addresses from // systemResolvers to the front-end. It's not a pointer to the slice // since there is no need to omit it while decoding from JSON. DefautLocalPTRUpstreams []string `json:"default_local_ptr_upstreams,omitempty"` }{ dnsConfig: s.getDNSConfig(), DefautLocalPTRUpstreams: defLocalPTRUps, } </s> remove log.Debug("upstreams to resolve PTR for local addresses: %v", localAddrs) </s> add </s> remove var ourAddrs []string ourAddrs, err = s.collectDNSIPAddrs() </s> add localAddrs, err = s.filterOurDNSAddrs(localAddrs)
// fakeSystemResolvers is a mock aghnet.SystemResolvers implementation for tests. type fakeSystemResolvers struct { // SystemResolvers is embedded here simply to make *fakeSystemResolvers // an aghnet.SystemResolvers without actually implementing all methods. aghnet.SystemResolvers } // Get implements the aghnet.SystemResolvers interface for *fakeSystemResolvers. // It always returns nil. func (fsr *fakeSystemResolvers) Get() (rs []string) { return nil }
) // fakeSystemResolvers is a mock aghnet.SystemResolvers implementation for tests. type fakeSystemResolvers struct { // SystemResolvers is embedded here simply to make *fakeSystemResolvers // an aghnet.SystemResolvers without actually implementing all methods. aghnet.SystemResolvers } // Get implements the aghnet.SystemResolvers interface for *fakeSystemResolvers. // It always returns nil. func (fsr *fakeSystemResolvers) Get() (rs []string) { return nil } func loadTestData(t *testing.T, casesFileName string, cases interface{}) { t.Helper() var f *os.File f, err := os.Open(filepath.Join("testdata", casesFileName))
[ "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
Pull request: 3136 show default resolvers Merge in DNS/adguard-home from 3136-show-default to master Closes #3136. Squashed commit of the following: commit add09a772dddcccd404056e7649c2d3350a79fec Author: Eugene Burkov <[email protected]> Date: Tue Jun 1 11:11:24 2021 +0300 openapi: fix typo commit 69e402c49318d53a0d03b81207644d9fb04a139a Merge: 76e8492c e17e1f20 Author: Eugene Burkov <[email protected]> Date: Tue Jun 1 11:09:51 2021 +0300 Merge branch 'master' into 3136-show-default commit 76e8492c8da679e204ceb7a77f1c6f73a2488040 Author: Ildar Kamalov <[email protected]> Date: Tue Jun 1 10:55:09 2021 +0300 client: check upstreams commit 05fe6ea196a1ed9386eec25dbfbe22779fe7bcfd Author: Vlad <[email protected]> Date: Mon May 31 19:23:35 2021 +0300 add defaul resolvers line commit 8d63c7df9947c9588478d1173834b42569fd8951 Author: Eugene Burkov <[email protected]> Date: Mon May 31 11:56:08 2021 +0300 all: imp changelog commit e3912e3b20eca9dcf90ddddaa5edb54d1e0cfe6e Author: Eugene Burkov <[email protected]> Date: Fri May 28 20:23:05 2021 +0300 all: add local ptr resolvers addresses output
https://github.com/AdguardTeam/AdGuardHome/commit/1e55db408f78eccb36f2bd4afa719c1c9d88c470
internal/dnsforward/http_test.go
} s := createTestServer(t, filterConf, forwardConf, nil) require.Nil(t, s.Start()) t.Cleanup(func() { require.Nil(t, s.Stop()) })
</s> remove var sysRes aghnet.SystemResolvers // TODO(e.burkov): Enable the refresher after the actual // implementation passes the public testing. sysRes, err = aghnet.NewSystemResolvers(0, nil) if err != nil { return err } localAddrs = sysRes.Get() </s> add localAddrs = s.sysResolvers.Get() </s> remove enc := json.NewEncoder(w) if err := enc.Encode(resp); err != nil { </s> add if err = json.NewEncoder(w).Encode(resp); err != nil { </s> remove resp := s.getDNSConfig() </s> add defLocalPTRUps, err := s.filterOurDNSAddrs(s.sysResolvers.Get()) if err != nil { log.Debug("getting dns configuration: %s", err) } resp := struct { dnsConfig // DefautLocalPTRUpstreams is used to pass the addresses from // systemResolvers to the front-end. It's not a pointer to the slice // since there is no need to omit it while decoding from JSON. DefautLocalPTRUpstreams []string `json:"default_local_ptr_upstreams,omitempty"` }{ dnsConfig: s.getDNSConfig(), DefautLocalPTRUpstreams: defLocalPTRUps, }
s.sysResolvers = &fakeSystemResolvers{}
} s := createTestServer(t, filterConf, forwardConf, nil) s.sysResolvers = &fakeSystemResolvers{} require.Nil(t, s.Start()) t.Cleanup(func() { require.Nil(t, s.Stop()) })
[ "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
Pull request: 3136 show default resolvers Merge in DNS/adguard-home from 3136-show-default to master Closes #3136. Squashed commit of the following: commit add09a772dddcccd404056e7649c2d3350a79fec Author: Eugene Burkov <[email protected]> Date: Tue Jun 1 11:11:24 2021 +0300 openapi: fix typo commit 69e402c49318d53a0d03b81207644d9fb04a139a Merge: 76e8492c e17e1f20 Author: Eugene Burkov <[email protected]> Date: Tue Jun 1 11:09:51 2021 +0300 Merge branch 'master' into 3136-show-default commit 76e8492c8da679e204ceb7a77f1c6f73a2488040 Author: Ildar Kamalov <[email protected]> Date: Tue Jun 1 10:55:09 2021 +0300 client: check upstreams commit 05fe6ea196a1ed9386eec25dbfbe22779fe7bcfd Author: Vlad <[email protected]> Date: Mon May 31 19:23:35 2021 +0300 add defaul resolvers line commit 8d63c7df9947c9588478d1173834b42569fd8951 Author: Eugene Burkov <[email protected]> Date: Mon May 31 11:56:08 2021 +0300 all: imp changelog commit e3912e3b20eca9dcf90ddddaa5edb54d1e0cfe6e Author: Eugene Burkov <[email protected]> Date: Fri May 28 20:23:05 2021 +0300 all: add local ptr resolvers addresses output
https://github.com/AdguardTeam/AdGuardHome/commit/1e55db408f78eccb36f2bd4afa719c1c9d88c470
internal/dnsforward/http_test.go
ConfigModified: func() {}, } s := createTestServer(t, filterConf, forwardConf, nil) defaultConf := s.conf err := s.Start()
</s> remove var sysRes aghnet.SystemResolvers // TODO(e.burkov): Enable the refresher after the actual // implementation passes the public testing. sysRes, err = aghnet.NewSystemResolvers(0, nil) if err != nil { return err } localAddrs = sysRes.Get() </s> add localAddrs = s.sysResolvers.Get() </s> remove // Get returns the slice of local resolvers' addresses. // It should be safe for concurrent use. </s> add // Get returns the slice of local resolvers' addresses. It should be // safe for concurrent use. </s> remove enc := json.NewEncoder(w) if err := enc.Encode(resp); err != nil { </s> add if err = json.NewEncoder(w).Encode(resp); err != nil {
s.sysResolvers = &fakeSystemResolvers{}
ConfigModified: func() {}, } s := createTestServer(t, filterConf, forwardConf, nil) s.sysResolvers = &fakeSystemResolvers{} defaultConf := s.conf err := s.Start()
[ "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
Pull request: 3136 show default resolvers Merge in DNS/adguard-home from 3136-show-default to master Closes #3136. Squashed commit of the following: commit add09a772dddcccd404056e7649c2d3350a79fec Author: Eugene Burkov <[email protected]> Date: Tue Jun 1 11:11:24 2021 +0300 openapi: fix typo commit 69e402c49318d53a0d03b81207644d9fb04a139a Merge: 76e8492c e17e1f20 Author: Eugene Burkov <[email protected]> Date: Tue Jun 1 11:09:51 2021 +0300 Merge branch 'master' into 3136-show-default commit 76e8492c8da679e204ceb7a77f1c6f73a2488040 Author: Ildar Kamalov <[email protected]> Date: Tue Jun 1 10:55:09 2021 +0300 client: check upstreams commit 05fe6ea196a1ed9386eec25dbfbe22779fe7bcfd Author: Vlad <[email protected]> Date: Mon May 31 19:23:35 2021 +0300 add defaul resolvers line commit 8d63c7df9947c9588478d1173834b42569fd8951 Author: Eugene Burkov <[email protected]> Date: Mon May 31 11:56:08 2021 +0300 all: imp changelog commit e3912e3b20eca9dcf90ddddaa5edb54d1e0cfe6e Author: Eugene Burkov <[email protected]> Date: Fri May 28 20:23:05 2021 +0300 all: add local ptr resolvers addresses output
https://github.com/AdguardTeam/AdGuardHome/commit/1e55db408f78eccb36f2bd4afa719c1c9d88c470
internal/dnsforward/http_test.go
'description': 'OK' 'content': 'application/json': 'schema': '$ref': '#/components/schemas/DNSConfig' '/dns_config': 'post': 'tags': - 'global' 'operationId': 'dnsConfig'
</s> remove // Get returns the slice of local resolvers' addresses. // It should be safe for concurrent use. </s> add // Get returns the slice of local resolvers' addresses. It should be // safe for concurrent use.
'allOf': - '$ref': '#/components/schemas/DNSConfig' - 'type': 'object' 'properties': 'default_local_ptr_upstreams': 'type': 'array' 'items': 'type': 'string' 'example': - '192.168.168.192' - '10.0.0.10'
'description': 'OK' 'content': 'application/json': 'schema': 'allOf': - '$ref': '#/components/schemas/DNSConfig' - 'type': 'object' 'properties': 'default_local_ptr_upstreams': 'type': 'array' 'items': 'type': 'string' 'example': - '192.168.168.192' - '10.0.0.10' '/dns_config': 'post': 'tags': - 'global' 'operationId': 'dnsConfig'
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
Pull request: 3136 show default resolvers Merge in DNS/adguard-home from 3136-show-default to master Closes #3136. Squashed commit of the following: commit add09a772dddcccd404056e7649c2d3350a79fec Author: Eugene Burkov <[email protected]> Date: Tue Jun 1 11:11:24 2021 +0300 openapi: fix typo commit 69e402c49318d53a0d03b81207644d9fb04a139a Merge: 76e8492c e17e1f20 Author: Eugene Burkov <[email protected]> Date: Tue Jun 1 11:09:51 2021 +0300 Merge branch 'master' into 3136-show-default commit 76e8492c8da679e204ceb7a77f1c6f73a2488040 Author: Ildar Kamalov <[email protected]> Date: Tue Jun 1 10:55:09 2021 +0300 client: check upstreams commit 05fe6ea196a1ed9386eec25dbfbe22779fe7bcfd Author: Vlad <[email protected]> Date: Mon May 31 19:23:35 2021 +0300 add defaul resolvers line commit 8d63c7df9947c9588478d1173834b42569fd8951 Author: Eugene Burkov <[email protected]> Date: Mon May 31 11:56:08 2021 +0300 all: imp changelog commit e3912e3b20eca9dcf90ddddaa5edb54d1e0cfe6e Author: Eugene Burkov <[email protected]> Date: Fri May 28 20:23:05 2021 +0300 all: add local ptr resolvers addresses output
https://github.com/AdguardTeam/AdGuardHome/commit/1e55db408f78eccb36f2bd4afa719c1c9d88c470
openapi/openapi.yaml
go 1.14 require ( github.com/AdguardTeam/dnsproxy v0.33.0 github.com/AdguardTeam/golibs v0.4.2 github.com/AdguardTeam/urlfilter v0.12.3 github.com/NYTimes/gziphandler v1.1.1 github.com/beefsack/go-rate v0.0.0-20200827232406-6cde80facd47 // indirect github.com/fsnotify/fsnotify v1.4.9
</s> remove github.com/AdguardTeam/dnsproxy v0.33.0 h1:bYNf20QgvkclPm+w5YSakFQbrrlcD3MpUwkQPLMwhwU= github.com/AdguardTeam/dnsproxy v0.33.0/go.mod h1:kLi6lMpErnZThy5haiRSis4q0KTB8uPWO4JQsU1EDJA= </s> add github.com/AdguardTeam/dnsproxy v0.33.1 h1:rEAS1fBEQ3JslzsfkcyMRV96OeBWFnKzXvksduI0ous= github.com/AdguardTeam/dnsproxy v0.33.1/go.mod h1:kLi6lMpErnZThy5haiRSis4q0KTB8uPWO4JQsU1EDJA= </s> remove golang.org/x/sys v0.0.0-20201101102859-da207088b7d1 h1:a/mKvvZr9Jcc8oKfcmgzyp7OwF73JPWsQLvH1z2Kxck= golang.org/x/sys v0.0.0-20201101102859-da207088b7d1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= </s> add golang.org/x/sys v0.0.0-20201107080550-4d91cf3a1aaf h1:kt3wY1Lu5MJAnKTfoMR52Cu4gwvna4VTzNOiT8tY73s= golang.org/x/sys v0.0.0-20201107080550-4d91cf3a1aaf/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= </s> remove golang.org/x/sys v0.0.0-20201101102859-da207088b7d1 </s> add golang.org/x/sys v0.0.0-20201107080550-4d91cf3a1aaf
github.com/AdguardTeam/dnsproxy v0.33.1
go 1.14 require ( github.com/AdguardTeam/dnsproxy v0.33.1 github.com/AdguardTeam/golibs v0.4.2 github.com/AdguardTeam/urlfilter v0.12.3 github.com/NYTimes/gziphandler v1.1.1 github.com/beefsack/go-rate v0.0.0-20200827232406-6cde80facd47 // indirect github.com/fsnotify/fsnotify v1.4.9
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
Pull request: * all: update dnsproxy Merge in DNS/adguard-home from update-dnsproxy to master Squashed commit of the following: commit 6ed03c2131b93e3882e8f820e110696a41223267 Author: Ainar Garipov <[email protected]> Date: Mon Nov 9 13:13:36 2020 +0300 * all: update dnsproxy
https://github.com/AdguardTeam/AdGuardHome/commit/1e583315a867fdd0aeaf787ff95bd7525faf9b39
go.mod
github.com/fsnotify/fsnotify v1.4.9 github.com/gobuffalo/packr v1.30.1 github.com/hugelgupf/socketpair v0.0.0-20190730060125-05d35a94e714 github.com/insomniacslk/dhcp v0.0.0-20200621044212-d74cd86ad5b8 github.com/kardianos/service v1.1.0 github.com/mdlayher/ethernet v0.0.0-20190606142754-0394541c37b7 github.com/mdlayher/raw v0.0.0-20191009151244-50f2db8cc065 github.com/miekg/dns v1.1.35 github.com/rogpeppe/go-internal v1.5.2 // indirect
</s> remove github.com/AdguardTeam/dnsproxy v0.33.0 </s> add github.com/AdguardTeam/dnsproxy v0.33.1 </s> remove golang.org/x/sys v0.0.0-20201101102859-da207088b7d1 h1:a/mKvvZr9Jcc8oKfcmgzyp7OwF73JPWsQLvH1z2Kxck= golang.org/x/sys v0.0.0-20201101102859-da207088b7d1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= </s> add golang.org/x/sys v0.0.0-20201107080550-4d91cf3a1aaf h1:kt3wY1Lu5MJAnKTfoMR52Cu4gwvna4VTzNOiT8tY73s= golang.org/x/sys v0.0.0-20201107080550-4d91cf3a1aaf/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= </s> remove github.com/AdguardTeam/dnsproxy v0.33.0 h1:bYNf20QgvkclPm+w5YSakFQbrrlcD3MpUwkQPLMwhwU= github.com/AdguardTeam/dnsproxy v0.33.0/go.mod h1:kLi6lMpErnZThy5haiRSis4q0KTB8uPWO4JQsU1EDJA= </s> add github.com/AdguardTeam/dnsproxy v0.33.1 h1:rEAS1fBEQ3JslzsfkcyMRV96OeBWFnKzXvksduI0ous= github.com/AdguardTeam/dnsproxy v0.33.1/go.mod h1:kLi6lMpErnZThy5haiRSis4q0KTB8uPWO4JQsU1EDJA= </s> remove golang.org/x/sys v0.0.0-20201101102859-da207088b7d1 </s> add golang.org/x/sys v0.0.0-20201107080550-4d91cf3a1aaf
github.com/joomcode/errorx v1.0.3 // indirect
github.com/fsnotify/fsnotify v1.4.9 github.com/gobuffalo/packr v1.30.1 github.com/hugelgupf/socketpair v0.0.0-20190730060125-05d35a94e714 github.com/insomniacslk/dhcp v0.0.0-20200621044212-d74cd86ad5b8 github.com/joomcode/errorx v1.0.3 // indirect github.com/kardianos/service v1.1.0 github.com/mdlayher/ethernet v0.0.0-20190606142754-0394541c37b7 github.com/mdlayher/raw v0.0.0-20191009151244-50f2db8cc065 github.com/miekg/dns v1.1.35 github.com/rogpeppe/go-internal v1.5.2 // indirect
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
Pull request: * all: update dnsproxy Merge in DNS/adguard-home from update-dnsproxy to master Squashed commit of the following: commit 6ed03c2131b93e3882e8f820e110696a41223267 Author: Ainar Garipov <[email protected]> Date: Mon Nov 9 13:13:36 2020 +0300 * all: update dnsproxy
https://github.com/AdguardTeam/AdGuardHome/commit/1e583315a867fdd0aeaf787ff95bd7525faf9b39
go.mod
go.etcd.io/bbolt v1.3.4 golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897 golang.org/x/net v0.0.0-20201031054903-ff519b6c9102 golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9 // indirect golang.org/x/sys v0.0.0-20201101102859-da207088b7d1 golang.org/x/text v0.3.4 // indirect golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect gopkg.in/natefinch/lumberjack.v2 v2.0.0 gopkg.in/yaml.v2 v2.3.0 gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 // indirect
</s> remove golang.org/x/sys v0.0.0-20201101102859-da207088b7d1 h1:a/mKvvZr9Jcc8oKfcmgzyp7OwF73JPWsQLvH1z2Kxck= golang.org/x/sys v0.0.0-20201101102859-da207088b7d1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= </s> add golang.org/x/sys v0.0.0-20201107080550-4d91cf3a1aaf h1:kt3wY1Lu5MJAnKTfoMR52Cu4gwvna4VTzNOiT8tY73s= golang.org/x/sys v0.0.0-20201107080550-4d91cf3a1aaf/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= </s> remove github.com/AdguardTeam/dnsproxy v0.33.0 h1:bYNf20QgvkclPm+w5YSakFQbrrlcD3MpUwkQPLMwhwU= github.com/AdguardTeam/dnsproxy v0.33.0/go.mod h1:kLi6lMpErnZThy5haiRSis4q0KTB8uPWO4JQsU1EDJA= </s> add github.com/AdguardTeam/dnsproxy v0.33.1 h1:rEAS1fBEQ3JslzsfkcyMRV96OeBWFnKzXvksduI0ous= github.com/AdguardTeam/dnsproxy v0.33.1/go.mod h1:kLi6lMpErnZThy5haiRSis4q0KTB8uPWO4JQsU1EDJA= </s> remove github.com/AdguardTeam/dnsproxy v0.33.0 </s> add github.com/AdguardTeam/dnsproxy v0.33.1
golang.org/x/sys v0.0.0-20201107080550-4d91cf3a1aaf
go.etcd.io/bbolt v1.3.4 golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897 golang.org/x/net v0.0.0-20201031054903-ff519b6c9102 golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9 // indirect golang.org/x/sys v0.0.0-20201107080550-4d91cf3a1aaf golang.org/x/text v0.3.4 // indirect golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect gopkg.in/natefinch/lumberjack.v2 v2.0.0 gopkg.in/yaml.v2 v2.3.0 gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 // indirect
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
Pull request: * all: update dnsproxy Merge in DNS/adguard-home from update-dnsproxy to master Squashed commit of the following: commit 6ed03c2131b93e3882e8f820e110696a41223267 Author: Ainar Garipov <[email protected]> Date: Mon Nov 9 13:13:36 2020 +0300 * all: update dnsproxy
https://github.com/AdguardTeam/AdGuardHome/commit/1e583315a867fdd0aeaf787ff95bd7525faf9b39
go.mod
dmitri.shuralyov.com/html/belt v0.0.0-20180602232347-f7d459c86be0/go.mod h1:JLBrvjyP0v+ecvNYvCpyZgu5/xkfAUhi6wJj28eUfSU= dmitri.shuralyov.com/service/change v0.0.0-20181023043359-a85b471d5412/go.mod h1:a1inKt/atXimZ4Mv927x+r7UpyzRUf4emIoiiSC2TN4= dmitri.shuralyov.com/state v0.0.0-20180228185332-28bcc343414c/go.mod h1:0PRwlb0D6DFvNNtx+9ybjezNCa8XF0xaYcETyp6rHWU= git.apache.org/thrift.git v0.0.0-20180902110319-2566ecd5d999/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg= github.com/AdguardTeam/dnsproxy v0.33.0 h1:bYNf20QgvkclPm+w5YSakFQbrrlcD3MpUwkQPLMwhwU= github.com/AdguardTeam/dnsproxy v0.33.0/go.mod h1:kLi6lMpErnZThy5haiRSis4q0KTB8uPWO4JQsU1EDJA= github.com/AdguardTeam/golibs v0.4.0/go.mod h1:skKsDKIBB7kkFflLJBpfGX+G8QFTx0WKUzB6TIgtUj4= github.com/AdguardTeam/golibs v0.4.2 h1:7M28oTZFoFwNmp8eGPb3ImmYbxGaJLyQXeIFVHjME0o= github.com/AdguardTeam/golibs v0.4.2/go.mod h1:skKsDKIBB7kkFflLJBpfGX+G8QFTx0WKUzB6TIgtUj4= github.com/AdguardTeam/gomitmproxy v0.2.0/go.mod h1:Qdv0Mktnzer5zpdpi5rAwixNJzW2FN91LjKJCkVbYGU= github.com/AdguardTeam/urlfilter v0.12.3 h1:FMjQG0eTgrr8xA3z2zaLVcCgGdpzoECPGWwgPjtwPNs=
</s> remove github.com/AdguardTeam/dnsproxy v0.33.0 </s> add github.com/AdguardTeam/dnsproxy v0.33.1 </s> remove golang.org/x/sys v0.0.0-20201101102859-da207088b7d1 h1:a/mKvvZr9Jcc8oKfcmgzyp7OwF73JPWsQLvH1z2Kxck= golang.org/x/sys v0.0.0-20201101102859-da207088b7d1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= </s> add golang.org/x/sys v0.0.0-20201107080550-4d91cf3a1aaf h1:kt3wY1Lu5MJAnKTfoMR52Cu4gwvna4VTzNOiT8tY73s= golang.org/x/sys v0.0.0-20201107080550-4d91cf3a1aaf/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= </s> remove golang.org/x/sys v0.0.0-20201101102859-da207088b7d1 </s> add golang.org/x/sys v0.0.0-20201107080550-4d91cf3a1aaf
github.com/AdguardTeam/dnsproxy v0.33.1 h1:rEAS1fBEQ3JslzsfkcyMRV96OeBWFnKzXvksduI0ous= github.com/AdguardTeam/dnsproxy v0.33.1/go.mod h1:kLi6lMpErnZThy5haiRSis4q0KTB8uPWO4JQsU1EDJA=
dmitri.shuralyov.com/html/belt v0.0.0-20180602232347-f7d459c86be0/go.mod h1:JLBrvjyP0v+ecvNYvCpyZgu5/xkfAUhi6wJj28eUfSU= dmitri.shuralyov.com/service/change v0.0.0-20181023043359-a85b471d5412/go.mod h1:a1inKt/atXimZ4Mv927x+r7UpyzRUf4emIoiiSC2TN4= dmitri.shuralyov.com/state v0.0.0-20180228185332-28bcc343414c/go.mod h1:0PRwlb0D6DFvNNtx+9ybjezNCa8XF0xaYcETyp6rHWU= git.apache.org/thrift.git v0.0.0-20180902110319-2566ecd5d999/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg= github.com/AdguardTeam/dnsproxy v0.33.1 h1:rEAS1fBEQ3JslzsfkcyMRV96OeBWFnKzXvksduI0ous= github.com/AdguardTeam/dnsproxy v0.33.1/go.mod h1:kLi6lMpErnZThy5haiRSis4q0KTB8uPWO4JQsU1EDJA= github.com/AdguardTeam/dnsproxy v0.33.1 h1:rEAS1fBEQ3JslzsfkcyMRV96OeBWFnKzXvksduI0ous= github.com/AdguardTeam/dnsproxy v0.33.1/go.mod h1:kLi6lMpErnZThy5haiRSis4q0KTB8uPWO4JQsU1EDJA= github.com/AdguardTeam/golibs v0.4.0/go.mod h1:skKsDKIBB7kkFflLJBpfGX+G8QFTx0WKUzB6TIgtUj4= github.com/AdguardTeam/golibs v0.4.2 h1:7M28oTZFoFwNmp8eGPb3ImmYbxGaJLyQXeIFVHjME0o= github.com/AdguardTeam/golibs v0.4.2/go.mod h1:skKsDKIBB7kkFflLJBpfGX+G8QFTx0WKUzB6TIgtUj4= github.com/AdguardTeam/gomitmproxy v0.2.0/go.mod h1:Qdv0Mktnzer5zpdpi5rAwixNJzW2FN91LjKJCkVbYGU= github.com/AdguardTeam/urlfilter v0.12.3 h1:FMjQG0eTgrr8xA3z2zaLVcCgGdpzoECPGWwgPjtwPNs=
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
Pull request: * all: update dnsproxy Merge in DNS/adguard-home from update-dnsproxy to master Squashed commit of the following: commit 6ed03c2131b93e3882e8f820e110696a41223267 Author: Ainar Garipov <[email protected]> Date: Mon Nov 9 13:13:36 2020 +0300 * all: update dnsproxy
https://github.com/AdguardTeam/AdGuardHome/commit/1e583315a867fdd0aeaf787ff95bd7525faf9b39
go.sum
github.com/joomcode/errorx v1.0.1 h1:CalpDWz14ZHd68fIqluJasJosAewpz2TFaJALrUxjrk= github.com/joomcode/errorx v1.0.1/go.mod h1:kgco15ekB6cs+4Xjzo7SPeXzx38PbJzBwbnu9qfVNHQ= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/kardianos/service v1.1.0 h1:QV2SiEeWK42P0aEmGcsAgjApw/lRxkwopvT+Gu6t1/0= github.com/kardianos/service v1.1.0/go.mod h1:RrJI2xn5vve/r32U5suTbeaSGoMU6GbNPoj36CVYcHc=
</s> remove golang.org/x/sys v0.0.0-20201101102859-da207088b7d1 h1:a/mKvvZr9Jcc8oKfcmgzyp7OwF73JPWsQLvH1z2Kxck= golang.org/x/sys v0.0.0-20201101102859-da207088b7d1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= </s> add golang.org/x/sys v0.0.0-20201107080550-4d91cf3a1aaf h1:kt3wY1Lu5MJAnKTfoMR52Cu4gwvna4VTzNOiT8tY73s= golang.org/x/sys v0.0.0-20201107080550-4d91cf3a1aaf/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= </s> remove github.com/AdguardTeam/dnsproxy v0.33.0 h1:bYNf20QgvkclPm+w5YSakFQbrrlcD3MpUwkQPLMwhwU= github.com/AdguardTeam/dnsproxy v0.33.0/go.mod h1:kLi6lMpErnZThy5haiRSis4q0KTB8uPWO4JQsU1EDJA= </s> add github.com/AdguardTeam/dnsproxy v0.33.1 h1:rEAS1fBEQ3JslzsfkcyMRV96OeBWFnKzXvksduI0ous= github.com/AdguardTeam/dnsproxy v0.33.1/go.mod h1:kLi6lMpErnZThy5haiRSis4q0KTB8uPWO4JQsU1EDJA= </s> remove golang.org/x/sys v0.0.0-20201101102859-da207088b7d1 </s> add golang.org/x/sys v0.0.0-20201107080550-4d91cf3a1aaf </s> remove github.com/AdguardTeam/dnsproxy v0.33.0 </s> add github.com/AdguardTeam/dnsproxy v0.33.1
github.com/joomcode/errorx v1.0.3 h1:3e1mi0u7/HTPNdg6d6DYyKGBhA5l9XpsfuVE29NxnWw= github.com/joomcode/errorx v1.0.3/go.mod h1:eQzdtdlNyN7etw6YCS4W4+lu442waxZYw5yvz0ULrRo=
github.com/joomcode/errorx v1.0.1 h1:CalpDWz14ZHd68fIqluJasJosAewpz2TFaJALrUxjrk= github.com/joomcode/errorx v1.0.1/go.mod h1:kgco15ekB6cs+4Xjzo7SPeXzx38PbJzBwbnu9qfVNHQ= github.com/joomcode/errorx v1.0.3 h1:3e1mi0u7/HTPNdg6d6DYyKGBhA5l9XpsfuVE29NxnWw= github.com/joomcode/errorx v1.0.3/go.mod h1:eQzdtdlNyN7etw6YCS4W4+lu442waxZYw5yvz0ULrRo= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/kardianos/service v1.1.0 h1:QV2SiEeWK42P0aEmGcsAgjApw/lRxkwopvT+Gu6t1/0= github.com/kardianos/service v1.1.0/go.mod h1:RrJI2xn5vve/r32U5suTbeaSGoMU6GbNPoj36CVYcHc=
[ "keep", "add", "keep", "keep", "keep", "keep" ]
Pull request: * all: update dnsproxy Merge in DNS/adguard-home from update-dnsproxy to master Squashed commit of the following: commit 6ed03c2131b93e3882e8f820e110696a41223267 Author: Ainar Garipov <[email protected]> Date: Mon Nov 9 13:13:36 2020 +0300 * all: update dnsproxy
https://github.com/AdguardTeam/AdGuardHome/commit/1e583315a867fdd0aeaf787ff95bd7525faf9b39
go.sum
golang.org/x/sys v0.0.0-20200519105757-fe76b779f299 h1:DYfZAGf2WMFjMxbgTjaC+2HC7NkNAQs+6Q8b9WEB/F4= golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201018230417-eeed37f84f13/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201101102859-da207088b7d1 h1:a/mKvvZr9Jcc8oKfcmgzyp7OwF73JPWsQLvH1z2Kxck= golang.org/x/sys v0.0.0-20201101102859-da207088b7d1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
</s> remove golang.org/x/sys v0.0.0-20201101102859-da207088b7d1 </s> add golang.org/x/sys v0.0.0-20201107080550-4d91cf3a1aaf </s> remove github.com/AdguardTeam/dnsproxy v0.33.0 h1:bYNf20QgvkclPm+w5YSakFQbrrlcD3MpUwkQPLMwhwU= github.com/AdguardTeam/dnsproxy v0.33.0/go.mod h1:kLi6lMpErnZThy5haiRSis4q0KTB8uPWO4JQsU1EDJA= </s> add github.com/AdguardTeam/dnsproxy v0.33.1 h1:rEAS1fBEQ3JslzsfkcyMRV96OeBWFnKzXvksduI0ous= github.com/AdguardTeam/dnsproxy v0.33.1/go.mod h1:kLi6lMpErnZThy5haiRSis4q0KTB8uPWO4JQsU1EDJA= </s> remove github.com/AdguardTeam/dnsproxy v0.33.0 </s> add github.com/AdguardTeam/dnsproxy v0.33.1
golang.org/x/sys v0.0.0-20201107080550-4d91cf3a1aaf h1:kt3wY1Lu5MJAnKTfoMR52Cu4gwvna4VTzNOiT8tY73s= golang.org/x/sys v0.0.0-20201107080550-4d91cf3a1aaf/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200519105757-fe76b779f299 h1:DYfZAGf2WMFjMxbgTjaC+2HC7NkNAQs+6Q8b9WEB/F4= golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201018230417-eeed37f84f13/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201107080550-4d91cf3a1aaf h1:kt3wY1Lu5MJAnKTfoMR52Cu4gwvna4VTzNOiT8tY73s= golang.org/x/sys v0.0.0-20201107080550-4d91cf3a1aaf/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201107080550-4d91cf3a1aaf h1:kt3wY1Lu5MJAnKTfoMR52Cu4gwvna4VTzNOiT8tY73s= golang.org/x/sys v0.0.0-20201107080550-4d91cf3a1aaf/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
Pull request: * all: update dnsproxy Merge in DNS/adguard-home from update-dnsproxy to master Squashed commit of the following: commit 6ed03c2131b93e3882e8f820e110696a41223267 Author: Ainar Garipov <[email protected]> Date: Mon Nov 9 13:13:36 2020 +0300 * all: update dnsproxy
https://github.com/AdguardTeam/AdGuardHome/commit/1e583315a867fdd0aeaf787ff95bd7525faf9b39
go.sum
return } err := Context.updater.Update() if err != nil { aghhttp.Error(r, w, http.StatusInternalServerError, "%s", err) return }
</s> remove func finishUpdate(ctx context.Context) { log.Info("Stopping all tasks") </s> add func finishUpdate(ctx context.Context, execPath string) { var err error log.Info("stopping all tasks") </s> remove } else { log.Info("Restarting: %v", os.Args) err = syscall.Exec(curBinName, os.Args, os.Environ()) if err != nil { log.Fatalf("syscall.Exec() failed: %s", err) } // Unreachable code </s> add } log.Info("restarting: %q %q", execPath, os.Args[1:]) err = syscall.Exec(execPath, os.Args, os.Environ()) if err != nil { log.Fatalf("restarting: %s", err) </s> remove log.Fatalf("exec.Command() failed: %s", err) </s> add log.Fatalf("restarting:: %s", err) </s> remove log.Fatalf("exec.Command() failed: %s", err) </s> add log.Fatalf("restarting: stopping: %s", err) </s> remove cmd := exec.Command(curBinName, os.Args[1:]...) log.Info("Restarting: %v", cmd.Args) </s> add cmd := exec.Command(execPath, os.Args[1:]...) log.Info("restarting: %q %q", execPath, os.Args[1:])
// Retain the current absolute path of the executable, since the updater is // likely to change the position current one to the backup directory. // // See https://github.com/AdguardTeam/AdGuardHome/issues/4735. execPath, err := os.Executable() if err != nil { aghhttp.Error(r, w, http.StatusInternalServerError, "getting path: %s", err) return } err = Context.updater.Update()
return } // Retain the current absolute path of the executable, since the updater is // likely to change the position current one to the backup directory. // // See https://github.com/AdguardTeam/AdGuardHome/issues/4735. execPath, err := os.Executable() if err != nil { aghhttp.Error(r, w, http.StatusInternalServerError, "getting path: %s", err) return } err = Context.updater.Update() if err != nil { aghhttp.Error(r, w, http.StatusInternalServerError, "%s", err) return }
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
Pull request: home: fix exe path finding Closes #4735. Squashed commit of the following: commit 8228e5f82c9d8056d5567a7f1b13b1365346c4d4 Author: Ainar Garipov <[email protected]> Date: Mon Jul 11 17:41:19 2022 +0300 home: fix exe path finding
https://github.com/AdguardTeam/AdGuardHome/commit/1eafb4e7cf64f0027674e59e4a4b5ccc33c44c43
internal/home/controlupdate.go
if f, ok := w.(http.Flusher); ok { f.Flush() } // The background context is used because the underlying functions wrap // it with timeout and shut down the server, which handles current // request. It also should be done in a separate goroutine due to the // same reason. go func() { finishUpdate(context.Background()) }() } // versionResponse is the response for /control/version.json endpoint. type versionResponse struct { updater.VersionInfo
</s> remove err := Context.updater.Update() </s> add // Retain the current absolute path of the executable, since the updater is // likely to change the position current one to the backup directory. // // See https://github.com/AdguardTeam/AdGuardHome/issues/4735. execPath, err := os.Executable() if err != nil { aghhttp.Error(r, w, http.StatusInternalServerError, "getting path: %s", err) return } err = Context.updater.Update() </s> remove // Note: // we can't restart the service via "kardianos/service" package - it kills the process first // we can't start a new instance - Windows doesn't allow it </s> add // NOTE: We can't restart the service via "kardianos/service" // package, because it kills the process first we can't start a new // instance, because Windows doesn't allow it. // // TODO(a.garipov): Recheck the claim above. </s> remove curBinName, err := os.Executable() if err != nil { log.Fatalf("executable path request failed: %s", err) } </s> add </s> remove } else { log.Info("Restarting: %v", os.Args) err = syscall.Exec(curBinName, os.Args, os.Environ()) if err != nil { log.Fatalf("syscall.Exec() failed: %s", err) } // Unreachable code </s> add } log.Info("restarting: %q %q", execPath, os.Args[1:]) err = syscall.Exec(execPath, os.Args, os.Environ()) if err != nil { log.Fatalf("restarting: %s", err) </s> remove log.Fatalf("exec.Command() failed: %s", err) </s> add log.Fatalf("restarting: stopping: %s", err)
// The background context is used because the underlying functions wrap it // with timeout and shut down the server, which handles current request. It // also should be done in a separate goroutine for the same reason. go finishUpdate(context.Background(), execPath)
if f, ok := w.(http.Flusher); ok { f.Flush() } // The background context is used because the underlying functions wrap it // with timeout and shut down the server, which handles current request. It // also should be done in a separate goroutine for the same reason. go finishUpdate(context.Background(), execPath) // The background context is used because the underlying functions wrap it // with timeout and shut down the server, which handles current request. It // also should be done in a separate goroutine for the same reason. go finishUpdate(context.Background(), execPath) // The background context is used because the underlying functions wrap it // with timeout and shut down the server, which handles current request. It // also should be done in a separate goroutine for the same reason. go finishUpdate(context.Background(), execPath) // The background context is used because the underlying functions wrap it // with timeout and shut down the server, which handles current request. It // also should be done in a separate goroutine for the same reason. go finishUpdate(context.Background(), execPath) // The background context is used because the underlying functions wrap it // with timeout and shut down the server, which handles current request. It // also should be done in a separate goroutine for the same reason. go finishUpdate(context.Background(), execPath) // The background context is used because the underlying functions wrap it // with timeout and shut down the server, which handles current request. It // also should be done in a separate goroutine for the same reason. go finishUpdate(context.Background(), execPath) // The background context is used because the underlying functions wrap it // with timeout and shut down the server, which handles current request. It // also should be done in a separate goroutine for the same reason. go finishUpdate(context.Background(), execPath) } // versionResponse is the response for /control/version.json endpoint. type versionResponse struct { updater.VersionInfo
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
Pull request: home: fix exe path finding Closes #4735. Squashed commit of the following: commit 8228e5f82c9d8056d5567a7f1b13b1365346c4d4 Author: Ainar Garipov <[email protected]> Date: Mon Jul 11 17:41:19 2022 +0300 home: fix exe path finding
https://github.com/AdguardTeam/AdGuardHome/commit/1eafb4e7cf64f0027674e59e4a4b5ccc33c44c43
internal/home/controlupdate.go
return c.Enabled && (c.PortHTTPS < 1024 || c.PortDNSOverTLS < 1024 || c.PortDNSOverQUIC < 1024) } // finishUpdate completes an update procedure. func finishUpdate(ctx context.Context) { log.Info("Stopping all tasks") cleanup(ctx) cleanupAlways() curBinName, err := os.Executable() if err != nil {
</s> remove curBinName, err := os.Executable() if err != nil { log.Fatalf("executable path request failed: %s", err) } </s> add </s> remove err := Context.updater.Update() </s> add // Retain the current absolute path of the executable, since the updater is // likely to change the position current one to the backup directory. // // See https://github.com/AdguardTeam/AdGuardHome/issues/4735. execPath, err := os.Executable() if err != nil { aghhttp.Error(r, w, http.StatusInternalServerError, "getting path: %s", err) return } err = Context.updater.Update() </s> remove } else { log.Info("Restarting: %v", os.Args) err = syscall.Exec(curBinName, os.Args, os.Environ()) if err != nil { log.Fatalf("syscall.Exec() failed: %s", err) } // Unreachable code </s> add } log.Info("restarting: %q %q", execPath, os.Args[1:]) err = syscall.Exec(execPath, os.Args, os.Environ()) if err != nil { log.Fatalf("restarting: %s", err) </s> remove log.Fatalf("exec.Command() failed: %s", err) </s> add log.Fatalf("restarting: stopping: %s", err) </s> remove cmd := exec.Command(curBinName, os.Args[1:]...) log.Info("Restarting: %v", cmd.Args) </s> add cmd := exec.Command(execPath, os.Args[1:]...) log.Info("restarting: %q %q", execPath, os.Args[1:])
func finishUpdate(ctx context.Context, execPath string) { var err error log.Info("stopping all tasks")
return c.Enabled && (c.PortHTTPS < 1024 || c.PortDNSOverTLS < 1024 || c.PortDNSOverQUIC < 1024) } // finishUpdate completes an update procedure. func finishUpdate(ctx context.Context, execPath string) { var err error log.Info("stopping all tasks") func finishUpdate(ctx context.Context, execPath string) { var err error log.Info("stopping all tasks") cleanup(ctx) cleanupAlways() curBinName, err := os.Executable() if err != nil {
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
Pull request: home: fix exe path finding Closes #4735. Squashed commit of the following: commit 8228e5f82c9d8056d5567a7f1b13b1365346c4d4 Author: Ainar Garipov <[email protected]> Date: Mon Jul 11 17:41:19 2022 +0300 home: fix exe path finding
https://github.com/AdguardTeam/AdGuardHome/commit/1eafb4e7cf64f0027674e59e4a4b5ccc33c44c43
internal/home/controlupdate.go
log.Info("Stopping all tasks") cleanup(ctx) cleanupAlways() curBinName, err := os.Executable() if err != nil { log.Fatalf("executable path request failed: %s", err) } if runtime.GOOS == "windows" { if Context.runningAsService { // Note: // we can't restart the service via "kardianos/service" package - it kills the process first // we can't start a new instance - Windows doesn't allow it
</s> remove // Note: // we can't restart the service via "kardianos/service" package - it kills the process first // we can't start a new instance - Windows doesn't allow it </s> add // NOTE: We can't restart the service via "kardianos/service" // package, because it kills the process first we can't start a new // instance, because Windows doesn't allow it. // // TODO(a.garipov): Recheck the claim above. </s> remove log.Fatalf("exec.Command() failed: %s", err) </s> add log.Fatalf("restarting: stopping: %s", err) </s> remove func finishUpdate(ctx context.Context) { log.Info("Stopping all tasks") </s> add func finishUpdate(ctx context.Context, execPath string) { var err error log.Info("stopping all tasks") </s> remove err := Context.updater.Update() </s> add // Retain the current absolute path of the executable, since the updater is // likely to change the position current one to the backup directory. // // See https://github.com/AdguardTeam/AdGuardHome/issues/4735. execPath, err := os.Executable() if err != nil { aghhttp.Error(r, w, http.StatusInternalServerError, "getting path: %s", err) return } err = Context.updater.Update() </s> remove } else { log.Info("Restarting: %v", os.Args) err = syscall.Exec(curBinName, os.Args, os.Environ()) if err != nil { log.Fatalf("syscall.Exec() failed: %s", err) } // Unreachable code </s> add } log.Info("restarting: %q %q", execPath, os.Args[1:]) err = syscall.Exec(execPath, os.Args, os.Environ()) if err != nil { log.Fatalf("restarting: %s", err)
log.Info("Stopping all tasks") cleanup(ctx) cleanupAlways() if runtime.GOOS == "windows" { if Context.runningAsService { // Note: // we can't restart the service via "kardianos/service" package - it kills the process first // we can't start a new instance - Windows doesn't allow it
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
Pull request: home: fix exe path finding Closes #4735. Squashed commit of the following: commit 8228e5f82c9d8056d5567a7f1b13b1365346c4d4 Author: Ainar Garipov <[email protected]> Date: Mon Jul 11 17:41:19 2022 +0300 home: fix exe path finding
https://github.com/AdguardTeam/AdGuardHome/commit/1eafb4e7cf64f0027674e59e4a4b5ccc33c44c43
internal/home/controlupdate.go
} if runtime.GOOS == "windows" { if Context.runningAsService { // Note: // we can't restart the service via "kardianos/service" package - it kills the process first // we can't start a new instance - Windows doesn't allow it cmd := exec.Command("cmd", "/c", "net stop AdGuardHome & net start AdGuardHome") err = cmd.Start() if err != nil { log.Fatalf("exec.Command() failed: %s", err) }
</s> remove curBinName, err := os.Executable() if err != nil { log.Fatalf("executable path request failed: %s", err) } </s> add </s> remove log.Fatalf("exec.Command() failed: %s", err) </s> add log.Fatalf("restarting: stopping: %s", err) </s> remove } else { log.Info("Restarting: %v", os.Args) err = syscall.Exec(curBinName, os.Args, os.Environ()) if err != nil { log.Fatalf("syscall.Exec() failed: %s", err) } // Unreachable code </s> add } log.Info("restarting: %q %q", execPath, os.Args[1:]) err = syscall.Exec(execPath, os.Args, os.Environ()) if err != nil { log.Fatalf("restarting: %s", err) </s> remove err := Context.updater.Update() </s> add // Retain the current absolute path of the executable, since the updater is // likely to change the position current one to the backup directory. // // See https://github.com/AdguardTeam/AdGuardHome/issues/4735. execPath, err := os.Executable() if err != nil { aghhttp.Error(r, w, http.StatusInternalServerError, "getting path: %s", err) return } err = Context.updater.Update() </s> remove log.Fatalf("exec.Command() failed: %s", err) </s> add log.Fatalf("restarting:: %s", err)
// NOTE: We can't restart the service via "kardianos/service" // package, because it kills the process first we can't start a new // instance, because Windows doesn't allow it. // // TODO(a.garipov): Recheck the claim above.
} if runtime.GOOS == "windows" { if Context.runningAsService { // NOTE: We can't restart the service via "kardianos/service" // package, because it kills the process first we can't start a new // instance, because Windows doesn't allow it. // // TODO(a.garipov): Recheck the claim above. // NOTE: We can't restart the service via "kardianos/service" // package, because it kills the process first we can't start a new // instance, because Windows doesn't allow it. // // TODO(a.garipov): Recheck the claim above. // NOTE: We can't restart the service via "kardianos/service" // package, because it kills the process first we can't start a new // instance, because Windows doesn't allow it. // // TODO(a.garipov): Recheck the claim above. cmd := exec.Command("cmd", "/c", "net stop AdGuardHome & net start AdGuardHome") err = cmd.Start() if err != nil { log.Fatalf("exec.Command() failed: %s", err) }
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
Pull request: home: fix exe path finding Closes #4735. Squashed commit of the following: commit 8228e5f82c9d8056d5567a7f1b13b1365346c4d4 Author: Ainar Garipov <[email protected]> Date: Mon Jul 11 17:41:19 2022 +0300 home: fix exe path finding
https://github.com/AdguardTeam/AdGuardHome/commit/1eafb4e7cf64f0027674e59e4a4b5ccc33c44c43
internal/home/controlupdate.go
// we can't start a new instance - Windows doesn't allow it cmd := exec.Command("cmd", "/c", "net stop AdGuardHome & net start AdGuardHome") err = cmd.Start() if err != nil { log.Fatalf("exec.Command() failed: %s", err) } os.Exit(0) } cmd := exec.Command(curBinName, os.Args[1:]...)
</s> remove // Note: // we can't restart the service via "kardianos/service" package - it kills the process first // we can't start a new instance - Windows doesn't allow it </s> add // NOTE: We can't restart the service via "kardianos/service" // package, because it kills the process first we can't start a new // instance, because Windows doesn't allow it. // // TODO(a.garipov): Recheck the claim above. </s> remove curBinName, err := os.Executable() if err != nil { log.Fatalf("executable path request failed: %s", err) } </s> add </s> remove cmd := exec.Command(curBinName, os.Args[1:]...) log.Info("Restarting: %v", cmd.Args) </s> add cmd := exec.Command(execPath, os.Args[1:]...) log.Info("restarting: %q %q", execPath, os.Args[1:]) </s> remove } else { log.Info("Restarting: %v", os.Args) err = syscall.Exec(curBinName, os.Args, os.Environ()) if err != nil { log.Fatalf("syscall.Exec() failed: %s", err) } // Unreachable code </s> add } log.Info("restarting: %q %q", execPath, os.Args[1:]) err = syscall.Exec(execPath, os.Args, os.Environ()) if err != nil { log.Fatalf("restarting: %s", err) </s> remove log.Fatalf("exec.Command() failed: %s", err) </s> add log.Fatalf("restarting:: %s", err)
log.Fatalf("restarting: stopping: %s", err)
// we can't start a new instance - Windows doesn't allow it cmd := exec.Command("cmd", "/c", "net stop AdGuardHome & net start AdGuardHome") err = cmd.Start() if err != nil { log.Fatalf("restarting: stopping: %s", err) } os.Exit(0) } cmd := exec.Command(curBinName, os.Args[1:]...)
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
Pull request: home: fix exe path finding Closes #4735. Squashed commit of the following: commit 8228e5f82c9d8056d5567a7f1b13b1365346c4d4 Author: Ainar Garipov <[email protected]> Date: Mon Jul 11 17:41:19 2022 +0300 home: fix exe path finding
https://github.com/AdguardTeam/AdGuardHome/commit/1eafb4e7cf64f0027674e59e4a4b5ccc33c44c43
internal/home/controlupdate.go
} os.Exit(0) } cmd := exec.Command(curBinName, os.Args[1:]...) log.Info("Restarting: %v", cmd.Args) cmd.Stdin = os.Stdin cmd.Stdout = os.Stdout cmd.Stderr = os.Stderr err = cmd.Start() if err != nil {
</s> remove log.Fatalf("exec.Command() failed: %s", err) </s> add log.Fatalf("restarting:: %s", err) </s> remove log.Fatalf("exec.Command() failed: %s", err) </s> add log.Fatalf("restarting: stopping: %s", err) </s> remove } else { log.Info("Restarting: %v", os.Args) err = syscall.Exec(curBinName, os.Args, os.Environ()) if err != nil { log.Fatalf("syscall.Exec() failed: %s", err) } // Unreachable code </s> add } log.Info("restarting: %q %q", execPath, os.Args[1:]) err = syscall.Exec(execPath, os.Args, os.Environ()) if err != nil { log.Fatalf("restarting: %s", err) </s> remove err := Context.updater.Update() </s> add // Retain the current absolute path of the executable, since the updater is // likely to change the position current one to the backup directory. // // See https://github.com/AdguardTeam/AdGuardHome/issues/4735. execPath, err := os.Executable() if err != nil { aghhttp.Error(r, w, http.StatusInternalServerError, "getting path: %s", err) return } err = Context.updater.Update() </s> remove // Note: // we can't restart the service via "kardianos/service" package - it kills the process first // we can't start a new instance - Windows doesn't allow it </s> add // NOTE: We can't restart the service via "kardianos/service" // package, because it kills the process first we can't start a new // instance, because Windows doesn't allow it. // // TODO(a.garipov): Recheck the claim above.
cmd := exec.Command(execPath, os.Args[1:]...) log.Info("restarting: %q %q", execPath, os.Args[1:])
} os.Exit(0) } cmd := exec.Command(execPath, os.Args[1:]...) log.Info("restarting: %q %q", execPath, os.Args[1:]) cmd := exec.Command(execPath, os.Args[1:]...) log.Info("restarting: %q %q", execPath, os.Args[1:]) cmd.Stdin = os.Stdin cmd.Stdout = os.Stdout cmd.Stderr = os.Stderr err = cmd.Start() if err != nil {
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
Pull request: home: fix exe path finding Closes #4735. Squashed commit of the following: commit 8228e5f82c9d8056d5567a7f1b13b1365346c4d4 Author: Ainar Garipov <[email protected]> Date: Mon Jul 11 17:41:19 2022 +0300 home: fix exe path finding
https://github.com/AdguardTeam/AdGuardHome/commit/1eafb4e7cf64f0027674e59e4a4b5ccc33c44c43
internal/home/controlupdate.go
cmd.Stdout = os.Stdout cmd.Stderr = os.Stderr err = cmd.Start() if err != nil { log.Fatalf("exec.Command() failed: %s", err) } os.Exit(0) } else { log.Info("Restarting: %v", os.Args) err = syscall.Exec(curBinName, os.Args, os.Environ())
</s> remove } else { log.Info("Restarting: %v", os.Args) err = syscall.Exec(curBinName, os.Args, os.Environ()) if err != nil { log.Fatalf("syscall.Exec() failed: %s", err) } // Unreachable code </s> add } log.Info("restarting: %q %q", execPath, os.Args[1:]) err = syscall.Exec(execPath, os.Args, os.Environ()) if err != nil { log.Fatalf("restarting: %s", err) </s> remove cmd := exec.Command(curBinName, os.Args[1:]...) log.Info("Restarting: %v", cmd.Args) </s> add cmd := exec.Command(execPath, os.Args[1:]...) log.Info("restarting: %q %q", execPath, os.Args[1:]) </s> remove log.Fatalf("exec.Command() failed: %s", err) </s> add log.Fatalf("restarting: stopping: %s", err) </s> remove err := Context.updater.Update() </s> add // Retain the current absolute path of the executable, since the updater is // likely to change the position current one to the backup directory. // // See https://github.com/AdguardTeam/AdGuardHome/issues/4735. execPath, err := os.Executable() if err != nil { aghhttp.Error(r, w, http.StatusInternalServerError, "getting path: %s", err) return } err = Context.updater.Update() </s> remove // Note: // we can't restart the service via "kardianos/service" package - it kills the process first // we can't start a new instance - Windows doesn't allow it </s> add // NOTE: We can't restart the service via "kardianos/service" // package, because it kills the process first we can't start a new // instance, because Windows doesn't allow it. // // TODO(a.garipov): Recheck the claim above.
log.Fatalf("restarting:: %s", err)
cmd.Stdout = os.Stdout cmd.Stderr = os.Stderr err = cmd.Start() if err != nil { log.Fatalf("restarting:: %s", err) } os.Exit(0) } else { log.Info("Restarting: %v", os.Args) err = syscall.Exec(curBinName, os.Args, os.Environ())
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
Pull request: home: fix exe path finding Closes #4735. Squashed commit of the following: commit 8228e5f82c9d8056d5567a7f1b13b1365346c4d4 Author: Ainar Garipov <[email protected]> Date: Mon Jul 11 17:41:19 2022 +0300 home: fix exe path finding
https://github.com/AdguardTeam/AdGuardHome/commit/1eafb4e7cf64f0027674e59e4a4b5ccc33c44c43
internal/home/controlupdate.go
if err != nil { log.Fatalf("exec.Command() failed: %s", err) } os.Exit(0) } else { log.Info("Restarting: %v", os.Args) err = syscall.Exec(curBinName, os.Args, os.Environ()) if err != nil { log.Fatalf("syscall.Exec() failed: %s", err) } // Unreachable code } }
</s> remove log.Fatalf("exec.Command() failed: %s", err) </s> add log.Fatalf("restarting:: %s", err) </s> remove log.Fatalf("exec.Command() failed: %s", err) </s> add log.Fatalf("restarting: stopping: %s", err) </s> remove err := Context.updater.Update() </s> add // Retain the current absolute path of the executable, since the updater is // likely to change the position current one to the backup directory. // // See https://github.com/AdguardTeam/AdGuardHome/issues/4735. execPath, err := os.Executable() if err != nil { aghhttp.Error(r, w, http.StatusInternalServerError, "getting path: %s", err) return } err = Context.updater.Update() </s> remove cmd := exec.Command(curBinName, os.Args[1:]...) log.Info("Restarting: %v", cmd.Args) </s> add cmd := exec.Command(execPath, os.Args[1:]...) log.Info("restarting: %q %q", execPath, os.Args[1:]) </s> remove curBinName, err := os.Executable() if err != nil { log.Fatalf("executable path request failed: %s", err) } </s> add
} log.Info("restarting: %q %q", execPath, os.Args[1:]) err = syscall.Exec(execPath, os.Args, os.Environ()) if err != nil { log.Fatalf("restarting: %s", err)
if err != nil { log.Fatalf("exec.Command() failed: %s", err) } os.Exit(0) } log.Info("restarting: %q %q", execPath, os.Args[1:]) err = syscall.Exec(execPath, os.Args, os.Environ()) if err != nil { log.Fatalf("restarting: %s", err) } log.Info("restarting: %q %q", execPath, os.Args[1:]) err = syscall.Exec(execPath, os.Args, os.Environ()) if err != nil { log.Fatalf("restarting: %s", err) } log.Info("restarting: %q %q", execPath, os.Args[1:]) err = syscall.Exec(execPath, os.Args, os.Environ()) if err != nil { log.Fatalf("restarting: %s", err) } log.Info("restarting: %q %q", execPath, os.Args[1:]) err = syscall.Exec(execPath, os.Args, os.Environ()) if err != nil { log.Fatalf("restarting: %s", err) } log.Info("restarting: %q %q", execPath, os.Args[1:]) err = syscall.Exec(execPath, os.Args, os.Environ()) if err != nil { log.Fatalf("restarting: %s", err) } log.Info("restarting: %q %q", execPath, os.Args[1:]) err = syscall.Exec(execPath, os.Args, os.Environ()) if err != nil { log.Fatalf("restarting: %s", err) } log.Info("restarting: %q %q", execPath, os.Args[1:]) err = syscall.Exec(execPath, os.Args, os.Environ()) if err != nil { log.Fatalf("restarting: %s", err) } }
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep" ]
Pull request: home: fix exe path finding Closes #4735. Squashed commit of the following: commit 8228e5f82c9d8056d5567a7f1b13b1365346c4d4 Author: Ainar Garipov <[email protected]> Date: Mon Jul 11 17:41:19 2022 +0300 home: fix exe path finding
https://github.com/AdguardTeam/AdGuardHome/commit/1eafb4e7cf64f0027674e59e4a4b5ccc33c44c43
internal/home/controlupdate.go
// -------------------------- // helper functions for stats // -------------------------- func getSlice(input [statsHistoryElements]float64, start int, end int) []float64 { output := make([]float64, 0) for i := start; i <= end; i++ { output = append(output, input[i]) } return output
</s> remove output = append(output, input[i]) </s> add output = append([]float64{input[i]}, output...) </s> remove count := getSlice(stats.entries[processingTimeCount], start, end) sum := getSlice(stats.entries[processingTimeSum], start, end) </s> add count := getReversedSlice(stats.entries[processingTimeCount], start, end) sum := getReversedSlice(stats.entries[processingTimeSum], start, end) </s> remove "dns_queries": getSlice(stats.entries[totalRequests], start, end), "blocked_filtering": getSlice(stats.entries[filteredLists], start, end), "replaced_safebrowsing": getSlice(stats.entries[filteredSafebrowsing], start, end), "replaced_safesearch": getSlice(stats.entries[filteredSafesearch], start, end), "replaced_parental": getSlice(stats.entries[filteredParental], start, end), </s> add "dns_queries": getReversedSlice(stats.entries[totalRequests], start, end), "blocked_filtering": getReversedSlice(stats.entries[filteredLists], start, end), "replaced_safebrowsing": getReversedSlice(stats.entries[filteredSafebrowsing], start, end), "replaced_safesearch": getReversedSlice(stats.entries[filteredSafesearch], start, end), "replaced_parental": getReversedSlice(stats.entries[filteredParental], start, end),
func getReversedSlice(input [statsHistoryElements]float64, start int, end int) []float64 {
// -------------------------- // helper functions for stats // -------------------------- func getReversedSlice(input [statsHistoryElements]float64, start int, end int) []float64 { output := make([]float64, 0) for i := start; i <= end; i++ { output = append(output, input[i]) } return output
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
Fix invalid element order for historical stats -- in API declaration values are from oldest to newest, not other way around.
https://github.com/AdguardTeam/AdGuardHome/commit/1f0fdef8d6b2ce324e7009bb3f95626d87438d61
helpers.go
// -------------------------- func getSlice(input [statsHistoryElements]float64, start int, end int) []float64 { output := make([]float64, 0) for i := start; i <= end; i++ { output = append(output, input[i]) } return output } func generateMapFromStats(stats *periodicStats, start int, end int) map[string]interface{} {
</s> remove func getSlice(input [statsHistoryElements]float64, start int, end int) []float64 { </s> add func getReversedSlice(input [statsHistoryElements]float64, start int, end int) []float64 { </s> remove count := getSlice(stats.entries[processingTimeCount], start, end) sum := getSlice(stats.entries[processingTimeSum], start, end) </s> add count := getReversedSlice(stats.entries[processingTimeCount], start, end) sum := getReversedSlice(stats.entries[processingTimeSum], start, end) </s> remove "dns_queries": getSlice(stats.entries[totalRequests], start, end), "blocked_filtering": getSlice(stats.entries[filteredLists], start, end), "replaced_safebrowsing": getSlice(stats.entries[filteredSafebrowsing], start, end), "replaced_safesearch": getSlice(stats.entries[filteredSafesearch], start, end), "replaced_parental": getSlice(stats.entries[filteredParental], start, end), </s> add "dns_queries": getReversedSlice(stats.entries[totalRequests], start, end), "blocked_filtering": getReversedSlice(stats.entries[filteredLists], start, end), "replaced_safebrowsing": getReversedSlice(stats.entries[filteredSafebrowsing], start, end), "replaced_safesearch": getReversedSlice(stats.entries[filteredSafesearch], start, end), "replaced_parental": getReversedSlice(stats.entries[filteredParental], start, end),
output = append([]float64{input[i]}, output...)
// -------------------------- func getSlice(input [statsHistoryElements]float64, start int, end int) []float64 { output := make([]float64, 0) for i := start; i <= end; i++ { output = append([]float64{input[i]}, output...) } return output } func generateMapFromStats(stats *periodicStats, start int, end int) map[string]interface{} {
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
Fix invalid element order for historical stats -- in API declaration values are from oldest to newest, not other way around.
https://github.com/AdguardTeam/AdGuardHome/commit/1f0fdef8d6b2ce324e7009bb3f95626d87438d61
helpers.go
end = clamp(end, 0, statsHistoryElements) avgProcessingTime := make([]float64, 0) count := getSlice(stats.entries[processingTimeCount], start, end) sum := getSlice(stats.entries[processingTimeSum], start, end) for i := 0; i < len(count); i++ { var avg float64 if count[i] != 0 { avg = sum[i] / count[i] avg *= 1000
</s> remove output = append(output, input[i]) </s> add output = append([]float64{input[i]}, output...) </s> remove func getSlice(input [statsHistoryElements]float64, start int, end int) []float64 { </s> add func getReversedSlice(input [statsHistoryElements]float64, start int, end int) []float64 { </s> remove "dns_queries": getSlice(stats.entries[totalRequests], start, end), "blocked_filtering": getSlice(stats.entries[filteredLists], start, end), "replaced_safebrowsing": getSlice(stats.entries[filteredSafebrowsing], start, end), "replaced_safesearch": getSlice(stats.entries[filteredSafesearch], start, end), "replaced_parental": getSlice(stats.entries[filteredParental], start, end), </s> add "dns_queries": getReversedSlice(stats.entries[totalRequests], start, end), "blocked_filtering": getReversedSlice(stats.entries[filteredLists], start, end), "replaced_safebrowsing": getReversedSlice(stats.entries[filteredSafebrowsing], start, end), "replaced_safesearch": getReversedSlice(stats.entries[filteredSafesearch], start, end), "replaced_parental": getReversedSlice(stats.entries[filteredParental], start, end),
count := getReversedSlice(stats.entries[processingTimeCount], start, end) sum := getReversedSlice(stats.entries[processingTimeSum], start, end)
end = clamp(end, 0, statsHistoryElements) avgProcessingTime := make([]float64, 0) count := getReversedSlice(stats.entries[processingTimeCount], start, end) sum := getReversedSlice(stats.entries[processingTimeSum], start, end) count := getReversedSlice(stats.entries[processingTimeCount], start, end) sum := getReversedSlice(stats.entries[processingTimeSum], start, end) for i := 0; i < len(count); i++ { var avg float64 if count[i] != 0 { avg = sum[i] / count[i] avg *= 1000
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
Fix invalid element order for historical stats -- in API declaration values are from oldest to newest, not other way around.
https://github.com/AdguardTeam/AdGuardHome/commit/1f0fdef8d6b2ce324e7009bb3f95626d87438d61
helpers.go
avgProcessingTime = append(avgProcessingTime, avg) } result := map[string]interface{}{ "dns_queries": getSlice(stats.entries[totalRequests], start, end), "blocked_filtering": getSlice(stats.entries[filteredLists], start, end), "replaced_safebrowsing": getSlice(stats.entries[filteredSafebrowsing], start, end), "replaced_safesearch": getSlice(stats.entries[filteredSafesearch], start, end), "replaced_parental": getSlice(stats.entries[filteredParental], start, end), "avg_processing_time": avgProcessingTime, } return result }
</s> remove output = append(output, input[i]) </s> add output = append([]float64{input[i]}, output...) </s> remove func getSlice(input [statsHistoryElements]float64, start int, end int) []float64 { </s> add func getReversedSlice(input [statsHistoryElements]float64, start int, end int) []float64 { </s> remove count := getSlice(stats.entries[processingTimeCount], start, end) sum := getSlice(stats.entries[processingTimeSum], start, end) </s> add count := getReversedSlice(stats.entries[processingTimeCount], start, end) sum := getReversedSlice(stats.entries[processingTimeSum], start, end)
"dns_queries": getReversedSlice(stats.entries[totalRequests], start, end), "blocked_filtering": getReversedSlice(stats.entries[filteredLists], start, end), "replaced_safebrowsing": getReversedSlice(stats.entries[filteredSafebrowsing], start, end), "replaced_safesearch": getReversedSlice(stats.entries[filteredSafesearch], start, end), "replaced_parental": getReversedSlice(stats.entries[filteredParental], start, end),
avgProcessingTime = append(avgProcessingTime, avg) } result := map[string]interface{}{ "dns_queries": getReversedSlice(stats.entries[totalRequests], start, end), "blocked_filtering": getReversedSlice(stats.entries[filteredLists], start, end), "replaced_safebrowsing": getReversedSlice(stats.entries[filteredSafebrowsing], start, end), "replaced_safesearch": getReversedSlice(stats.entries[filteredSafesearch], start, end), "replaced_parental": getReversedSlice(stats.entries[filteredParental], start, end), "dns_queries": getReversedSlice(stats.entries[totalRequests], start, end), "blocked_filtering": getReversedSlice(stats.entries[filteredLists], start, end), "replaced_safebrowsing": getReversedSlice(stats.entries[filteredSafebrowsing], start, end), "replaced_safesearch": getReversedSlice(stats.entries[filteredSafesearch], start, end), "replaced_parental": getReversedSlice(stats.entries[filteredParental], start, end), "dns_queries": getReversedSlice(stats.entries[totalRequests], start, end), "blocked_filtering": getReversedSlice(stats.entries[filteredLists], start, end), "replaced_safebrowsing": getReversedSlice(stats.entries[filteredSafebrowsing], start, end), "replaced_safesearch": getReversedSlice(stats.entries[filteredSafesearch], start, end), "replaced_parental": getReversedSlice(stats.entries[filteredParental], start, end), "dns_queries": getReversedSlice(stats.entries[totalRequests], start, end), "blocked_filtering": getReversedSlice(stats.entries[filteredLists], start, end), "replaced_safebrowsing": getReversedSlice(stats.entries[filteredSafebrowsing], start, end), "replaced_safesearch": getReversedSlice(stats.entries[filteredSafesearch], start, end), "replaced_parental": getReversedSlice(stats.entries[filteredParental], start, end), "dns_queries": getReversedSlice(stats.entries[totalRequests], start, end), "blocked_filtering": getReversedSlice(stats.entries[filteredLists], start, end), "replaced_safebrowsing": getReversedSlice(stats.entries[filteredSafebrowsing], start, end), "replaced_safesearch": getReversedSlice(stats.entries[filteredSafesearch], start, end), "replaced_parental": getReversedSlice(stats.entries[filteredParental], start, end), "avg_processing_time": avgProcessingTime, } return result }
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
Fix invalid element order for historical stats -- in API declaration values are from oldest to newest, not other way around.
https://github.com/AdguardTeam/AdGuardHome/commit/1f0fdef8d6b2ce324e7009bb3f95626d87438d61
helpers.go
[actions.getVersionFailure]: state => ({ ...state, processingVersion: false }), [actions.getVersionSuccess]: (state, { payload }) => { const currentVersion = state.dnsVersion === 'undefined' ? 0 : state.dnsVersion; if (payload && versionCompare(currentVersion, payload.version) === -1) { const { version, announcement_url: announcementUrl, new_version: newVersion, can_autoupdate: canAutoUpdate,
</s> remove version, </s> add </s> remove version, </s> add
if (payload && versionCompare(currentVersion, payload.new_version) === -1) {
[actions.getVersionFailure]: state => ({ ...state, processingVersion: false }), [actions.getVersionSuccess]: (state, { payload }) => { const currentVersion = state.dnsVersion === 'undefined' ? 0 : state.dnsVersion; if (payload && versionCompare(currentVersion, payload.new_version) === -1) { const { version, announcement_url: announcementUrl, new_version: newVersion, can_autoupdate: canAutoUpdate,
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
- client: fix versions check
https://github.com/AdguardTeam/AdGuardHome/commit/1f164c70059a8f2f8d6e33b805243dbcd6ce4702
client/src/reducers/index.js
const currentVersion = state.dnsVersion === 'undefined' ? 0 : state.dnsVersion; if (payload && versionCompare(currentVersion, payload.version) === -1) { const { version, announcement_url: announcementUrl, new_version: newVersion, can_autoupdate: canAutoUpdate, } = payload;
</s> remove version, </s> add </s> remove if (payload && versionCompare(currentVersion, payload.version) === -1) { </s> add if (payload && versionCompare(currentVersion, payload.new_version) === -1) {
const currentVersion = state.dnsVersion === 'undefined' ? 0 : state.dnsVersion; if (payload && versionCompare(currentVersion, payload.version) === -1) { const { announcement_url: announcementUrl, new_version: newVersion, can_autoupdate: canAutoUpdate, } = payload;
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
- client: fix versions check
https://github.com/AdguardTeam/AdGuardHome/commit/1f164c70059a8f2f8d6e33b805243dbcd6ce4702
client/src/reducers/index.js
} = payload; const newState = { ...state, version, announcementUrl, newVersion, canAutoUpdate, isUpdateAvailable: true, };
</s> remove if (payload && versionCompare(currentVersion, payload.version) === -1) { </s> add if (payload && versionCompare(currentVersion, payload.new_version) === -1) { </s> remove version, </s> add
} = payload; const newState = { ...state, announcementUrl, newVersion, canAutoUpdate, isUpdateAvailable: true, };
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
- client: fix versions check
https://github.com/AdguardTeam/AdGuardHome/commit/1f164c70059a8f2f8d6e33b805243dbcd6ce4702
client/src/reducers/index.js
log.Fatal(err) } // override bind host/port from the console if args.bindHost != "" { config.BindHost = args.bindHost } if args.bindPort != 0 {
</s> remove BindHost string `yaml:"bind_host"` // BindHost is the IP address of the HTTP server to bind to BindPort int `yaml:"bind_port"` // BindPort is the port the HTTP server AuthName string `yaml:"auth_name"` // AuthName is the basic auth username AuthPass string `yaml:"auth_pass"` // AuthPass is the basic auth password Language string `yaml:"language"` // two-letter ISO 639-1 language code </s> add BindHost string `yaml:"bind_host"` // BindHost is the IP address of the HTTP server to bind to BindPort int `yaml:"bind_port"` // BindPort is the port the HTTP server AuthName string `yaml:"auth_name"` // AuthName is the basic auth username AuthPass string `yaml:"auth_pass"` // AuthPass is the basic auth password Language string `yaml:"language"` // two-letter ISO 639-1 language code RlimitNoFile uint `yaml:"rlimit_nofile"` // Maximum number of opened fd's per process (0: default)
if (runtime.GOOS == "linux" || runtime.GOOS == "darwin") && config.RlimitNoFile != 0 { setRlimit(config.RlimitNoFile) }
log.Fatal(err) } if (runtime.GOOS == "linux" || runtime.GOOS == "darwin") && config.RlimitNoFile != 0 { setRlimit(config.RlimitNoFile) } // override bind host/port from the console if args.bindHost != "" { config.BindHost = args.bindHost } if args.bindPort != 0 {
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
+ config: add "rlimit_nofile" setting - Maximum number of opened fd's per process
https://github.com/AdguardTeam/AdGuardHome/commit/1f1e26f67b00ee4983c65e4e3aabf59a488f687b
app.go
} } func cleanup() { log.Info("Stopping AdGuard Home") err := stopDNSServer() if err != nil { log.Error("Couldn't stop DNS server: %s", err)
</s> remove BindHost string `yaml:"bind_host"` // BindHost is the IP address of the HTTP server to bind to BindPort int `yaml:"bind_port"` // BindPort is the port the HTTP server AuthName string `yaml:"auth_name"` // AuthName is the basic auth username AuthPass string `yaml:"auth_pass"` // AuthPass is the basic auth password Language string `yaml:"language"` // two-letter ISO 639-1 language code </s> add BindHost string `yaml:"bind_host"` // BindHost is the IP address of the HTTP server to bind to BindPort int `yaml:"bind_port"` // BindPort is the port the HTTP server AuthName string `yaml:"auth_name"` // AuthName is the basic auth username AuthPass string `yaml:"auth_pass"` // AuthPass is the basic auth password Language string `yaml:"language"` // two-letter ISO 639-1 language code RlimitNoFile uint `yaml:"rlimit_nofile"` // Maximum number of opened fd's per process (0: default)
// Set user-specified limit of how many fd's we can use // https://github.com/AdguardTeam/AdGuardHome/issues/659 func setRlimit(val uint) { var rlim syscall.Rlimit rlim.Max = uint64(val) rlim.Cur = uint64(val) err := syscall.Setrlimit(syscall.RLIMIT_NOFILE, &rlim) if err != nil { log.Error("Setrlimit() failed: %v", err) } }
} } // Set user-specified limit of how many fd's we can use // https://github.com/AdguardTeam/AdGuardHome/issues/659 func setRlimit(val uint) { var rlim syscall.Rlimit rlim.Max = uint64(val) rlim.Cur = uint64(val) err := syscall.Setrlimit(syscall.RLIMIT_NOFILE, &rlim) if err != nil { log.Error("Setrlimit() failed: %v", err) } } func cleanup() { log.Info("Stopping AdGuard Home") err := stopDNSServer() if err != nil { log.Error("Couldn't stop DNS server: %s", err)
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
+ config: add "rlimit_nofile" setting - Maximum number of opened fd's per process
https://github.com/AdguardTeam/AdGuardHome/commit/1f1e26f67b00ee4983c65e4e3aabf59a488f687b
app.go
ourConfigFilename string // Config filename (can be overridden via the command line arguments) ourWorkingDir string // Location of our directory, used to protect against CWD being somewhere else firstRun bool // if set to true, don't run any services except HTTP web inteface, and serve only first-run html BindHost string `yaml:"bind_host"` // BindHost is the IP address of the HTTP server to bind to BindPort int `yaml:"bind_port"` // BindPort is the port the HTTP server AuthName string `yaml:"auth_name"` // AuthName is the basic auth username AuthPass string `yaml:"auth_pass"` // AuthPass is the basic auth password Language string `yaml:"language"` // two-letter ISO 639-1 language code DNS dnsConfig `yaml:"dns"` TLS tlsConfig `yaml:"tls"` Filters []filter `yaml:"filters"` UserRules []string `yaml:"user_rules"` DHCP dhcpd.ServerConfig `yaml:"dhcp"`
</s>
BindHost string `yaml:"bind_host"` // BindHost is the IP address of the HTTP server to bind to BindPort int `yaml:"bind_port"` // BindPort is the port the HTTP server AuthName string `yaml:"auth_name"` // AuthName is the basic auth username AuthPass string `yaml:"auth_pass"` // AuthPass is the basic auth password Language string `yaml:"language"` // two-letter ISO 639-1 language code RlimitNoFile uint `yaml:"rlimit_nofile"` // Maximum number of opened fd's per process (0: default)
ourConfigFilename string // Config filename (can be overridden via the command line arguments) ourWorkingDir string // Location of our directory, used to protect against CWD being somewhere else firstRun bool // if set to true, don't run any services except HTTP web inteface, and serve only first-run html BindHost string `yaml:"bind_host"` // BindHost is the IP address of the HTTP server to bind to BindPort int `yaml:"bind_port"` // BindPort is the port the HTTP server AuthName string `yaml:"auth_name"` // AuthName is the basic auth username AuthPass string `yaml:"auth_pass"` // AuthPass is the basic auth password Language string `yaml:"language"` // two-letter ISO 639-1 language code RlimitNoFile uint `yaml:"rlimit_nofile"` // Maximum number of opened fd's per process (0: default) BindHost string `yaml:"bind_host"` // BindHost is the IP address of the HTTP server to bind to BindPort int `yaml:"bind_port"` // BindPort is the port the HTTP server AuthName string `yaml:"auth_name"` // AuthName is the basic auth username AuthPass string `yaml:"auth_pass"` // AuthPass is the basic auth password Language string `yaml:"language"` // two-letter ISO 639-1 language code RlimitNoFile uint `yaml:"rlimit_nofile"` // Maximum number of opened fd's per process (0: default) BindHost string `yaml:"bind_host"` // BindHost is the IP address of the HTTP server to bind to BindPort int `yaml:"bind_port"` // BindPort is the port the HTTP server AuthName string `yaml:"auth_name"` // AuthName is the basic auth username AuthPass string `yaml:"auth_pass"` // AuthPass is the basic auth password Language string `yaml:"language"` // two-letter ISO 639-1 language code RlimitNoFile uint `yaml:"rlimit_nofile"` // Maximum number of opened fd's per process (0: default) BindHost string `yaml:"bind_host"` // BindHost is the IP address of the HTTP server to bind to BindPort int `yaml:"bind_port"` // BindPort is the port the HTTP server AuthName string `yaml:"auth_name"` // AuthName is the basic auth username AuthPass string `yaml:"auth_pass"` // AuthPass is the basic auth password Language string `yaml:"language"` // two-letter ISO 639-1 language code RlimitNoFile uint `yaml:"rlimit_nofile"` // Maximum number of opened fd's per process (0: default) BindHost string `yaml:"bind_host"` // BindHost is the IP address of the HTTP server to bind to BindPort int `yaml:"bind_port"` // BindPort is the port the HTTP server AuthName string `yaml:"auth_name"` // AuthName is the basic auth username AuthPass string `yaml:"auth_pass"` // AuthPass is the basic auth password Language string `yaml:"language"` // two-letter ISO 639-1 language code RlimitNoFile uint `yaml:"rlimit_nofile"` // Maximum number of opened fd's per process (0: default) DNS dnsConfig `yaml:"dns"` TLS tlsConfig `yaml:"tls"` Filters []filter `yaml:"filters"` UserRules []string `yaml:"user_rules"` DHCP dhcpd.ServerConfig `yaml:"dhcp"`
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
+ config: add "rlimit_nofile" setting - Maximum number of opened fd's per process
https://github.com/AdguardTeam/AdGuardHome/commit/1f1e26f67b00ee4983c65e4e3aabf59a488f687b
config.go