plateaukao / einkbro

A small, fast web browser based on Android WebView. It's tailored for E-Ink devices but also works great on normal android devices.
Other
1.13k stars 80 forks source link

Device DNS setting ignored #270

Closed duncairn closed 1 year ago

duncairn commented 1 year ago

Please write necessary information as described below. If information is not enough, I may not have time to look into it.

What device and app version are you using

Describe the bug DNS requests ignore the device-set DNS server and hits Google's DNS server regardless.

To Reproduce Access a LAN-based web server using manually- or DHCP-assigned DNS which points to a LAN-based DNS server. If the domain doesn't exist externally the web server can't be seen, but if a similar external site exists (for instance, home.net) then the external site is displayed instead.

Expected behavior The DNS set on the device (however it is set - manually or via DHCP) should be used.

plateaukao commented 1 year ago

Hi, @duncairn I did not do anything related to load http requests in EinkBro. Have you tried similar browsers using WebView, e.g., Via browser, xBrowser. Did they behave as you expected? It looks like it's System WebView's default behavior, and I don't know where to modify to fulfill your needs. If you know any open source browser that can behave as you expected, please let me know. I'll take a look and see if it's possible to support it on EinkBro.

duncairn commented 1 year ago

Thanks for the quick response!

I also have Chrome installed and that exhibits the desired behaviour (that is, it uses the DHCP DNS setting), but I don't know if it uses WebView. I suspect not, and would be unsurprised if the WebView behaviour is a Google thing to enforce tracking.

Bearing that in mind, perhaps this is more of a request than a bug.

[Edit] I tried EinkBro on my Boox Tab Ultra and that used the DHCP setting! It is version 10.7, so not quite as current, and it is Android 12. I think this could be an Android 9 issue, then.

plateaukao commented 1 year ago

Chrome is a monster with everything on its own.

If the behavior is different between different Android OS versions, then it may not be something I could tweak from App side. Maybe you could try something like DNS66, to setup VPN on the device, so that it could redirect all traffic through your own DNS on Android 9.

duncairn commented 1 year ago

Ah, that DNS66 looks like it might be the answer. Thanks very much for your help!