Moez Mahfoudh <moez.mahfoudh@imag.fr>
Guido Serassio <serassio@libero.it>
Miquel van Smoorenburg <miquels@cistron.nl>
+ Brian <hiryuu@envisiongames.net>
Duane Wessels <wessels@squid-cache.org>
/*
- * $Id: acl.cc,v 1.269 2001/11/13 18:50:43 hno Exp $
+ * $Id: acl.cc,v 1.270 2001/12/21 09:47:34 hno Exp $
*
* DEBUG: section 28 Access Control
* AUTHOR: Duane Wessels
return ACL_METHOD;
if (!strcmp(s, "browser"))
return ACL_BROWSER;
+ if (!strcmp(s, "referer_regex"))
+ return ACL_REFERER_REGEX;
if (!strcmp(s, "proxy_auth"))
return ACL_PROXY_AUTH;
if (!strcmp(s, "proxy_auth_regex"))
return "method";
if (type == ACL_BROWSER)
return "browser";
+ if (type == ACL_REFERER_REGEX)
+ return "referer_regex";
if (type == ACL_PROXY_AUTH)
return "proxy_auth";
if (type == ACL_PROXY_AUTH_REGEX)
case ACL_URL_REGEX:
case ACL_URLPATH_REGEX:
case ACL_BROWSER:
+ case ACL_REFERER_REGEX:
case ACL_SRC_DOM_REGEX:
case ACL_DST_DOM_REGEX:
case ACL_REQ_MIME_TYPE:
return 0;
switch (ae->type) {
case ACL_BROWSER:
+ case ACL_REFERER_REGEX:
case ACL_DST_ASN:
case ACL_DST_DOMAIN:
case ACL_DST_DOM_REGEX:
return 0;
return aclMatchRegex(ae->data, browser);
/* NOTREACHED */
+ case ACL_REFERER_REGEX:
+ header = httpHeaderGetStr(&checklist->request->header, HDR_REFERER);
+ if (NULL == header)
+ return 0;
+ return aclMatchRegex(ae->data, header);
+ /* NOTREACHED */
case ACL_PROXY_AUTH:
case ACL_PROXY_AUTH_REGEX:
case ACL_MAX_USER_IP:
case ACL_URL_REGEX:
case ACL_URLPATH_REGEX:
case ACL_BROWSER:
+ case ACL_REFERER_REGEX:
case ACL_SRC_DOM_REGEX:
case ACL_DST_DOM_REGEX:
case ACL_REP_MIME_TYPE:
case ACL_URL_REGEX:
case ACL_URLPATH_REGEX:
case ACL_BROWSER:
+ case ACL_REFERER_REGEX:
case ACL_SRC_DOM_REGEX:
case ACL_DST_DOM_REGEX:
case ACL_REQ_MIME_TYPE:
#
-# $Id: cf.data.pre,v 1.244 2001/12/11 02:35:54 hno Exp $
+# $Id: cf.data.pre,v 1.245 2001/12/21 09:47:34 hno Exp $
#
#
# SQUID Web Proxy Cache http://www.squid-cache.org/
when using "file", the file should contain one item per line
- acltype is one of src dst srcdomain dstdomain url_pattern
- urlpath_pattern time port proto method browser user
+ acltype is one of the types described below
By default, regular expressions are CASE-SENSITIVE. To make
them case-insensitive, use the -i option.
acl aclname myport 3128 ... # (local socket TCP port)
acl aclname proto HTTP FTP ...
acl aclname method GET POST ...
- acl aclname browser [-i] regexp
+ acl aclname browser [-i] regexp ...
# pattern match on User-Agent header
+ acl aclname referer_regex [-i] regexp ...
+ # pattern match on Referer header
+ # Referer is highly unreliable, so use with care
acl aclname ident username ...
acl aclname ident_regex [-i] pattern ...
# string match on ident output.
/*
- * $Id: enums.h,v 1.202 2001/11/28 08:01:46 robertc Exp $
+ * $Id: enums.h,v 1.203 2001/12/21 09:47:34 hno Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
ACL_PROTO,
ACL_METHOD,
ACL_BROWSER,
+ ACL_REFERER_REGEX,
ACL_PROXY_AUTH,
ACL_PROXY_AUTH_REGEX,
ACL_SRC_ASN,