2 ms·
Given that even on Linux DNS resolution in Go can be quite... interesting without CGO being enabled, honestly it's hardly surprising that on iOS it would also b
by nasretdinov 3mo ago
Given that even on Linux DNS resolution in Go can be quite... interesting without CGO being enabled, honestly it's hardly surprising that on iOS it would also be quite challenging.
I imagine that one more interesting thing to consider is that on iOS you can't fork() or spawn sub-processes, so your Go mobile app is indeed running simultaneously as a Go binary and the UI, and there probably can exist countless interactions between the two being unaware of each other that might cause issues
- gen2brain 3mo agoWho enables CGO just for DNS resolution? That is not a thing for a long time, you just reminded me of that. Sure, if you have some complex config instead of a simple default, you would want to use libc and getaddrinfo, that is on you. What other issues are there? Go simple uses the network protocol for DNS, and it reads just resolve.conf; it does not care about LDAP or NSS or whatever there is.
- nasretdinov 3mo ago> if you have some complex config instead of a simple default Yup, exactly that. You don't always control the environment in which your software is going to run...
- aforwardslash 3mo agoMe. You know nuclei is written in go? Sometimes you need resolution consistency between eg. A port scanner and nuclei. You build and test this on your infra, but then you need to deploy on a heavily proxied network and you find issues. Is this your fault? Yes. Because you use golang. (Note: I use golang for almost everything, and this is something it is not documented enough - I am aware of this and have been bitten in the ass by this more than once)