proot-distro icon indicating copy to clipboard operation
proot-distro copied to clipboard

[Bug]: Can't connect cloudflare DNS in China

Open 2096779623 opened this issue 2 years ago • 2 comments

Problem description


.../usr/bin $ proot-distro login alpine
localhost:~# ping www.baidu.com
ping: bad address 'www.baidu.com'
localhost:~# apt update
Ability to run this command as root has been disabled permanently for safety purposes.
localhost:~# apk update
fetch http://dl-cdn.alpinelinux.org/alpine/edge/main/aarch64/APKINDEX.tar.gz
ERROR: http://dl-cdn.alpinelinux.org/alpine/edge/main: temporary error (try again later)
WARNING: Ignoring http://dl-cdn.alpinelinux.org/alpine/edge/main: No such file or directory
fetch http://dl-cdn.alpinelinux.org/alpine/edge/community/aarch64/APKINDEX.tar.gz
ERROR: http://dl-cdn.alpinelinux.org/alpine/edge/community: temporary error (try again later)
WARNING: Ignoring http://dl-cdn.alpinelinux.org/alpine/edge/community: No such file or directory
2 errors; 14 distinct packages available

Change DNS to Google(8.8.8.8) or let users choose dns.

What steps will reproduce the bug?

  1. In China

What is the expected behavior?

No response

2096779623 avatar Aug 06 '22 05:08 2096779623

First, your can change your repository of alpine (the available alpine repository in china,

Sec maybe the repo empty, try https://mirrors.tuna.tsinghua.edu.cn/alpine/edge/

  1. Edit /etc/apk/repositories

  2. Remove the old repo (dl-cdn..../edge) and replace to the repo i told at up

  3. Try again

zairullahdev avatar Aug 06 '22 05:08 zairullahdev

First, your can change your repository of alpine (the available alpine repository in china,

Sec maybe the repo empty, try https://mirrors.tuna.tsinghua.edu.cn/alpine/edge/

  1. Edit /etc/apk/repositories
  2. Remove the old repo (dl-cdn..../edge) and replace to the repo i told at up
  3. Try again

You should see that I pinged Baidu just now, Baidu is the largest search engine in China, so it is impossible for the ping to time out, so it is useless to replace the mirror.

The official alpine mirror can be connected in China, and there should be no dns parsing problems.

2096779623 avatar Aug 06 '22 06:08 2096779623

China has been actively blocking DNS servers not located in China since forever, and the default Cloudflare DNS is among those blocked.

I don't think we have better ways other than manually editing /etc/resolv.conf, unless there is somehow a way to forward this to the Android resolver/local network resolver?

kmod-midori avatar Aug 22 '22 01:08 kmod-midori

Done in v3.2.0.

sylirre avatar Oct 10 '22 21:10 sylirre