Using Windows 10 Hosts File From Shared Connection

6

0

I use Windows 10 as my programming environment for writing websites with a Debian VirtualBox that the actual web server runs on.

So when I need to test my websites, all I had to do was add them to my hosts file and I'm good to go.

Now the problem comes because I'm trying to test my local websites with my iPhone. I've followed the tutorial here http://www.windowscentral.com/how-turn-your-windows-10-pc-wireless-hotspot to help me connect my phone to my computer's internet connection hoping that I would be able to go to "dev.testsite.com" from my phone now, but it seems as though the Windows hosts file isn't being used by my phone.

Is there a way to set this up so that the iPhone uses the hosts file from my Windows computer to figure out which DNS records I have overridden?

Brian says Reinstate Monica

Posted 2016-06-28T15:32:32.117

Reputation: 211

Is this a Personal or Commercial application? – DeerSpotter – 2017-02-06T19:30:23.237

Answers

2

When the PC and iPhone are on the same network, you may set the PC as the proxy for the iPhone. Here are some solutions that do not require jail-breaking:

  1. Use Microsoft's Fiddler, a free web debugging proxy.
    For a Web developer this will have the additional benefit of logging all traffic for debug.
    See the article Monitoring iPhone web traffic (with Fiddler).

  2. Use Weblock - AdBlock for apps and websites ($1.99).
    See this StackOverflow answer for details.

  3. Use the Charles HTTP proxy / HTTP monitor / Reverse Proxy ($50).
    This is another monitoring solution for developers.
    See this StackOverflow answer for details.

harrymc

Posted 2016-06-28T15:32:32.117

Reputation: 306 093

Oh wow this is an old question, but yes I've forgotten about this since and I have solved it myself, once with this method, and the second time I jailbroke my iPhone and just edited the hosts file, which is what I'm still doing now. But I do know that your answer works from personal experience so I'll mark this as accepted – Brian says Reinstate Monica – 2017-02-06T20:46:08.323

this is why i asked for commercial reasons, some of those apps have different licensing costs. I guess harrymc beat me to it. – DeerSpotter – 2017-02-06T21:01:51.040