Online Book Reader

Home Category

Squid_ The Definitive Guide - Duane Wessels [220]

By Root 2041 0
wpad in the local domain. For example, if the system's hostname is orion.example.com, the agent requests the IP address of wpad.example.com. If the lookup is successful, the agent makes a TCP connect to that address on port 80 and requests /wpad.dat.

To make this work in Apache, you need to set the content type for the wpad.dat file like this:

AddType application/x-ns-proxy-autoconfig .dat

This may have negative side effects if your server has other files that end with .dat. One trick some people use is to redirect requests for wpad.dat to proxy.pac, with commands like this in httpd.conf:

Redirect /wpad.dat http://wpad.example.com/proxy.pac

Note that you probably won't be able to set up a separate virtual host for the wpad name in your domain. This is because some user-agents set the Host header to the IP address, rather than the hostname. The following is an example.

GET /wpad.dat HTTP/1.1

Accept: */*

User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Win32)

Host: 206.168.0.13

WPAD is enabled by default in Microsoft Internet Explorer. Konqueror also supports WPAD but disables it by default. You can enable WPAD in Konqueror by visiting the proxy configuration page (described in the Section F.1) and selecting Auto Configure Proxy. Although the current stable versions of Netscape (v7.02) and Mozilla (v5.0) don't implement WPAD, future versions will.

Summary

Table F-1 summarizes the various proxy configuration options for the user-agents mentioned in this appendix.

Table F-1. Proxy configuration techniques for popular user-agents

User agent

Manual

Environment

PAC

WPAD

Explorer

Yes

No

Yes

Yes

Konqueror

Yes

No

Yes

Yes

libwww-perl

N/A

Yes

No

No

Lynx

Yes

Yes

No

No

Netscape/Mozilla

Yes

No

Yes

No

Opera

Yes

Yes

Yes

No

Wget

N/A

Yes

No

No

About the Author

Duane Wessels became interested in web caching in 1994 as a topic for his master's thesis in telecommunications at the University of Colorado, Boulder. He worked with members of the Harvest research project to develop web caching software. After the departure of other members to industry jobs, he continued the software development under the name Squid. Another significant part of Duane's research with the National Laboratory for Applied Network Research has been the operation of 6 to 8 large caches throughout the U.S. These caches receive requests from hundreds of other caches, all connected in a "global cache mesh."

Colophon

Our look is the result of reader comments, our own experimentation, and feedback from distribution channels. Distinctive covers complement our distinctive approach to technical topics, breathing personality and life into potentially dry subjects.

The animal on the cover of Squid: The Definitive Guide is a giant squid (Architeuthis dux). Of the class Cephalopoda, which means "head foot," the giant squid holds much fascination for humans, part of which has to do with the fact that it has never been observed alive in its natural habitat. Scientists have only been able to study specimens that have been caught or found washed up on beaches. This invertebrate can grow to 60 feet in length and weigh as much as a ton. It's a deep-sea dweller (660-2,300 feet) that is found throughout the world's oceans.

A giant squid consists of seven parts. Its head houses a complex brain. Its eyes are the largest in the animal kingdom-up to 10 inches in diameter. (Most deep-sea animals have very large eyes so they can gather the small amounts of light available in the depths of the ocean.) Its fins are relatively small and help it to balance and maneuver as it swims. Its main body is called a mantle: it's a muscular sac that contains most of the organ systems. Its eight arms are studded with two rows of suckers; it also has two much longer feeding tentacles, the ends of which also have suckers and are called clubs. Finally, its funnel is a multipurpose tube used to breathe, squirt ink, lay eggs, expel waste, and propel itself.

To eat, a giant squid captures its prey with its two long feeding tentacles.

Return Main Page Previous Page Next Page

®Online Book Reader