Squid_ The Definitive Guide - Duane Wessels [218]
Appendix F. Configuring Squid Clients
This appendix contains information on setting up various browsers and user-agents to use Squid. Although it is more extensively covered in my O'Reilly book Web Caching, I'll include some brief instructions here.
I have instructions for the following HTTP user-agents: Internet Explorer v6, Konqueror v3, Lynx v2.8, Netscape v7 a.k.a. Mozilla v5, Opera v7, libwww-perl v5, Python's urllib/urllib2, and Wget v1.8. If you think this is all a huge hassle, consider using HTTP interception, as described in Chapter 9.
Manually
Web browsers and other HTTP-based user-agents have methods for explicitly setting a proxy address. For large organizations, this is a real hassle. You may simply have too many desktops to visit one at a time. Additionally, this approach isn't as flexible as the others. For example, you can't temporarily stop the flow of requests to the proxy or easily bypass the cache for certain troublesome sites.
Browsers usually give you the option to send HTTPS URLs to a proxy. Squid can handle HTTPS requests, although it can't cache the responses. Squid simply tunnels the encrypted traffic. Thus, you should configure the browser to proxy HTTPS requests only if your firewall prevents direct connections to secure sites.
Netscape/Mozilla
To manually configure proxies with Netscape and Mozilla, follow this sequence of menus:
Edit
Preferences
Advanced
Proxies
Manual proxy configuration
Fill in the HTTP Proxy address and Port fields. Enter the same values for FTP Proxy if you like.
Explorer
To manually configure proxies in Internet Explorer, select the following sequence of menus:
View from the main window menu
Internet Options
Connections tab
LAN Settings
Enable Use a proxy server and enter its address in the Address and Port fields
The Advanced button opens a new window in which you can enter different proxy addresses for different protocols (HTTP, FTP, etc.).
Konqueror
You can manually configure proxies in Konqueror by clicking on the following sequence of menus:
Settings
Configure Konqueror
Proxies & Cache
Use Proxy
Fill in the address for HTTP Proxy, and Port. Use the same values for other protocols if you like.
Opera
Here's how to find the proxy configuration screen in Opera browsers:
File
Preferences
Network
Proxy Servers
Enter an IP address (or hostname) and port number for HTTP, FTP, and other protocols as necessary.
Lynx
The Lynx browser uses a configuration file, typically /usr/local/etc/lynx.cfg. There you'll find a number of settings for proxies. For example:
http_proxy:http://proxy.example.com:3128/
https_proxy:http://proxy.example.com:3128/
ftp_proxy:http://proxy.example.com:3128/
Lynx also accepts proxy configuration via environment variables, as described in the next section.
Environment Variables
Some browsers and other user-agents look for proxy settings in environment variables. Note that the variable names are lowercase, unlike most environment variable names:
csh% setenv http_proxy http://proxy.example.com:3128/
csh% setenv ftp_proxy http://proxy.example.com:3128/
sh$ http_proxy=http://proxy.example.com:3128/
sh$ ftp_proxy=http://proxy.example.com:3128/
export http_proxy ftp_proxy
I've convinced myself that the following products and packages check for these environment variables:
Opera
Lynx
Wget
Python's urllib and urllib2
libwww-perl
Proxy Auto-Configuration
Proxy Auto-Configuration is a technique that allows more control over the way user-agents select