shawn1m / overture

A customized DNS relay server
MIT License
1.8k stars 284 forks source link

使用overture无法打开steam程序 #53

Closed ghost closed 7 years ago

ghost commented 7 years ago

最近steam主程序总是无法打开,无法加载主页,显示网络错误。 从overture更换为别的dns(如114或dnspod)后就正常了。 不知道是什么原因。 用overture dig steam的地址返回的是正常值

cjjdaq commented 7 years ago

目测dig测试overture不准确,dig www.baidu.com 毫秒级解析,curl www.baidu.com却要两三秒。

shawn1m commented 7 years ago

Steam 一般都是由 AlternativeDNS 解析,可能会有解析失败的情况。可以把相关的配置和 -v 下的 log 提供一下就清楚了。 另外,AlternativeDNS 提供的解析结果国内连接状况不一定理想,策略上可以把 Steam 用的 CDN 和 它的 IP 段放进 IPNetworkFile 里面,让 overture 保留 PrimaryDNS 的解析结果。

ghost commented 7 years ago

@shawn1m 好的

config.json

{
  "BindAddress": ":53",
  "PrimaryDNS": [
    {
      "Name": "114",
      "Address": "114.114.115.115:53",
      "Protocol": "udp",
      "Timeout": 6
    },
    {
      "Name": "Ali",
      "Address": "223.6.6.6:53",
      "Protocol": "udp",
      "Timeout": 6
    }
  ],
  "AlternativeDNS": [
    {
      "Name": "Abc",
      "Address": "127.0.0.1:1053",
      "Protocol": "tcp",
      "Timeout": 5
    }
  ],
  "OnlyPrimaryDNS": false,
  "RedirectIPv6Record": true,
  "IPNetworkFile": ".../overture/china_ip_list.txt",
  "DomainFile": ".../overture/gfwlist.txt",
  "DomainBase64Decode": true,
  "HostsFile": ".../overture/hosts",
  "MinimumTTL": 0,
  "CacheSize" : 0,
  "RejectQtype": [255]
}

log https://gist.github.com/haodong/fe84f36917643e256d73fffc7568168a

shawn1m commented 7 years ago

那应该不存在解析问题,应该就是 PrimaryDNS 也返回了国外的地址,例如 store.steampowered.com 返回的是东京的,但是 overture 只保留国内的,所以取的是 abc 的美国地址。 可以找一找相关 IP 段加入 IPNetwokFile,或者找到最合适的 IP 加 Hosts。

ghost commented 7 years ago

@shawn1m 没明白应该怎么操作:(

我试着切换了几个DNS,解析出来的IP都是美国的。本来我还想G胖他可能在国内有CDN,去host里改一下就好了……

shawn1m commented 7 years ago

例如:

time="2017-06-09T19:52:24+08:00" level=debug msg="114 Answer: store.steampowered.com.   35      IN      A       184.26.114.232"
time="2017-06-09T19:52:24+08:00" level=debug msg="Try to match response ip address with IP network"
time="2017-06-09T19:52:24+08:00" level=debug msg="IP network match fail, finally use alternative DNS"
time="2017-06-09T19:52:24+08:00" level=debug msg="Ali Answer: store.steampowered.com.   15      IN      A       23.42.212.209"
time="2017-06-09T19:52:24+08:00" level=debug msg="Ali Answer: store.steampowered.com.   15      IN      A       23.42.212.209"
time="2017-06-09T19:52:24+08:00" level=debug msg="Finally use alternative DNS"
time="2017-06-09T19:52:24+08:00" level=debug msg="Abc Answer: store.steampowered.com.   19      IN      A       104.85.6.86"

同一个域名三种解析结果,前两个是日本的,后两个是美国的。 如果你觉得前两种好一点,那么你根据前面 log 的结果,找到一批 steam 要用的域名,然后把他们 114 或者 ali 的解析结果加 hosts 就 ok 了。

ghost commented 7 years ago

好 谢谢!