Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions transport/internet/tls/ech.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func ApplyECH(c *Config, config *tls.Config) error {
defer func() {
// if failed to get ECHConfig, use an invalid one to make connection fail
if err != nil {
if c.EchForceQuery {
if c.EchForceQuery || errors.Cause(err) != dns2.ErrEmptyResponse {
ECHConfig = []byte{1, 1, 4, 5, 1, 4}
}
}
Expand Down Expand Up @@ -129,7 +129,7 @@ func (c *ECHConfigCache) Update(domain string, server string, isLockedUpdate boo
errors.LogDebug(context.Background(), "Trying to query ECH config for domain: ", domain, " with ECH server: ", server)
echConfig, ttl, err := dnsQuery(server, domain, sockopt)
if err != nil {
if forceQuery || ttl == 0 {
if forceQuery || errors.Cause(err) != dns2.ErrEmptyResponse {
return nil, err
}
}
Expand Down
Loading