ish-app / ish

Linux shell for iOS
https://ish.app
Other
17.06k stars 904 forks source link

/etc/resolv.conf #817

Open rf23 opened 4 years ago

rf23 commented 4 years ago

this is a feature request and/or bug report.

8.8.8.8 and 8.8.4.4 (google DNS servers) are configured as part of the DHCP server setup on my router. And all the DHCP clients (other devices connected to the same local network using DHCP to request IP address etc) are all getting correct dns servers. However, ish would sometimes not be getting them instead ish wrote DHCP server/router address (192.168.10.1 in my case) to /etc/resolv.conf. And this caused a problem as the router is not configrued to be a dns server or dns forwarder.

I had to manually create /etc/resolv.conf and put in google DNS servers so name resolution would work. I tired to make the file to be readable, but it would still be modified.

Is it possible to make ish recognize or use a customized DNS servers? or at least not to overwrite /etc/resolv.conf?

Thanks.

tbodt commented 4 years ago

I thought the way I was doing it would use the DNS settings that were set by DHCP...

rf23 commented 4 years ago

it does most of the time. However there were occasions that incorrect name server IP address was written in /etc/resolv.conf when the device was reconnected to the network. not exaclty reproduceable but it happened often enough that i had a script to create /etc/resolv.conf when hostname is not resolved.

jonad2002 commented 4 years ago

I haven’t looked through the source yet to discover how resolv.conf is populated, but noticed an additional behavior today. When connected to OpenVPN, a freshly launched ish doesn’t pick up the VPN nameserver list, it continues to populate resolv.conf with the host iOS device’s list. I don’t know if this is related, and I can open a separate issue — but I thought I would dig through the code first and see if it was something I could sort out. Not an iOS code hacker (yet), but willing to give it a go.