Returns the IP address of the machine that the browser is running on, requires no arguments. On a network with more than one cache, your script can use this information to decide which cache to communicate with. If the client machine is in the private address range, it cannot connect directly to the destination server, so if the cache is down for some reason they cannot access the Internet. A machine with a real IP address, on the other hand, should attempt to connect directly to the origin server if the cache is down. Since myIpAddress requires no arguments, we can simply place it in where we would have put host in the isInNet function call.
Shell expressions are similar to regular expressions, though are more limited.
This function is often used to check if the url or host variables have a specific word in them. If you are configuring a ISP-wide script, this function can be quite useful. This function doesn't take the same form as those described above. Since Squid does not support all possible protocols, you need a way of comparing the first few characters of the destination URL with the list of possible protocols. The function has two arguments.