ysbaddaden / prax

Rack proxy server for development
http://ysbaddaden.github.io/prax/
Other
475 stars 49 forks source link

Google Chrome Fails to Resolve .dev Domains ("This webpage is not available"/ERR_CONNECTION_REFUSED) #118

Closed karlwilbur closed 9 years ago

karlwilbur commented 9 years ago

FYI, I just ran into an issue with Prax+Chrome. Chrome's Async DNS is bypassing local DNS resolution stack ( I.E. nsswitch.conf) and doing direct resolution. This results in all .dev domains resolving as 127.0.53.53 from Google. Since we aren't listening on 127.0.53.53, we get the "This webpage is not available"/ERR_CONNECTION_REFUSED page in Chrome.

For older versions of Google Chrome (I think it would be <=38), there is a switch in chrome://flags that lets one disable this functionality. This flag has been removed from Chrome and now there is no possibility of disabling it (https://chromium.googlesource.com/chromium/src/+/eabf1f5baba38d46921acd6edda594f942f7d6a1).

Also, FWIW, without a network connection (unchecking "Enable Networking" in the networking applet, shutting down all interfaces via ifconfig, etc.) Google Chrome will actually resolve the .dev domain names correctly. This is not a very workable workaround though.

This is only an issue with Google Chrome issue. All other HTTP clients (Firefox, Lynx, cURL, Epiphay, Konqueror, etc.) seem to work fine.

There is currently a new issue for the Chromium development team to look into this and work out a solution: https://code.google.com/p/chromium/issues/detail?id=117655

As a workaround for Prax, we could implement a handler for 127.0.53.53, but I think that this would be an ugly solution.

karlwilbur commented 9 years ago

Sorry, I didn't see #117 this when I created this issue.

karlwilbur commented 9 years ago

This is a duplicate of #117.