]> git.ipfire.org Git - thirdparty/squid.git/blob - src/AclRegs.cc
Merged from trunk (r12132, v3.2.0.17+)
[thirdparty/squid.git] / src / AclRegs.cc
1 #include "squid-old.h"
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
8 #include "acl/Acl.h"
9 #if USE_SQUID_EUI
10 #include "acl/Arp.h"
11 #include "acl/Eui64.h"
12 #endif
13 #include "acl/Asn.h"
14 #include "acl/Browser.h"
15 #include "acl/Checklist.h"
16 #include "acl/Data.h"
17 #include "acl/DestinationAsn.h"
18 #include "acl/DestinationDomain.h"
19 #include "acl/DestinationIp.h"
20 #include "acl/DomainData.h"
21 #if USE_AUTH
22 #include "acl/ExtUser.h"
23 #endif
24 #include "acl/FilledChecklist.h"
25 #include "acl/Gadgets.h"
26 #include "acl/HierCodeData.h"
27 #include "acl/HierCode.h"
28 #include "acl/HttpHeaderData.h"
29 #include "acl/HttpRepHeader.h"
30 #include "acl/HttpReqHeader.h"
31 #include "acl/HttpStatus.h"
32 #include "acl/IntRange.h"
33 #include "acl/Ip.h"
34 #include "acl/LocalIp.h"
35 #include "acl/LocalPort.h"
36 #include "acl/MaxConnection.h"
37 #include "acl/MethodData.h"
38 #include "acl/Method.h"
39 #include "acl/MyPortName.h"
40 #include "acl/PeerName.h"
41 #include "acl/ProtocolData.h"
42 #include "acl/Protocol.h"
43 #include "acl/Random.h"
44 #include "acl/Referer.h"
45 #include "acl/RegexData.h"
46 #include "acl/ReplyHeaderStrategy.h"
47 #include "acl/ReplyMimeType.h"
48 #include "acl/RequestHeaderStrategy.h"
49 #include "acl/RequestMimeType.h"
50 #include "acl/SourceAsn.h"
51 #include "acl/SourceDomain.h"
52 #include "acl/SourceIp.h"
53 #if USE_SSL
54 #include "acl/SslErrorData.h"
55 #include "acl/SslError.h"
56 #include "acl/CertificateData.h"
57 #include "acl/Certificate.h"
58 #endif
59 #include "acl/Strategised.h"
60 #include "acl/Strategy.h"
61 #include "acl/StringData.h"
62 #include "acl/Tag.h"
63 #include "acl/TimeData.h"
64 #include "acl/Time.h"
65 #include "acl/Url.h"
66 #include "acl/UrlPath.h"
67 #include "acl/UrlPort.h"
68 #include "acl/UserData.h"
69 #if USE_AUTH
70 #include "auth/AclProxyAuth.h"
71 #include "auth/AclMaxUserIp.h"
72 #endif
73 #if USE_IDENT
74 #include "ident/AclIdent.h"
75 #endif
76
77
78 ACL::Prototype ACLBrowser::RegistryProtoype(&ACLBrowser::RegistryEntry_, "browser");
79 ACLStrategised<char const *> ACLBrowser::RegistryEntry_(new ACLRegexData, ACLRequestHeaderStrategy<HDR_USER_AGENT>::Instance(), "browser");
80 ACL::Prototype ACLDestinationDomain::LiteralRegistryProtoype(&ACLDestinationDomain::LiteralRegistryEntry_, "dstdomain");
81 ACLStrategised<char const *> ACLDestinationDomain::LiteralRegistryEntry_(new ACLDomainData, ACLDestinationDomainStrategy::Instance(), "dstdomain");
82 ACL::Prototype ACLDestinationDomain::RegexRegistryProtoype(&ACLDestinationDomain::RegexRegistryEntry_, "dstdom_regex");
83 ACLStrategised<char const *> ACLDestinationDomain::RegexRegistryEntry_(new ACLRegexData,ACLDestinationDomainStrategy::Instance() ,"dstdom_regex");
84 ACL::Prototype ACLDestinationIP::RegistryProtoype(&ACLDestinationIP::RegistryEntry_, "dst");
85 ACLDestinationIP ACLDestinationIP::RegistryEntry_;
86 #if USE_AUTH
87 ACL::Prototype ACLExtUser::UserRegistryProtoype(&ACLExtUser::UserRegistryEntry_, "ext_user");
88 ACLExtUser ACLExtUser::UserRegistryEntry_(new ACLUserData, "ext_user");
89 ACL::Prototype ACLExtUser::RegexRegistryProtoype(&ACLExtUser::RegexRegistryEntry_, "ext_user_regex" );
90 ACLExtUser ACLExtUser::RegexRegistryEntry_(new ACLRegexData, "ext_user_regex");
91 #endif
92 ACL::Prototype ACLHierCode::RegistryProtoype(&ACLHierCode::RegistryEntry_, "hier_code");
93 ACLStrategised<hier_code> ACLHierCode::RegistryEntry_(new ACLHierCodeData, ACLHierCodeStrategy::Instance(), "hier_code");
94 ACL::Prototype ACLHTTPRepHeader::RegistryProtoype(&ACLHTTPRepHeader::RegistryEntry_, "rep_header");
95 ACLStrategised<HttpHeader*> ACLHTTPRepHeader::RegistryEntry_(new ACLHTTPHeaderData, ACLHTTPRepHeaderStrategy::Instance(), "rep_header");
96 ACL::Prototype ACLHTTPReqHeader::RegistryProtoype(&ACLHTTPReqHeader::RegistryEntry_, "req_header");
97 ACLStrategised<HttpHeader*> ACLHTTPReqHeader::RegistryEntry_(new ACLHTTPHeaderData, ACLHTTPReqHeaderStrategy::Instance(), "req_header");
98 ACL::Prototype ACLHTTPStatus::RegistryProtoype(&ACLHTTPStatus::RegistryEntry_, "http_status");
99 ACLHTTPStatus ACLHTTPStatus::RegistryEntry_("http_status");
100 ACL::Prototype ACLMaxConnection::RegistryProtoype(&ACLMaxConnection::RegistryEntry_, "maxconn");
101 ACLMaxConnection ACLMaxConnection::RegistryEntry_("maxconn");
102 ACL::Prototype ACLMethod::RegistryProtoype(&ACLMethod::RegistryEntry_, "method");
103 ACLStrategised<HttpRequestMethod> ACLMethod::RegistryEntry_(new ACLMethodData, ACLMethodStrategy::Instance(), "method");
104 ACL::Prototype ACLLocalIP::RegistryProtoype(&ACLLocalIP::RegistryEntry_, "localip");
105 ACLLocalIP ACLLocalIP::RegistryEntry_;
106 ACL::Prototype ACLLocalPort::RegistryProtoype(&ACLLocalPort::RegistryEntry_, "localport");
107 ACLStrategised<int> ACLLocalPort::RegistryEntry_(new ACLIntRange, ACLLocalPortStrategy::Instance(), "localport");
108 ACL::Prototype ACLMyPortName::RegistryProtoype(&ACLMyPortName::RegistryEntry_, "myportname");
109 ACLStrategised<const char *> ACLMyPortName::RegistryEntry_(new ACLStringData, ACLMyPortNameStrategy::Instance(), "myportname");
110 ACL::Prototype ACLPeerName::RegistryProtoype(&ACLPeerName::RegistryEntry_, "peername");
111 ACLStrategised<const char *> ACLPeerName::RegistryEntry_(new ACLStringData, ACLPeerNameStrategy::Instance(), "peername");
112 ACL::Prototype ACLProtocol::RegistryProtoype(&ACLProtocol::RegistryEntry_, "proto");
113 ACLStrategised<AnyP::ProtocolType> ACLProtocol::RegistryEntry_(new ACLProtocolData, ACLProtocolStrategy::Instance(), "proto");
114 ACL::Prototype ACLRandom::RegistryProtoype(&ACLRandom::RegistryEntry_, "random");
115 ACLRandom ACLRandom::RegistryEntry_("random");
116 ACL::Prototype ACLReferer::RegistryProtoype(&ACLReferer::RegistryEntry_, "referer_regex");
117 ACLStrategised<char const *> ACLReferer::RegistryEntry_(new ACLRegexData, ACLRequestHeaderStrategy<HDR_REFERER>::Instance(), "referer_regex");
118 ACL::Prototype ACLReplyMIMEType::RegistryProtoype(&ACLReplyMIMEType::RegistryEntry_, "rep_mime_type");
119 ACLStrategised<char const *> ACLReplyMIMEType::RegistryEntry_(new ACLRegexData, ACLReplyHeaderStrategy<HDR_CONTENT_TYPE>::Instance(), "rep_mime_type");
120 ACL::Prototype ACLRequestMIMEType::RegistryProtoype(&ACLRequestMIMEType::RegistryEntry_, "req_mime_type");
121 ACLStrategised<char const *> ACLRequestMIMEType::RegistryEntry_(new ACLRegexData, ACLRequestHeaderStrategy<HDR_CONTENT_TYPE>::Instance(), "req_mime_type");
122 ACL::Prototype ACLSourceDomain::LiteralRegistryProtoype(&ACLSourceDomain::LiteralRegistryEntry_, "srcdomain");
123 ACLStrategised<char const *> ACLSourceDomain::LiteralRegistryEntry_(new ACLDomainData, ACLSourceDomainStrategy::Instance(), "srcdomain");
124 ACL::Prototype ACLSourceDomain::RegexRegistryProtoype(&ACLSourceDomain::RegexRegistryEntry_, "srcdom_regex");
125 ACLStrategised<char const *> ACLSourceDomain::RegexRegistryEntry_(new ACLRegexData,ACLSourceDomainStrategy::Instance() ,"srcdom_regex");
126 ACL::Prototype ACLSourceIP::RegistryProtoype(&ACLSourceIP::RegistryEntry_, "src");
127 ACLSourceIP ACLSourceIP::RegistryEntry_;
128 ACL::Prototype ACLTime::RegistryProtoype(&ACLTime::RegistryEntry_, "time");
129 ACLStrategised<time_t> ACLTime::RegistryEntry_(new ACLTimeData, ACLTimeStrategy::Instance(), "time");
130 ACL::Prototype ACLUrl::RegistryProtoype(&ACLUrl::RegistryEntry_, "url_regex");
131 ACLStrategised<char const *> ACLUrl::RegistryEntry_(new ACLRegexData, ACLUrlStrategy::Instance(), "url_regex");
132 ACL::Prototype ACLUrlPath::LegacyRegistryProtoype(&ACLUrlPath::RegistryEntry_, "pattern");
133 ACL::Prototype ACLUrlPath::RegistryProtoype(&ACLUrlPath::RegistryEntry_, "urlpath_regex");
134 ACLStrategised<char const *> ACLUrlPath::RegistryEntry_(new ACLRegexData, ACLUrlPathStrategy::Instance(), "urlpath_regex");
135 ACL::Prototype ACLUrlPort::RegistryProtoype(&ACLUrlPort::RegistryEntry_, "port");
136 ACLStrategised<int> ACLUrlPort::RegistryEntry_(new ACLIntRange, ACLUrlPortStrategy::Instance(), "port");
137
138 #if USE_SSL
139 ACL::Prototype ACLSslError::RegistryProtoype(&ACLSslError::RegistryEntry_, "ssl_error");
140 ACLStrategised<const Ssl::Errors *> ACLSslError::RegistryEntry_(new ACLSslErrorData, ACLSslErrorStrategy::Instance(), "ssl_error");
141 ACL::Prototype ACLCertificate::UserRegistryProtoype(&ACLCertificate::UserRegistryEntry_, "user_cert");
142 ACLStrategised<SSL *> ACLCertificate::UserRegistryEntry_(new ACLCertificateData (sslGetUserAttribute), ACLCertificateStrategy::Instance(), "user_cert");
143 ACL::Prototype ACLCertificate::CARegistryProtoype(&ACLCertificate::CARegistryEntry_, "ca_cert");
144 ACLStrategised<SSL *> ACLCertificate::CARegistryEntry_(new ACLCertificateData (sslGetCAAttribute), ACLCertificateStrategy::Instance(), "ca_cert");
145 #endif
146
147 #if USE_SQUID_EUI
148 ACL::Prototype ACLARP::RegistryProtoype(&ACLARP::RegistryEntry_, "arp");
149 ACLARP ACLARP::RegistryEntry_("arp");
150 ACL::Prototype ACLEui64::RegistryProtoype(&ACLEui64::RegistryEntry_, "eui64");
151 ACLEui64 ACLEui64::RegistryEntry_("eui64");
152 #endif
153
154 #if USE_IDENT
155 ACL::Prototype ACLIdent::UserRegistryProtoype(&ACLIdent::UserRegistryEntry_, "ident");
156 ACLIdent ACLIdent::UserRegistryEntry_(new ACLUserData, "ident");
157 ACL::Prototype ACLIdent::RegexRegistryProtoype(&ACLIdent::RegexRegistryEntry_, "ident_regex" );
158 ACLIdent ACLIdent::RegexRegistryEntry_(new ACLRegexData, "ident_regex");
159 #endif
160
161 #if USE_AUTH
162 ACL::Prototype ACLProxyAuth::UserRegistryProtoype(&ACLProxyAuth::UserRegistryEntry_, "proxy_auth");
163 ACLProxyAuth ACLProxyAuth::UserRegistryEntry_(new ACLUserData, "proxy_auth");
164 ACL::Prototype ACLProxyAuth::RegexRegistryProtoype(&ACLProxyAuth::RegexRegistryEntry_, "proxy_auth_regex" );
165 ACLProxyAuth ACLProxyAuth::RegexRegistryEntry_(new ACLRegexData, "proxy_auth_regex");
166
167 ACL::Prototype ACLMaxUserIP::RegistryProtoype(&ACLMaxUserIP::RegistryEntry_, "max_user_ip");
168 ACLMaxUserIP ACLMaxUserIP::RegistryEntry_("max_user_ip");
169 #endif
170
171 ACL::Prototype ACLTag::RegistryProtoype(&ACLTag::RegistryEntry_, "tag");
172 ACLStrategised<const char *> ACLTag::RegistryEntry_(new ACLStringData, ACLTagStrategy::Instance(), "tag");