]> git.ipfire.org Git - thirdparty/squid.git/blame - src/AclRegs.cc
Boilerplate: update copyright blurbs on Squid helpers
[thirdparty/squid.git] / src / AclRegs.cc
CommitLineData
582c2af2 1#include "squid.h"
2d46f579
AR
2
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.
6*/
7
c302ddb5
CT
8#if USE_ADAPTATION
9#include "acl/AdaptationService.h"
10#include "acl/AdaptationServiceData.h"
11#endif
6f58d7d7
AR
12#include "acl/AllOf.h"
13#include "acl/AnyOf.h"
32d002cb 14#if USE_SQUID_EUI
2d46f579 15#include "acl/Arp.h"
a98c2da5 16#include "acl/Eui64.h"
2d46f579 17#endif
5d65362c 18#if USE_OPENSSL
8693472e
CT
19#include "acl/AtStep.h"
20#include "acl/AtStepData.h"
5d65362c 21#endif
2d46f579
AR
22#include "acl/Asn.h"
23#include "acl/Browser.h"
24#include "acl/Checklist.h"
25#include "acl/Data.h"
26#include "acl/DestinationAsn.h"
27#include "acl/DestinationDomain.h"
28#include "acl/DestinationIp.h"
29#include "acl/DomainData.h"
2f1431ea 30#if USE_AUTH
2d46f579 31#include "acl/ExtUser.h"
2f1431ea 32#endif
2d46f579
AR
33#include "acl/FilledChecklist.h"
34#include "acl/Gadgets.h"
bbaf2685 35#include "acl/HierCode.h"
602d9612 36#include "acl/HierCodeData.h"
2d46f579
AR
37#include "acl/HttpHeaderData.h"
38#include "acl/HttpRepHeader.h"
39#include "acl/HttpReqHeader.h"
40#include "acl/HttpStatus.h"
2d46f579
AR
41#include "acl/IntRange.h"
42#include "acl/Ip.h"
1e40905d
AJ
43#include "acl/LocalIp.h"
44#include "acl/LocalPort.h"
2d46f579 45#include "acl/MaxConnection.h"
2d46f579 46#include "acl/Method.h"
602d9612 47#include "acl/MethodData.h"
2d46f579 48#include "acl/MyPortName.h"
39baccc8
CT
49#include "acl/Note.h"
50#include "acl/NoteData.h"
2d46f579 51#include "acl/PeerName.h"
2d46f579 52#include "acl/Protocol.h"
602d9612 53#include "acl/ProtocolData.h"
cb1b906f 54#include "acl/Random.h"
2d46f579
AR
55#include "acl/Referer.h"
56#include "acl/RegexData.h"
57#include "acl/ReplyHeaderStrategy.h"
58#include "acl/ReplyMimeType.h"
59#include "acl/RequestHeaderStrategy.h"
60#include "acl/RequestMimeType.h"
61#include "acl/SourceAsn.h"
62#include "acl/SourceDomain.h"
63#include "acl/SourceIp.h"
cb4f4424 64#if USE_OPENSSL
2d46f579 65#include "acl/Certificate.h"
602d9612
A
66#include "acl/CertificateData.h"
67#include "acl/SslError.h"
68#include "acl/SslErrorData.h"
2d46f579
AR
69#endif
70#include "acl/Strategised.h"
71#include "acl/Strategy.h"
72#include "acl/StringData.h"
cb4f4424 73#if USE_OPENSSL
00352183
AR
74#include "acl/ServerCertificate.h"
75#endif
bb5e7a79 76#include "acl/Tag.h"
2d46f579 77#include "acl/Time.h"
602d9612 78#include "acl/TimeData.h"
2d46f579 79#include "acl/Url.h"
9d35fe37 80#include "acl/UrlLogin.h"
2d46f579
AR
81#include "acl/UrlPath.h"
82#include "acl/UrlPort.h"
83#include "acl/UserData.h"
2f1431ea 84#if USE_AUTH
abca32cf 85#include "auth/AclMaxUserIp.h"
602d9612 86#include "auth/AclProxyAuth.h"
2f1431ea 87#endif
4daaf3cb
AJ
88#if USE_IDENT
89#include "ident/AclIdent.h"
90#endif
abca32cf 91
2d46f579
AR
92ACL::Prototype ACLBrowser::RegistryProtoype(&ACLBrowser::RegistryEntry_, "browser");
93ACLStrategised<char const *> ACLBrowser::RegistryEntry_(new ACLRegexData, ACLRequestHeaderStrategy<HDR_USER_AGENT>::Instance(), "browser");
33810b1d 94ACLFlag DestinationDomainFlags[] = {ACL_F_NO_LOOKUP, ACL_F_END};
2d46f579 95ACL::Prototype ACLDestinationDomain::LiteralRegistryProtoype(&ACLDestinationDomain::LiteralRegistryEntry_, "dstdomain");
33810b1d 96ACLStrategised<char const *> ACLDestinationDomain::LiteralRegistryEntry_(new ACLDomainData, ACLDestinationDomainStrategy::Instance(), "dstdomain", DestinationDomainFlags);
2d46f579 97ACL::Prototype ACLDestinationDomain::RegexRegistryProtoype(&ACLDestinationDomain::RegexRegistryEntry_, "dstdom_regex");
33810b1d
CT
98ACLFlag DestinationDomainRegexFlags[] = {ACL_F_NO_LOOKUP, ACL_F_REGEX_CASE, ACL_F_END};
99ACLStrategised<char const *> ACLDestinationDomain::RegexRegistryEntry_(new ACLRegexData,ACLDestinationDomainStrategy::Instance() ,"dstdom_regex", DestinationDomainRegexFlags);
2d46f579
AR
100ACL::Prototype ACLDestinationIP::RegistryProtoype(&ACLDestinationIP::RegistryEntry_, "dst");
101ACLDestinationIP ACLDestinationIP::RegistryEntry_;
2f1431ea 102#if USE_AUTH
2d46f579
AR
103ACL::Prototype ACLExtUser::UserRegistryProtoype(&ACLExtUser::UserRegistryEntry_, "ext_user");
104ACLExtUser ACLExtUser::UserRegistryEntry_(new ACLUserData, "ext_user");
105ACL::Prototype ACLExtUser::RegexRegistryProtoype(&ACLExtUser::RegexRegistryEntry_, "ext_user_regex" );
106ACLExtUser ACLExtUser::RegexRegistryEntry_(new ACLRegexData, "ext_user_regex");
2f1431ea 107#endif
bbaf2685
AJ
108ACL::Prototype ACLHierCode::RegistryProtoype(&ACLHierCode::RegistryEntry_, "hier_code");
109ACLStrategised<hier_code> ACLHierCode::RegistryEntry_(new ACLHierCodeData, ACLHierCodeStrategy::Instance(), "hier_code");
2d46f579
AR
110ACL::Prototype ACLHTTPRepHeader::RegistryProtoype(&ACLHTTPRepHeader::RegistryEntry_, "rep_header");
111ACLStrategised<HttpHeader*> ACLHTTPRepHeader::RegistryEntry_(new ACLHTTPHeaderData, ACLHTTPRepHeaderStrategy::Instance(), "rep_header");
112ACL::Prototype ACLHTTPReqHeader::RegistryProtoype(&ACLHTTPReqHeader::RegistryEntry_, "req_header");
113ACLStrategised<HttpHeader*> ACLHTTPReqHeader::RegistryEntry_(new ACLHTTPHeaderData, ACLHTTPReqHeaderStrategy::Instance(), "req_header");
114ACL::Prototype ACLHTTPStatus::RegistryProtoype(&ACLHTTPStatus::RegistryEntry_, "http_status");
115ACLHTTPStatus ACLHTTPStatus::RegistryEntry_("http_status");
116ACL::Prototype ACLMaxConnection::RegistryProtoype(&ACLMaxConnection::RegistryEntry_, "maxconn");
117ACLMaxConnection ACLMaxConnection::RegistryEntry_("maxconn");
118ACL::Prototype ACLMethod::RegistryProtoype(&ACLMethod::RegistryEntry_, "method");
119ACLStrategised<HttpRequestMethod> ACLMethod::RegistryEntry_(new ACLMethodData, ACLMethodStrategy::Instance(), "method");
bb8466d6 120ACL::Prototype ACLLocalIP::RegistryProtoype(&ACLLocalIP::RegistryEntry_, "localip");
1e40905d
AJ
121ACLLocalIP ACLLocalIP::RegistryEntry_;
122ACL::Prototype ACLLocalPort::RegistryProtoype(&ACLLocalPort::RegistryEntry_, "localport");
123ACLStrategised<int> ACLLocalPort::RegistryEntry_(new ACLIntRange, ACLLocalPortStrategy::Instance(), "localport");
2d46f579
AR
124ACL::Prototype ACLMyPortName::RegistryProtoype(&ACLMyPortName::RegistryEntry_, "myportname");
125ACLStrategised<const char *> ACLMyPortName::RegistryEntry_(new ACLStringData, ACLMyPortNameStrategy::Instance(), "myportname");
126ACL::Prototype ACLPeerName::RegistryProtoype(&ACLPeerName::RegistryEntry_, "peername");
127ACLStrategised<const char *> ACLPeerName::RegistryEntry_(new ACLStringData, ACLPeerNameStrategy::Instance(), "peername");
16bdd4c0
AJ
128ACL::Prototype ACLPeerName::RegexRegistryProtoype(&ACLPeerName::RegexRegistryEntry_, "peername_regex");
129ACLStrategised<char const *> ACLPeerName::RegexRegistryEntry_(new ACLRegexData, ACLPeerNameStrategy::Instance(), "peername_regex");
2d46f579 130ACL::Prototype ACLProtocol::RegistryProtoype(&ACLProtocol::RegistryEntry_, "proto");
0c3d3f65 131ACLStrategised<AnyP::ProtocolType> ACLProtocol::RegistryEntry_(new ACLProtocolData, ACLProtocolStrategy::Instance(), "proto");
cb1b906f
AJ
132ACL::Prototype ACLRandom::RegistryProtoype(&ACLRandom::RegistryEntry_, "random");
133ACLRandom ACLRandom::RegistryEntry_("random");
2d46f579
AR
134ACL::Prototype ACLReferer::RegistryProtoype(&ACLReferer::RegistryEntry_, "referer_regex");
135ACLStrategised<char const *> ACLReferer::RegistryEntry_(new ACLRegexData, ACLRequestHeaderStrategy<HDR_REFERER>::Instance(), "referer_regex");
136ACL::Prototype ACLReplyMIMEType::RegistryProtoype(&ACLReplyMIMEType::RegistryEntry_, "rep_mime_type");
137ACLStrategised<char const *> ACLReplyMIMEType::RegistryEntry_(new ACLRegexData, ACLReplyHeaderStrategy<HDR_CONTENT_TYPE>::Instance(), "rep_mime_type");
138ACL::Prototype ACLRequestMIMEType::RegistryProtoype(&ACLRequestMIMEType::RegistryEntry_, "req_mime_type");
139ACLStrategised<char const *> ACLRequestMIMEType::RegistryEntry_(new ACLRegexData, ACLRequestHeaderStrategy<HDR_CONTENT_TYPE>::Instance(), "req_mime_type");
140ACL::Prototype ACLSourceDomain::LiteralRegistryProtoype(&ACLSourceDomain::LiteralRegistryEntry_, "srcdomain");
141ACLStrategised<char const *> ACLSourceDomain::LiteralRegistryEntry_(new ACLDomainData, ACLSourceDomainStrategy::Instance(), "srcdomain");
142ACL::Prototype ACLSourceDomain::RegexRegistryProtoype(&ACLSourceDomain::RegexRegistryEntry_, "srcdom_regex");
143ACLStrategised<char const *> ACLSourceDomain::RegexRegistryEntry_(new ACLRegexData,ACLSourceDomainStrategy::Instance() ,"srcdom_regex");
144ACL::Prototype ACLSourceIP::RegistryProtoype(&ACLSourceIP::RegistryEntry_, "src");
145ACLSourceIP ACLSourceIP::RegistryEntry_;
146ACL::Prototype ACLTime::RegistryProtoype(&ACLTime::RegistryEntry_, "time");
147ACLStrategised<time_t> ACLTime::RegistryEntry_(new ACLTimeData, ACLTimeStrategy::Instance(), "time");
148ACL::Prototype ACLUrl::RegistryProtoype(&ACLUrl::RegistryEntry_, "url_regex");
149ACLStrategised<char const *> ACLUrl::RegistryEntry_(new ACLRegexData, ACLUrlStrategy::Instance(), "url_regex");
9d35fe37
AJ
150ACL::Prototype ACLUrlLogin::RegistryProtoype(&ACLUrlLogin::RegistryEntry_, "urllogin");
151ACLStrategised<char const *> ACLUrlLogin::RegistryEntry_(new ACLRegexData, ACLUrlLoginStrategy::Instance(), "urllogin");
2d46f579
AR
152ACL::Prototype ACLUrlPath::LegacyRegistryProtoype(&ACLUrlPath::RegistryEntry_, "pattern");
153ACL::Prototype ACLUrlPath::RegistryProtoype(&ACLUrlPath::RegistryEntry_, "urlpath_regex");
154ACLStrategised<char const *> ACLUrlPath::RegistryEntry_(new ACLRegexData, ACLUrlPathStrategy::Instance(), "urlpath_regex");
155ACL::Prototype ACLUrlPort::RegistryProtoype(&ACLUrlPort::RegistryEntry_, "port");
156ACLStrategised<int> ACLUrlPort::RegistryEntry_(new ACLIntRange, ACLUrlPortStrategy::Instance(), "port");
157
cb4f4424 158#if USE_OPENSSL
af6a12ee 159ACL::Prototype ACLSslError::RegistryProtoype(&ACLSslError::RegistryEntry_, "ssl_error");
62a7607e 160ACLStrategised<const Ssl::CertErrors *> ACLSslError::RegistryEntry_(new ACLSslErrorData, ACLSslErrorStrategy::Instance(), "ssl_error");
af6a12ee 161ACL::Prototype ACLCertificate::UserRegistryProtoype(&ACLCertificate::UserRegistryEntry_, "user_cert");
00352183 162ACLStrategised<X509 *> ACLCertificate::UserRegistryEntry_(new ACLCertificateData (Ssl::GetX509UserAttribute, "*"), ACLCertificateStrategy::Instance(), "user_cert");
af6a12ee 163ACL::Prototype ACLCertificate::CARegistryProtoype(&ACLCertificate::CARegistryEntry_, "ca_cert");
00352183 164ACLStrategised<X509 *> ACLCertificate::CARegistryEntry_(new ACLCertificateData (Ssl::GetX509CAAttribute, "*"), ACLCertificateStrategy::Instance(), "ca_cert");
72b12f9e
CT
165ACL::Prototype ACLServerCertificate::X509FingerprintRegistryProtoype(&ACLServerCertificate::X509FingerprintRegistryEntry_, "server_cert_fingerprint");
166ACLStrategised<X509 *> ACLServerCertificate::X509FingerprintRegistryEntry_(new ACLCertificateData(Ssl::GetX509Fingerprint, "-sha1", true), ACLServerCertificateStrategy::Instance(), "server_cert_fingerprint");
5d65362c 167
652fcffd
AR
168ACL::Prototype ACLAtStep::RegistryProtoype(&ACLAtStep::RegistryEntry_, "at_step");
169ACLStrategised<Ssl::BumpStep> ACLAtStep::RegistryEntry_(new ACLAtStepData, ACLAtStepStrategy::Instance(), "at_step");
2d46f579
AR
170#endif
171
32d002cb 172#if USE_SQUID_EUI
af6a12ee
AJ
173ACL::Prototype ACLARP::RegistryProtoype(&ACLARP::RegistryEntry_, "arp");
174ACLARP ACLARP::RegistryEntry_("arp");
a98c2da5
AJ
175ACL::Prototype ACLEui64::RegistryProtoype(&ACLEui64::RegistryEntry_, "eui64");
176ACLEui64 ACLEui64::RegistryEntry_("eui64");
2d46f579
AR
177#endif
178
ee326f02 179#if USE_IDENT
af6a12ee
AJ
180ACL::Prototype ACLIdent::UserRegistryProtoype(&ACLIdent::UserRegistryEntry_, "ident");
181ACLIdent ACLIdent::UserRegistryEntry_(new ACLUserData, "ident");
182ACL::Prototype ACLIdent::RegexRegistryProtoype(&ACLIdent::RegexRegistryEntry_, "ident_regex" );
183ACLIdent ACLIdent::RegexRegistryEntry_(new ACLRegexData, "ident_regex");
2d46f579
AR
184#endif
185
2f1431ea 186#if USE_AUTH
abca32cf
CT
187ACL::Prototype ACLProxyAuth::UserRegistryProtoype(&ACLProxyAuth::UserRegistryEntry_, "proxy_auth");
188ACLProxyAuth ACLProxyAuth::UserRegistryEntry_(new ACLUserData, "proxy_auth");
189ACL::Prototype ACLProxyAuth::RegexRegistryProtoype(&ACLProxyAuth::RegexRegistryEntry_, "proxy_auth_regex" );
190ACLProxyAuth ACLProxyAuth::RegexRegistryEntry_(new ACLRegexData, "proxy_auth_regex");
2d46f579 191
abca32cf
CT
192ACL::Prototype ACLMaxUserIP::RegistryProtoype(&ACLMaxUserIP::RegistryEntry_, "max_user_ip");
193ACLMaxUserIP ACLMaxUserIP::RegistryEntry_("max_user_ip");
2f1431ea 194#endif
bb5e7a79
AJ
195
196ACL::Prototype ACLTag::RegistryProtoype(&ACLTag::RegistryEntry_, "tag");
197ACLStrategised<const char *> ACLTag::RegistryEntry_(new ACLStringData, ACLTagStrategy::Instance(), "tag");
6f58d7d7
AR
198
199ACL::Prototype Acl::AnyOf::RegistryProtoype(&Acl::AnyOf::RegistryEntry_, "any-of");
200Acl::AnyOf Acl::AnyOf::RegistryEntry_;
201
202ACL::Prototype Acl::AllOf::RegistryProtoype(&Acl::AllOf::RegistryEntry_, "all-of");
203Acl::AllOf Acl::AllOf::RegistryEntry_;
44b364a3 204
39baccc8
CT
205ACL::Prototype ACLNote::RegistryProtoype(&ACLNote::RegistryEntry_, "note");
206ACLStrategised<HttpRequest *> ACLNote::RegistryEntry_(new ACLNoteData, ACLNoteStrategy::Instance(), "note");
c302ddb5
CT
207
208#if USE_ADAPTATION
209ACL::Prototype ACLAdaptationService::RegistryProtoype(&ACLAdaptationService::RegistryEntry_, "adaptation_service");
210ACLStrategised<const char *> ACLAdaptationService::RegistryEntry_(new ACLAdaptationServiceData, ACLAdaptationServiceStrategy::Instance(), "adaptation_service");
211#endif