Skip to content

Commit 34f0caa

Browse files
committed
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)
2 parents 75e917a + 8fc0ffc commit 34f0caa

6 files changed

Lines changed: 10 additions & 8 deletions

File tree

.github/workflows/releases.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
2929

3030
- name: Set up Go
31-
uses: actions/setup-go@v2.1.3
31+
uses: actions/setup-go@v2.1.4
3232
with:
3333
go-version: 1
3434
id: go

dnscrypt-proxy/config.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ type Config struct {
3636
DisabledServerNames []string `toml:"disabled_server_names"`
3737
ListenAddresses []string `toml:"listen_addresses"`
3838
LocalDoH LocalDoHConfig `toml:"local_doh"`
39-
Daemonize bool
4039
UserName string `toml:"user_name"`
4140
ForceTCP bool `toml:"force_tcp"`
4241
Timeout int `toml:"timeout"`
@@ -467,7 +466,6 @@ func ConfigLoad(proxy *Proxy, flags *ConfigFlags) error {
467466
proxy.localDoHPath = config.LocalDoH.Path
468467
proxy.localDoHCertFile = config.LocalDoH.CertFile
469468
proxy.localDoHCertKeyFile = config.LocalDoH.CertKeyFile
470-
proxy.daemonize = config.Daemonize
471469
proxy.pluginBlockIPv6 = config.BlockIPv6
472470
proxy.pluginBlockUnqualified = config.BlockUnqualified
473471
proxy.pluginBlockUndelegated = config.BlockUndelegated

dnscrypt-proxy/example-dnscrypt-proxy.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ cert_refresh_delay = 240
214214
## Bootstrap resolvers
215215
##
216216
## These are normal, non-encrypted DNS resolvers, that will be only used
217-
## for one-shot queries when retrieving the initial resolvers list and the
217+
## for one-shot queries when retrieving the initial resolvers list and if
218218
## the system DNS configuration doesn't work.
219219
##
220220
## No user queries will ever be leaked through these resolvers, and they will

dnscrypt-proxy/proxy.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ type Proxy struct {
9393
anonDirectCertFallback bool
9494
pluginBlockUndelegated bool
9595
child bool
96-
daemonize bool
9796
requiredProps stamps.ServerInformalProperties
9897
ServerNames []string
9998
DisabledServerNames []string

dnscrypt-proxy/serversInfo.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,8 @@ func route(proxy *Proxy, name string, serverProto stamps.StampProtoType) (*Relay
482482
if len(relayCandidateStamp.ServerAddrStr) > 0 {
483483
ipOnly, _ := ExtractHostAndPort(relayCandidateStamp.ServerAddrStr, -1)
484484
if ip := ParseIP(ipOnly); ip != nil {
485-
proxy.xTransport.saveCachedIP(relayCandidateStamp.ProviderName, ip, -1*time.Second)
485+
host, _ := ExtractHostAndPort(relayCandidateStamp.ProviderName, -1)
486+
proxy.xTransport.saveCachedIP(host, ip, -1*time.Second)
486487
}
487488
}
488489
dlog.Noticef("Anonymizing queries for [%v] via [%v]", name, relayName)
@@ -607,7 +608,8 @@ func fetchDoHServerInfo(proxy *Proxy, name string, stamp stamps.ServerStamp, isN
607608
if len(stamp.ServerAddrStr) > 0 {
608609
ipOnly, _ := ExtractHostAndPort(stamp.ServerAddrStr, -1)
609610
if ip := ParseIP(ipOnly); ip != nil {
610-
proxy.xTransport.saveCachedIP(stamp.ProviderName, ip, -1*time.Second)
611+
host, _ := ExtractHostAndPort(stamp.ProviderName, -1)
612+
proxy.xTransport.saveCachedIP(host, ip, -1*time.Second)
611613
}
612614
}
613615
url := &url.URL{

dnscrypt-proxy/xtransport.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,10 @@ func (xTransport *XTransport) rebuildTransport() {
203203
}
204204
}
205205
transport.TLSClientConfig = &tlsClientConfig
206-
http2.ConfigureTransport(transport)
206+
if http2Transport, err := http2.ConfigureTransports(transport); err != nil {
207+
http2Transport.ReadIdleTimeout = timeout
208+
http2Transport.AllowHTTP = false
209+
}
207210
xTransport.transport = transport
208211
}
209212

0 commit comments

Comments
 (0)