Skip to content

Commit

Permalink
all: upd dnsproxy
Browse files Browse the repository at this point in the history
  • Loading branch information
Mizzick committed Jan 15, 2024
1 parent b1670e8 commit 1daba83
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion go.mod
Expand Up @@ -3,7 +3,7 @@ module github.com/AdguardTeam/AdGuardHome
go 1.20

require (
github.com/AdguardTeam/dnsproxy v0.61.2-0.20240110124936-129935dbd2ef
github.com/AdguardTeam/dnsproxy v0.61.2-0.20240115090220-1b3dde756306
github.com/AdguardTeam/golibs v0.18.3-0.20240111124113-a7af1f1a1d62
github.com/AdguardTeam/urlfilter v0.17.3
github.com/NYTimes/gziphandler v1.1.1
Expand Down
4 changes: 2 additions & 2 deletions go.sum
@@ -1,5 +1,5 @@
github.com/AdguardTeam/dnsproxy v0.61.2-0.20240110124936-129935dbd2ef h1:NxFCH8JE+U1t1BNNydrY/i69pkY+BtUsgGUrlyP2vBE=
github.com/AdguardTeam/dnsproxy v0.61.2-0.20240110124936-129935dbd2ef/go.mod h1:qnR7RtTnHLgWab7A/T6U9N0mfczAWUnwK00jCqJIWIU=
github.com/AdguardTeam/dnsproxy v0.61.2-0.20240115090220-1b3dde756306 h1:tSbcW3bcSzJxl2PqEjthCZMRNJX2th2+9tPmtXg2efA=
github.com/AdguardTeam/dnsproxy v0.61.2-0.20240115090220-1b3dde756306/go.mod h1:qnR7RtTnHLgWab7A/T6U9N0mfczAWUnwK00jCqJIWIU=
github.com/AdguardTeam/golibs v0.18.3-0.20240111124113-a7af1f1a1d62 h1:M+oQ8gv8xskrSgCOUDo4NbpwaMsL/c7h6PIMcVUIhjw=
github.com/AdguardTeam/golibs v0.18.3-0.20240111124113-a7af1f1a1d62/go.mod h1:3WunclLLfrVAq7fYQRhd6f168FHOEMssnipVXCxDL/w=
github.com/AdguardTeam/urlfilter v0.17.3 h1:fg/ObbnO0Cv6aw0tW6N/ETDMhhNvmcUUOZ7HlmKC3rw=
Expand Down
4 changes: 3 additions & 1 deletion internal/dnsforward/config.go
Expand Up @@ -302,14 +302,16 @@ const (
// newProxyConfig creates and validates configuration for the main proxy.
func (s *Server) newProxyConfig() (conf *proxy.Config, err error) {
srvConf := s.conf
trustedPrefixes := netutil.UnembedPrefixes(srvConf.TrustedProxies)

conf = &proxy.Config{
HTTP3: srvConf.ServeHTTP3,
Ratelimit: int(srvConf.Ratelimit),
RatelimitSubnetLenIPv4: srvConf.RatelimitSubnetLenIPv4,
RatelimitSubnetLenIPv6: srvConf.RatelimitSubnetLenIPv6,
RatelimitWhitelist: srvConf.RatelimitWhitelist,
RefuseAny: srvConf.RefuseAny,
TrustedProxies: netutil.UnembedPrefixes(srvConf.TrustedProxies),
TrustedProxies: netutil.SliceSubnetSet(trustedPrefixes),
CacheMinTTL: srvConf.CacheMinTTL,
CacheMaxTTL: srvConf.CacheMaxTTL,
CacheOptimistic: srvConf.CacheOptimistic,
Expand Down

0 comments on commit 1daba83

Please sign in to comment.