Merge branch 'master' of github.com:jedisct1/dnscrypt-proxy

* 'master' of github.com:jedisct1/dnscrypt-proxy:
  Enable HTTP/2 pings
  Remove leftovers from the daemonize option
  DoH/ODoH: strip optional port number when caching a hostname
  Bump actions/setup-go from 2.1.3 to 2.1.4 (#1843)
  fix minor typo in example config (#1847)
This commit is contained in:
Frank Denis 2021-09-23 18:38:50 +02:00
commit 34f0caaa34
6 changed files with 10 additions and 8 deletions

View File

@ -28,7 +28,7 @@ jobs:
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
- name: Set up Go
uses: actions/setup-go@v2.1.3
uses: actions/setup-go@v2.1.4
with:
go-version: 1
id: go

View File

@ -36,7 +36,6 @@ type Config struct {
DisabledServerNames []string `toml:"disabled_server_names"`
ListenAddresses []string `toml:"listen_addresses"`
LocalDoH LocalDoHConfig `toml:"local_doh"`
Daemonize bool
UserName string `toml:"user_name"`
ForceTCP bool `toml:"force_tcp"`
Timeout int `toml:"timeout"`
@ -467,7 +466,6 @@ func ConfigLoad(proxy *Proxy, flags *ConfigFlags) error {
proxy.localDoHPath = config.LocalDoH.Path
proxy.localDoHCertFile = config.LocalDoH.CertFile
proxy.localDoHCertKeyFile = config.LocalDoH.CertKeyFile
proxy.daemonize = config.Daemonize
proxy.pluginBlockIPv6 = config.BlockIPv6
proxy.pluginBlockUnqualified = config.BlockUnqualified
proxy.pluginBlockUndelegated = config.BlockUndelegated

View File

@ -214,7 +214,7 @@ cert_refresh_delay = 240
## Bootstrap resolvers
##
## These are normal, non-encrypted DNS resolvers, that will be only used
## for one-shot queries when retrieving the initial resolvers list and the
## for one-shot queries when retrieving the initial resolvers list and if
## the system DNS configuration doesn't work.
##
## No user queries will ever be leaked through these resolvers, and they will

View File

@ -93,7 +93,6 @@ type Proxy struct {
anonDirectCertFallback bool
pluginBlockUndelegated bool
child bool
daemonize bool
requiredProps stamps.ServerInformalProperties
ServerNames []string
DisabledServerNames []string

View File

@ -482,7 +482,8 @@ func route(proxy *Proxy, name string, serverProto stamps.StampProtoType) (*Relay
if len(relayCandidateStamp.ServerAddrStr) > 0 {
ipOnly, _ := ExtractHostAndPort(relayCandidateStamp.ServerAddrStr, -1)
if ip := ParseIP(ipOnly); ip != nil {
proxy.xTransport.saveCachedIP(relayCandidateStamp.ProviderName, ip, -1*time.Second)
host, _ := ExtractHostAndPort(relayCandidateStamp.ProviderName, -1)
proxy.xTransport.saveCachedIP(host, ip, -1*time.Second)
}
}
dlog.Noticef("Anonymizing queries for [%v] via [%v]", name, relayName)
@ -607,7 +608,8 @@ func fetchDoHServerInfo(proxy *Proxy, name string, stamp stamps.ServerStamp, isN
if len(stamp.ServerAddrStr) > 0 {
ipOnly, _ := ExtractHostAndPort(stamp.ServerAddrStr, -1)
if ip := ParseIP(ipOnly); ip != nil {
proxy.xTransport.saveCachedIP(stamp.ProviderName, ip, -1*time.Second)
host, _ := ExtractHostAndPort(stamp.ProviderName, -1)
proxy.xTransport.saveCachedIP(host, ip, -1*time.Second)
}
}
url := &url.URL{

View File

@ -203,7 +203,10 @@ func (xTransport *XTransport) rebuildTransport() {
}
}
transport.TLSClientConfig = &tlsClientConfig
http2.ConfigureTransport(transport)
if http2Transport, err := http2.ConfigureTransports(transport); err != nil {
http2Transport.ReadIdleTimeout = timeout
http2Transport.AllowHTTP = false
}
xTransport.transport = transport
}