]>
git.ipfire.org Git - thirdparty/squid.git/blob - src/AclRegs.cc
3 /** This file exists to provide satic registration code to executables
4 that need ACLs. We cannot place this code in acl/lib*.la because it
5 does not get linked in, because nobody is using these classes by name.
11 #include "acl/Eui64.h"
14 #include "acl/Browser.h"
15 #include "acl/Checklist.h"
17 #include "acl/DestinationAsn.h"
18 #include "acl/DestinationDomain.h"
19 #include "acl/DestinationIp.h"
20 #include "acl/DomainData.h"
21 #include "acl/ExtUser.h"
22 #include "acl/FilledChecklist.h"
23 #include "acl/Gadgets.h"
24 #include "acl/HierCodeData.h"
25 #include "acl/HierCode.h"
26 #include "acl/HttpHeaderData.h"
27 #include "acl/HttpRepHeader.h"
28 #include "acl/HttpReqHeader.h"
29 #include "acl/HttpStatus.h"
30 #include "acl/IntRange.h"
32 #include "acl/MaxConnection.h"
33 #include "acl/MethodData.h"
34 #include "acl/Method.h"
36 #include "acl/MyPort.h"
37 #include "acl/MyPortName.h"
38 #include "acl/PeerName.h"
39 #include "acl/ProtocolData.h"
40 #include "acl/Protocol.h"
41 #include "acl/Referer.h"
42 #include "acl/RegexData.h"
43 #include "acl/ReplyHeaderStrategy.h"
44 #include "acl/ReplyMimeType.h"
45 #include "acl/RequestHeaderStrategy.h"
46 #include "acl/RequestMimeType.h"
47 #include "acl/SourceAsn.h"
48 #include "acl/SourceDomain.h"
49 #include "acl/SourceIp.h"
51 #include "acl/SslErrorData.h"
52 #include "acl/SslError.h"
53 #include "acl/CertificateData.h"
54 #include "acl/Certificate.h"
56 #include "acl/Strategised.h"
57 #include "acl/Strategy.h"
58 #include "acl/StringData.h"
60 #include "acl/TimeData.h"
63 #include "acl/UrlPath.h"
64 #include "acl/UrlPort.h"
65 #include "acl/UserData.h"
66 #include "auth/AclProxyAuth.h"
67 #include "auth/AclMaxUserIp.h"
69 #include "ident/AclIdent.h"
73 ACL::Prototype
ACLBrowser::RegistryProtoype(&ACLBrowser::RegistryEntry_
, "browser");
74 ACLStrategised
<char const *> ACLBrowser::RegistryEntry_(new ACLRegexData
, ACLRequestHeaderStrategy
<HDR_USER_AGENT
>::Instance(), "browser");
75 ACL::Prototype
ACLDestinationDomain::LiteralRegistryProtoype(&ACLDestinationDomain::LiteralRegistryEntry_
, "dstdomain");
76 ACLStrategised
<char const *> ACLDestinationDomain::LiteralRegistryEntry_(new ACLDomainData
, ACLDestinationDomainStrategy::Instance(), "dstdomain");
77 ACL::Prototype
ACLDestinationDomain::RegexRegistryProtoype(&ACLDestinationDomain::RegexRegistryEntry_
, "dstdom_regex");
78 ACLStrategised
<char const *> ACLDestinationDomain::RegexRegistryEntry_(new ACLRegexData
,ACLDestinationDomainStrategy::Instance() ,"dstdom_regex");
79 ACL::Prototype
ACLDestinationIP::RegistryProtoype(&ACLDestinationIP::RegistryEntry_
, "dst");
80 ACLDestinationIP
ACLDestinationIP::RegistryEntry_
;
81 ACL::Prototype
ACLExtUser::UserRegistryProtoype(&ACLExtUser::UserRegistryEntry_
, "ext_user");
82 ACLExtUser
ACLExtUser::UserRegistryEntry_(new ACLUserData
, "ext_user");
83 ACL::Prototype
ACLExtUser::RegexRegistryProtoype(&ACLExtUser::RegexRegistryEntry_
, "ext_user_regex" );
84 ACLExtUser
ACLExtUser::RegexRegistryEntry_(new ACLRegexData
, "ext_user_regex");
85 ACL::Prototype
ACLHierCode::RegistryProtoype(&ACLHierCode::RegistryEntry_
, "hier_code");
86 ACLStrategised
<hier_code
> ACLHierCode::RegistryEntry_(new ACLHierCodeData
, ACLHierCodeStrategy::Instance(), "hier_code");
87 ACL::Prototype
ACLHTTPRepHeader::RegistryProtoype(&ACLHTTPRepHeader::RegistryEntry_
, "rep_header");
88 ACLStrategised
<HttpHeader
*> ACLHTTPRepHeader::RegistryEntry_(new ACLHTTPHeaderData
, ACLHTTPRepHeaderStrategy::Instance(), "rep_header");
89 ACL::Prototype
ACLHTTPReqHeader::RegistryProtoype(&ACLHTTPReqHeader::RegistryEntry_
, "req_header");
90 ACLStrategised
<HttpHeader
*> ACLHTTPReqHeader::RegistryEntry_(new ACLHTTPHeaderData
, ACLHTTPReqHeaderStrategy::Instance(), "req_header");
91 ACL::Prototype
ACLHTTPStatus::RegistryProtoype(&ACLHTTPStatus::RegistryEntry_
, "http_status");
92 ACLHTTPStatus
ACLHTTPStatus::RegistryEntry_("http_status");
93 ACL::Prototype
ACLMaxConnection::RegistryProtoype(&ACLMaxConnection::RegistryEntry_
, "maxconn");
94 ACLMaxConnection
ACLMaxConnection::RegistryEntry_("maxconn");
95 ACL::Prototype
ACLMethod::RegistryProtoype(&ACLMethod::RegistryEntry_
, "method");
96 ACLStrategised
<HttpRequestMethod
> ACLMethod::RegistryEntry_(new ACLMethodData
, ACLMethodStrategy::Instance(), "method");
97 ACLMyIP
ACLMyIP::RegistryEntry_
;
98 ACLMyIP
const &ACLMyIP::RegistryEntry() {return RegistryEntry_
;}
99 ACL::Prototype
ACLMyPort::RegistryProtoype(&ACLMyPort::RegistryEntry_
, "myport");
100 ACLStrategised
<int> ACLMyPort::RegistryEntry_(new ACLIntRange
, ACLMyPortStrategy::Instance(), "myport");
101 ACL::Prototype
ACLMyPortName::RegistryProtoype(&ACLMyPortName::RegistryEntry_
, "myportname");
102 ACLStrategised
<const char *> ACLMyPortName::RegistryEntry_(new ACLStringData
, ACLMyPortNameStrategy::Instance(), "myportname");
103 ACL::Prototype
ACLPeerName::RegistryProtoype(&ACLPeerName::RegistryEntry_
, "peername");
104 ACLStrategised
<const char *> ACLPeerName::RegistryEntry_(new ACLStringData
, ACLPeerNameStrategy::Instance(), "peername");
105 ACL::Prototype
ACLProtocol::RegistryProtoype(&ACLProtocol::RegistryEntry_
, "proto");
106 ACLStrategised
<protocol_t
> ACLProtocol::RegistryEntry_(new ACLProtocolData
, ACLProtocolStrategy::Instance(), "proto");
107 ACL::Prototype
ACLReferer::RegistryProtoype(&ACLReferer::RegistryEntry_
, "referer_regex");
108 ACLStrategised
<char const *> ACLReferer::RegistryEntry_(new ACLRegexData
, ACLRequestHeaderStrategy
<HDR_REFERER
>::Instance(), "referer_regex");
109 ACL::Prototype
ACLReplyMIMEType::RegistryProtoype(&ACLReplyMIMEType::RegistryEntry_
, "rep_mime_type");
110 ACLStrategised
<char const *> ACLReplyMIMEType::RegistryEntry_(new ACLRegexData
, ACLReplyHeaderStrategy
<HDR_CONTENT_TYPE
>::Instance(), "rep_mime_type");
111 ACL::Prototype
ACLRequestMIMEType::RegistryProtoype(&ACLRequestMIMEType::RegistryEntry_
, "req_mime_type");
112 ACLStrategised
<char const *> ACLRequestMIMEType::RegistryEntry_(new ACLRegexData
, ACLRequestHeaderStrategy
<HDR_CONTENT_TYPE
>::Instance(), "req_mime_type");
113 ACL::Prototype
ACLSourceDomain::LiteralRegistryProtoype(&ACLSourceDomain::LiteralRegistryEntry_
, "srcdomain");
114 ACLStrategised
<char const *> ACLSourceDomain::LiteralRegistryEntry_(new ACLDomainData
, ACLSourceDomainStrategy::Instance(), "srcdomain");
115 ACL::Prototype
ACLSourceDomain::RegexRegistryProtoype(&ACLSourceDomain::RegexRegistryEntry_
, "srcdom_regex");
116 ACLStrategised
<char const *> ACLSourceDomain::RegexRegistryEntry_(new ACLRegexData
,ACLSourceDomainStrategy::Instance() ,"srcdom_regex");
117 ACL::Prototype
ACLSourceIP::RegistryProtoype(&ACLSourceIP::RegistryEntry_
, "src");
118 ACLSourceIP
ACLSourceIP::RegistryEntry_
;
119 ACL::Prototype
ACLTime::RegistryProtoype(&ACLTime::RegistryEntry_
, "time");
120 ACLStrategised
<time_t> ACLTime::RegistryEntry_(new ACLTimeData
, ACLTimeStrategy::Instance(), "time");
121 ACL::Prototype
ACLUrl::RegistryProtoype(&ACLUrl::RegistryEntry_
, "url_regex");
122 ACLStrategised
<char const *> ACLUrl::RegistryEntry_(new ACLRegexData
, ACLUrlStrategy::Instance(), "url_regex");
123 ACL::Prototype
ACLUrlPath::LegacyRegistryProtoype(&ACLUrlPath::RegistryEntry_
, "pattern");
124 ACL::Prototype
ACLUrlPath::RegistryProtoype(&ACLUrlPath::RegistryEntry_
, "urlpath_regex");
125 ACLStrategised
<char const *> ACLUrlPath::RegistryEntry_(new ACLRegexData
, ACLUrlPathStrategy::Instance(), "urlpath_regex");
126 ACL::Prototype
ACLUrlPort::RegistryProtoype(&ACLUrlPort::RegistryEntry_
, "port");
127 ACLStrategised
<int> ACLUrlPort::RegistryEntry_(new ACLIntRange
, ACLUrlPortStrategy::Instance(), "port");
130 ACL::Prototype
ACLSslError::RegistryProtoype(&ACLSslError::RegistryEntry_
, "ssl_error");
131 ACLStrategised
<int> ACLSslError::RegistryEntry_(new ACLSslErrorData
, ACLSslErrorStrategy::Instance(), "ssl_error");
132 ACL::Prototype
ACLCertificate::UserRegistryProtoype(&ACLCertificate::UserRegistryEntry_
, "user_cert");
133 ACLStrategised
<SSL
*> ACLCertificate::UserRegistryEntry_(new ACLCertificateData (sslGetUserAttribute
), ACLCertificateStrategy::Instance(), "user_cert");
134 ACL::Prototype
ACLCertificate::CARegistryProtoype(&ACLCertificate::CARegistryEntry_
, "ca_cert");
135 ACLStrategised
<SSL
*> ACLCertificate::CARegistryEntry_(new ACLCertificateData (sslGetCAAttribute
), ACLCertificateStrategy::Instance(), "ca_cert");
139 ACL::Prototype
ACLARP::RegistryProtoype(&ACLARP::RegistryEntry_
, "arp");
140 ACLARP
ACLARP::RegistryEntry_("arp");
141 ACL::Prototype
ACLEui64::RegistryProtoype(&ACLEui64::RegistryEntry_
, "eui64");
142 ACLEui64
ACLEui64::RegistryEntry_("eui64");
146 ACL::Prototype
ACLIdent::UserRegistryProtoype(&ACLIdent::UserRegistryEntry_
, "ident");
147 ACLIdent
ACLIdent::UserRegistryEntry_(new ACLUserData
, "ident");
148 ACL::Prototype
ACLIdent::RegexRegistryProtoype(&ACLIdent::RegexRegistryEntry_
, "ident_regex" );
149 ACLIdent
ACLIdent::RegexRegistryEntry_(new ACLRegexData
, "ident_regex");
153 ACL::Prototype
ACLProxyAuth::UserRegistryProtoype(&ACLProxyAuth::UserRegistryEntry_
, "proxy_auth");
154 ACLProxyAuth
ACLProxyAuth::UserRegistryEntry_(new ACLUserData
, "proxy_auth");
155 ACL::Prototype
ACLProxyAuth::RegexRegistryProtoype(&ACLProxyAuth::RegexRegistryEntry_
, "proxy_auth_regex" );
156 ACLProxyAuth
ACLProxyAuth::RegexRegistryEntry_(new ACLRegexData
, "proxy_auth_regex");
158 ACL::Prototype
ACLMaxUserIP::RegistryProtoype(&ACLMaxUserIP::RegistryEntry_
, "max_user_ip");
159 ACLMaxUserIP
ACLMaxUserIP::RegistryEntry_("max_user_ip");
161 ACL::Prototype
ACLTag::RegistryProtoype(&ACLTag::RegistryEntry_
, "tag");
162 ACLStrategised
<const char *> ACLTag::RegistryEntry_(new ACLStringData
, ACLTagStrategy::Instance(), "tag");