WebPagetest Forums
Support SetDNS for Android Mobile - Printable Version

+- WebPagetest Forums (https://www.webpagetest.org/forums)
+-- Forum: WebPagetest (/forumdisplay.php?fid=7)
+--- Forum: Feature Suggestions (/forumdisplay.php?fid=9)
+--- Thread: Support SetDNS for Android Mobile (/showthread.php?tid=13193)



Support SetDNS for Android Mobile - pblum - 08-26-2014 04:00 AM

It would be great to have SetDNS support for the Android mobile devices. This would allow redirection of requests to temporary testing setups for domains already in production.


RE: Support SetDNS for Android Mobile - pmeenan - 08-26-2014 05:45 AM

Doing DNS spoofing "right" (the way we do in desktop where we keep the DNS times and just change the answer) is hard on mobile and is something we are working on but in the meantime you can get most of what you'd need just by using the custom command-line feature (which does work for the android agents). Using --host-rules you could map domains to your test host as needed: http://peter.sh/experiments/chromium-command-line-switches/#host-rules


RE: Support SetDNS for Android Mobile - pblum - 08-26-2014 09:45 AM

Thanks for the quick response and the pointer on the Chrome command line feature!

I tried --host-rules MAP http://www.example.com 192.168.1.76 in the Chrome command line feature and I'm getting back (Invalid command-line option: "192.168.1.76"). I was using another hostname and IP but that shows the result. I tried various ways to escape it " ', etc but no luck. It seems like it does not like the spaces that this command line requires.

Any chance you have an example of the command that works with WPT?