6

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?

1
  • Is this a Personal or Commercial application? Commented Feb 6, 2017 at 19:30

1 Answer 1

2
+50

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.

2
  • 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 Commented Feb 6, 2017 at 20:46
  • this is why i asked for commercial reasons, some of those apps have different licensing costs. I guess harrymc beat me to it. Commented Feb 6, 2017 at 21:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .