Using a Hosts File To Make The Internet Not Suck As Much
11–20 of 104 posts
Re: Using a Hosts File To Make The Internet Not Suck As Much
#12for domains you don't want to route try 192.0.2.x - that range is reserved for examples and won't end up with spurious requests to stuff you're running on localhost.
Will browsers immediately fail the connection, or will it try to make the connection and wait for a timeout? I generally use 0.42.42.42 because Class-A addresses can't start with 0, so they fail immediately.
Re: Using a Hosts File To Make The Internet Not Suck As Much
#13Re: Using a Hosts File To Make The Internet Not Suck As Much
#14In Australia the government went on this rampage of attempting to "protect" people through censorship. Perhaps a better solution would have simply been to ask Microsoft and Apple to distribute computers with a pre-loaded host file. Nice and easy to opt out, all while providing some decent protection from obvious silly sites.
Re: Using a Hosts File To Make The Internet Not Suck As Much
#15Re: Using a Hosts File To Make The Internet Not Suck As Much
#16I like the idea of this, just deciding how to balance it with my own hosts file that has local entries vs keeping this one updated (presuming it will be) Interesting that something that looks to have taken a fair bit of work and is moderately useful hasn't had a comment on it.
https://code.google.com/p/gmask/
Re: Using a Hosts File To Make The Internet Not Suck As Much
#17for domains you don't want to route try 192.0.2.x - that range is reserved for examples and won't end up with spurious requests to stuff you're running on localhost.
Will browsers immediately fail the connection, or will it try to make the connection and wait for a timeout? I generally use 0.42.42.42 because Class-A addresses can't start with 0, so they fail immediately.
$ curl --connect-timeout 5 -v 192.0.2.1
* About to connect() to 192.0.2.1 port 80 (#0)
* Trying 192.0.2.1...
* Connection timed out after 5011 milliseconds
* Closing connection 0
curl: (28) Connection timed out after 5011 milliseconds
So your browser will likely end up trying the connection and timing out after a while.Re: Using a Hosts File To Make The Internet Not Suck As Much
#18Re: Using a Hosts File To Make The Internet Not Suck As Much
#19I'd recommend Gas Mask for anyone editing their hosts file: (Plug for own site with similar stuff): http://pineapple.io/resources/gas-mask Gas mas direct link: https://code.google.com/p/gmask/
Re: Using a Hosts File To Make The Internet Not Suck As Much
#20Earlier quoted context omitted.
Will browsers immediately fail the connection, or will it try to make the connection and wait for a timeout? I generally use 0.42.42.42 because Class-A addresses can't start with 0, so they fail immediately.
If you're running a web server locally on port 80, the webserver will handle the request. If no service is listening on port 80 your networking stack will not be able to open a tcp connection and it will be actively refused, unless you're using some kind of terrible software firewall.