JerryKindall.com: Once Upon a Time on the Web


Click thumbnail to enlarge

Golden Gate
1/15/2005
6 comments

 

Current
2007 Archives
   August
   June
   March
2006 Archives
   December
   November
   May
   April
   March
   February
   January
2005 Archives
   December
   November
   October
   September
   August
   July
   June
   May
   April
   March
   February
   January
2004 Archives
2003 Archives
2002 Archives
2001 Archives

Gallery
Download
Comments
Links

About Jerry
Amazon Wish List

MeFi-Projects

Seattle Pancakes

© 2001-2010 Jerry Kindall


Search this site
Search the Web



 

Friday 12/16/05

If you use the Squid proxy server, you may have been maddened by its refusal to automatically go to www.foo.com if you enter just foo (assuming foo isn't a hostname in your default domain). An easy workaround is to edit the file ERR_DNS_FAIL (you'll have to search for this; if you are using SquidMan on a Mac, the English version of this page is in /usr/local/squid/share/errors/English). Just after the line that begins <HEAD>, insert the following code:

<SCRIPT LANGUAGE="JavaScript1.1" TYPE="text/javascript"><!--
var url ="%U";
var url_array = url.split("/");
if(url_array[2].indexOf(".") < 0) {
url_array[2] = "www." + url_array[2] + ".com";
location.replace(url_array.join("/"));
}
// --></SCRIPT>

Sick and depraved, perhaps, but it does the job.

While I was at it, of course, I fixed the maddening message "Check if the address is correct" to read "Check the address to make sure it is correct."

Why am I running a Squid proxy on my Mac? First, so I don't waste disk space on caches for different browsers -- I disable the disk cache in each browser and they all use the Squid cache. Second, so when I'm ssh'd to my Mac from my laptop, I can use the Squid proxy from the laptop for secure browsing -- handy when you're using an open wireless hotspot.

To replicate Firefox's behavior (doing a Google "I'm feeling lucky" search rather than simply adding www and com), try this instead:

<SCRIPT LANGUAGE="JavaScript1.1" TYPE="text/javascript"><!--
var url ="%U";
var url_array = url.split("/");
if(url_array[2].indexOf(".") < 0) {
location.replace("http://www.google.com/search?q=" + url_array[2] + "&btnI=I'm+Feeling+Lucky")
}
// --></SCRIPT>

Re: Squid proxy tweak

There are 5 messages in this thread, displayed in the order they were posted.

pwercow 8/16/2006 10:24:27 AM Pacific

Quite surprised no thanks yet. I have come to depend on firefoxes "i'm feeling lucky" and that was the only thing i did not like about squid.
Thanks
Jerry Kindall 8/16/2006 10:28:33 AM Pacific
Quite welcome. :-D
grimsy 10/2/2007 10:03:07 PM Pacific
That's a great tweak. Just what I was looking for, thanks :D
Mark 12/11/2008 3:27:47 AM Pacific
Hi there Jerry,

I'm really sorry to bother you, but I was hoping that maybe you might be help to help me with my problem...and i thank you advance for taking the time to consider my following inquiry...

Do you know of any Proxy server software that I can run on my Mac, both for anonymity and security? I have searched high and low for something on the web to no avail!! All the seemingly good ones and user-friendly ones that don't need tech skills - like me, are all for Windows? there MUST be something out there Jerry?

I don't want to pay monthly for a proxy service either, as i much prefer to buy a one-off product instead, and even the monthly services are all for Windows.

I certainly accept the fact that even though things are changing for macs in recent times with more software available, I just can't believe there is nothing in this genre, as what I 'm asking shouldn't be anything too obscure in nature.

Anyway, I would so extremely appreciate your thoughts, insight and advice my friend and I look forward to hearing from you as soon as you can.

Kind regards,
Mark

Ethan Jackson 12/15/2008 10:39:07 AM Pacific
Try privoxy

It is currently 7/31/2010 3:12:43 AM Pacific.

Name:
(required) 
E-mail:
(optional) 
URL:
(optional) 
Enter your comments below. Leave a blank line between paragraphs. You may use <B>, <I>, and <A> HTML tags for formatting and linking, but you need not use HTML for line and paragraph breaks. Your e-mail address will not be displayed publicly.
      

aspcomments2 by Jerry Kindall based on aspcomments by sneaker