0
mirror of https://github.com/XTLS/Xray-core.git synced 2025-06-20 06:58:38 +03:00

Refine DNS strategies

This commit is contained in:
JimhHan
2021-04-09 23:36:36 +08:00
parent f4a048aa0c
commit 726a722019
21 changed files with 255 additions and 208 deletions

View File

@ -23,7 +23,7 @@ func TestDOHNameServer(t *testing.T) {
ips, err := s.QueryIP(ctx, "google.com", net.IP(nil), dns_feature.IPOption{
IPv4Enable: true,
IPv6Enable: true,
}, false)
}, CacheStrategy_Cache_ALL)
cancel()
common.Must(err)
if len(ips) == 0 {
@ -40,7 +40,7 @@ func TestDOHNameServerWithCache(t *testing.T) {
ips, err := s.QueryIP(ctx, "google.com", net.IP(nil), dns_feature.IPOption{
IPv4Enable: true,
IPv6Enable: true,
}, false)
}, CacheStrategy_Cache_ALL)
cancel()
common.Must(err)
if len(ips) == 0 {
@ -51,7 +51,7 @@ func TestDOHNameServerWithCache(t *testing.T) {
ips2, err := s.QueryIP(ctx2, "google.com", net.IP(nil), dns_feature.IPOption{
IPv4Enable: true,
IPv6Enable: true,
}, true)
}, CacheStrategy_Cache_ALL)
cancel()
common.Must(err)
if r := cmp.Diff(ips2, ips); r != "" {