darling
darling copied to clipboard
curl hangs due to DNS resolution
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
darling shellcurl https://google.com/
System Information
| Software | Version |
|---|---|
| Linux Kernel | 5.15.0-41-generic |
| Darling | b75c25e2c192d005dec3f0613acc33b500d08172 |
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
I also had this issue, and your solution worked
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.
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.