nix-community / nix-on-droid

Nix-enabled environment for your Android device. [maintainers=@t184256,@Gerschtli]
https://nix-on-droid.unboiled.info
MIT License
1.15k stars 65 forks source link

Incompatibility with Tailscale MagicDns (Could not resolve host) #322

Closed MinerSebas closed 4 months ago

MinerSebas commented 5 months ago

I am running tailscale on my Phone and when i try to access a server running tailscale, curl and wget are unable to resolve the hostname. Screenshot_20240128_213448_Nix

Regular urls work correctly.

When using the browser or regular termux, the hostname can be resolved: Screenshot_20240128_212424_Termux

MinerSebas commented 5 months ago

Just noticed #2 which is probably the root cause, will investigate further.

MinerSebas commented 5 months ago

I fixed the hostname resolution after adding the Tailscale DNS Server to resolv.conf file, which fixed it for wget, but curl does now neither print errors nor print contents. Screenshot_20240129_172820_Nix

matshch commented 4 months ago

curl does not follow redirects by default, you need to add -L flag to it.

MinerSebas commented 4 months ago

Ah, my inexperience with curl shows, though I am still confused as to why it seemed to partially work without -L over in Termux.

Closing this Issue as all relevant issues are resolved.