Hello,
I have a quick question about how browsers work. When they establish connections to servers, do they connect to a hostname such as "www.google.com" or "www.linuxquestions.org", or do they perform a quick DNS query and then try to connect directly to "216.239.51.99" or "64.179.4.146"?
Here is why I'm asking. I'm currently in a hotel that has wireless internet. Unfortunately, their service could be summed up in a word as irritating. Every time I try to connect anywhere, their router responds with a "HTTP 302 Moved Temporarily" response, and it redirects the connection to a little toolbar application that they created "for my convenience". Do not want!
I went into telnet and tried connection to google.com directly:
Code:
serg@cherie:~$ telnet www.google.com 80
Trying 216.239.51.104...
Connected to www.l.google.com.
Escape character is '^]'.
GET / HTTP/1.0
HTTP/1.0 302 Moved Temporarily
Server: squid/2.5.STABLE14
Date: Fri, 17 Aug 2007 18:37:58 GMT
Content-Length: 0
Location: http://12.146.233.66/superclick/popup.php?popup=4&url=http%3A%2F%2F216.239.51.104%2F
Connection closed by foreign host.
Then I ran an nslookup query for
www.google.com and found its IP address to be 216.239.51.99. I ran telnet with that instead:
Code:
serg@cherie:~$ telnet 216.239.51.99 80
Trying 216.239.51.99...
Connected to 216.239.51.99.
Escape character is '^]'.
GET / HTTP/1.0
HTTP/1.0 200 OK
Cache-Control: private
Content-Type: text/html; charset=ISO-8859-1
Set-Cookie: PREF=ID=bab640079fe60c51:TM=1187375982:LM=1187375982:S=lbm97dz6r-QPhDPz; expires=Sun, 17-Jan-2038 19:14:07 GMT; path=/; domain=.google.com
Server: GWS/2.1
Date: Fri, 17 Aug 2007 18:39:42 GMT
X-Cache: MISS from localhost
Connection: close
<html><head><meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"><title>Google</title><style><!--
body,td,a,p,.h{font-family:arial,sans-serif}
.h{font-size:20px}
.h{color:#3366cc}
.q{color:#00c}
.ts td{padding:0}.ts{border-collapse:collapse}--></style>
<script>
<!--
window.google={kEI:"buvFRv6NGYHWqwLZqrSiBw",kEXPI:"17259",kHL:"en"};function sf(){document.f.q.focus();}
// -->
</script>
</head><body bgcolor=#ffffff text=#000000 link=#0000cc vlink=#551a8b alink=#ff0000 onload="sf();if(document.images){new Image().src='/images/nav_logo3.png'}" topmargin=3 marginheight=3><div align=right id=guser style="font-size:84%;padding:0 0 4px" width=100%><nobr><a href="/url?sa=p&pref=ig&pval=3&q=http://www.google.com/ig%3Fhl%3Den&usg=AFQjCNEj49wK5T88bDwGcaZsW52jiYwJwg">iGoogle</a></nobr></div><center><br clear=all id=lgpd><table cellpadding=0 cellspacing=0 border=0><tr><td align=right valign=bottom><img src=images/hp0.gif width=158 height=78 alt="Google"></td><td valign=bottom><img src=images/hp1.gif width=50 height=78 alt=""></td><td valign=bottom><img src=images/hp2.gif width=68 height=78 alt=""></td></tr><tr><td class=h align=right valign=top><b></b></td><td valign=top><img src=images/hp3.gif width=50 height=32 alt=""></td><td valign=top class=h><font color=#666666 style=font-size:16px><b>English</b></font></td></tr></table><br><form action="/search" name=f><style>#lgpd{display:none}</style><script defer><!--
//-->
</script><table border=0 cellspacing=0 cellpadding=4><tr><td nowrap><font size=-1><b>Web</b> <a class=q href="http://images.google.com/imghp?ie=ISO-8859-1&oe=ISO-8859-1&hl=en&tab=wi">Images</a> <a class=q href="http://groups.google.com/grphp?ie=ISO-8859-1&oe=ISO-8859-1&hl=en&tab=wg">Groups</a> <a class=q href="http://news.google.com/nwshp?ie=ISO-8859-1&oe=ISO-8859-1&hl=en&tab=wn">News</a> <a class=q href="http://scholar.google.com/schhp?ie=ISO-8859-1&oe=ISO-8859-1&hl=en&tab=ws">Scholar</a> <b><a href="/intl/en/options/" class=q>more »</a></b></font></td></tr></table><table cellpadding=0 cellspacing=0><tr valign=top><td width=25%> </td><td align=center nowrap><input name=hl type=hidden value=en><input type=hidden name=ie value="ISO-8859-1"><input maxlength=2048 name=q size=55 title="Google Search" value=""><br><input name=btnG type=submit value="Google Search"><input name=btnI type=submit value="I'm Feeling Lucky"></td><td nowrap width=25%><font size=-2> <a href=/advanced_search?hl=en>Advanced Search</a><br> <a href=/preferences?hl=en>Preferences</a><br> <a href=/language_tools?hl=en>Language Tools</a></font></td></tr></table></form><br><br><font size=-1><a href="/intl/en/ads/">Advertising Programs</a> - <a href="/services/">Business Solutions</a> - <a href="/intl/en/about.html">About Google</a> - <a href=http://www.google.com/ncr>Go to Google.com</a></font><p><font size=-2>©2007 Google</font></p></center></body></html>Connection closed by foreign host.
In summary, if I do the name resolution myself (manually), I get to browse the Internet without that annoying "toolbar" of theirs. Is there any way that I could configure Firefox to perform the DNS queries using something like nslookup instead of relying on the router? Or is there perhaps another way I could avoid having to browse with that "toolbar" of theirs?