darling icon indicating copy to clipboard operation
darling copied to clipboard

curl hangs due to DNS resolution

Open thecodrr opened this issue 3 years ago • 1 comments

Expected Result curl https://google.com/ should output valid HTML. curl 1.1.1.1 works as expected though so I am pretty sure it's a DNS resolution issue. The thing is I can't even edit /etc/resolve.conf (I get permission denied error).

Actual Result curl https://google.com/ hangs.

Steps To Reproduce

  1. darling shell
  2. curl https://google.com/

System Information

Software Version
Linux Kernel 5.15.0-41-generic
Darling b75c25e2c192d005dec3f0613acc33b500d08172

thecodrr avatar Sep 25 '22 11:09 thecodrr

Running darling as root allowed me to edit /etc/resolve.conf. As soon as I put the host system's resolve.conf curl started to work. Which is great but I still haven't found a way to edit /etc/resolve.conf as sudo nano /etc/resolve.conf

thecodrr avatar Sep 25 '22 12:09 thecodrr

I also had this issue, and your solution worked

CKegel avatar Apr 08 '23 04:04 CKegel

sudo is unnecessary, you can symlink the file in Linux host directly:

mkdir -p ~/.darling/private/etc
ln -s /Volumes/SystemRoot/etc/resolv.conf ~/.darling/private/etc/
darling shutdown
darling shell

Ideally, darling should take care of resolve.conf when creating prefix.

ZeppLu avatar Aug 01 '23 17:08 ZeppLu

See #981 for the proposed solution to this (we should just use the host's resolver). For now though, as @ZeppLu discovered, you can edit ${DPREFIX}/private/etc/resolv.conf (where ${DPREFIX} is usually ~/.darling) outside of Darling to set your desired settings.

facekapow avatar Oct 17 '23 03:10 facekapow