shadowsocks-android icon indicating copy to clipboard operation
shadowsocks-android copied to clipboard

No Internet Access: Unable to resolve host "cp.cloudflare.com"

Open randef1ned opened this issue 6 years ago • 57 comments

Describe the bug When I test the connection, I get "No Internet access. Unable to resolve host 'cp.cloudflare.com', No address associated with hostname". It errors most of the time, but my laptop and my iPad works normally. DNS server works properly. The server works well. Settings are all correct. No block. Several other WiFi networks are tried, but it stills. Network settings are cleared.

To Reproduce Steps to reproduce the behavior:

  1. Connect to Shadowsocks server
  2. Test the connection
  3. Failed and reported error

Expected behavior A clear and concise description of what you expected to happen. Connect to Shadowsocks server

Screenshots If applicable, add screenshots to help explain your problem. image

Smartphone (please complete the following information):

  • Device: iQOO z1x
  • Version: Android 10.0; Shadowsocks 5.1.4 & 5.0.6 from play store
  • Last version that did not exhibit the issue: No

Configuration Put an x inside the [ ] that applies.

  • [x] IPv4 server address
  • [ ] IPv6 server address
  • [x] Client IPv4 availability
  • [ ] Client IPv6 availability
  • Encrypt method: chacha20-ietf-poly1305
  • Route
    • [ ] All
    • [ ] Bypass LAN
    • [ ] Bypass China
    • [x] Bypass LAN & China
    • [ ] GFW List
    • [ ] China List
    • [ ] Custom rules
  • [x] IPv6 route
  • [ ] Apps VPN mode
    • [ ] Bypass mode
  • Remote DNS: 8.8.8.8
  • [ ] DNS over UDP
  • Plugin configuration (if applicable):
  • [ ] Auto Connect
  • [ ] TCP Fast Open
  • If you're not using VPN mode, please supply more details here:

Additional context It reproduces on my two vivo phone but fails to reproduce on my xiaomi phone. My xiaomi 6 (Android 9.0) works pretty well.

randef1ned avatar Nov 27 '20 16:11 randef1ned

In addition, none of the route works in my vivo phones.

randef1ned avatar Nov 27 '20 16:11 randef1ned

I met the same error.

Celthi avatar Nov 30 '20 09:11 Celthi

A simple way to reproduce: Run server on Windows 10 : gost.exe -L=ss://aes-256-cfb:test1234@:8388 Download binary here: https://github.com/ginuerzh/gost/releases/tag/v2.11.1

Run android and configure the same(change only host,port,password, all other keeps default) , do test. You will see "Unable to resolve host "cp.cloudflare.com".

It works before and v5.0.6, failed on all new versions.

xygwfxu avatar Dec 02 '20 05:12 xygwfxu

  1. It looks a VIVO specific issue to me.
  2. Check the private DNS settings on your phone. Make sure it's disabled.

madeye avatar Dec 02 '20 06:12 madeye

  1. It looks a VIVO specific issue to me.
  2. Check the private DNS settings on your phone. Make sure it's disabled.

I'm using Xiaomi phone. So it should not be VIVO specific issues.

Celthi avatar Dec 02 '20 10:12 Celthi

I Tried all new versions on xiaomi6x and xiaomi10, all of them do not work. any other info can offer to help reproduce?

xygwfxu avatar Dec 02 '20 15:12 xygwfxu

某些运营商会对个别域名直接返回127.0.0.1,不再是返回国外的ip了。希望对分析问题有帮助。

dev4u avatar Dec 02 '20 16:12 dev4u

@dev4u 终端下解析这个cp.cloudflare.com域名没有问题, 是特指的某些还是个别的域名嘛?

xygwfxu avatar Dec 03 '20 01:12 xygwfxu

@dev4u 终端下解析这个cp.cloudflare.com域名没有问题, 是特指的某些还是个别的域名嘛?

先确认关闭了私人dns设置!!!

因为这个仅仅是我单次的观察结果,说不上[某些]还是[个别],仅供参考。当时请求google的页面发生异常,抓包发现返回的地址是127的。 切换用gfw模式路由能正常访问,用国内外ip模式访问异常。 如果使用gfw模式,需自行改写工程的acl文件更新类,并且使用自己维护的,或者第三方维护的acl。否则有部分站点没办法访问!!

dev4u avatar Dec 03 '20 02:12 dev4u

@dev4u 不好意思, 才知道有“私人dns”设置这个选项, 刚才查看并确认默认是关闭的。

xygwfxu avatar Dec 03 '20 06:12 xygwfxu

@madeye “private DNS” is disabled by default. This may explain that why v5.0.6 works on same phone instead of v5.1.x.

Since the error is related to DNS (test is to "cp.cloudflare.com", however all DNS from Browser are not working as well while in VPN mode).

What could be reason that dns is failed for new version?

xygwfxu avatar Dec 03 '20 08:12 xygwfxu

@lavi-xu I suggest reporting your problem to Xiaomi instead. We cannot reproduce it with any Pixel/AOSP device (even on a Huawei device).

madeye avatar Dec 03 '20 08:12 madeye

@madeye It could be more hard to explain such issue to a OS level corp, that for an 3rd app that works one version but failed for another version, which OS level functional API is involved it, right?

Let me try to UNDERSTAND how ss does DNS function when VPN is ON.

Thanks for such great sw made to www.

xygwfxu avatar Dec 03 '20 13:12 xygwfxu

服务器端我用gost-linux-amd64-2.10.1可以,用2.11.1就出这个错误.

wxdczd avatar Dec 03 '20 13:12 wxdczd

新版本的dns必须是tcp的

dev4u avatar Dec 03 '20 14:12 dev4u

@dev4u @madeye I noticed that new version has changed udp option from -u to -U(upper case), is this the root cause that prevent dns working please ?

xygwfxu avatar Dec 03 '20 22:12 xygwfxu

@wxdczd 谢谢提醒,我来试一下这个版本的serve版本。

xygwfxu avatar Dec 03 '20 22:12 xygwfxu

@wxdczd 试过2.10 也不可以, 因为协议改了。

@dev4u 您说的是对的, 新版改tcp 协议了, 抓包发现全是rst在53口上。

xygwfxu avatar Dec 04 '20 02:12 xygwfxu

Make sure the remote DNS in your profile support TCP queries.

madeye avatar Dec 04 '20 02:12 madeye

DNS over UDP 是不是可以把反馈表单的这项选择,直接改成[请确认DNS请求是通过tcp来发送]这样的描述? @madeye

dev4u avatar Dec 04 '20 02:12 dev4u