cache_cf.cc
Go to the documentation of this file.
125 static void dump_icap_service_type(StoreEntry *, const char *, const Adaptation::Icap::Config &);
131 static void dump_icap_service_failure_limit(StoreEntry *, const char *, const Adaptation::Icap::Config &);
137 static void dump_ecap_service_type(StoreEntry *, const char *, const Adaptation::Ecap::Config &);
165 static void dump_cache_log_message(StoreEntry *entry, const char *name, const DebugMessages *messages);
190 static void dump_http_header_access(StoreEntry * entry, const char *name, const HeaderManglers *manglers);
193 static void dump_http_header_replace(StoreEntry * entry, const char *name, const HeaderManglers *manglers);
197 static void dump_HeaderWithAclList(StoreEntry * entry, const char *name, HeaderWithAclList *headers);
223 static void dump_sslproxy_cert_sign(StoreEntry *entry, const char *name, sslproxy_cert_sign *cert_sign);
226 static void dump_sslproxy_cert_adapt(StoreEntry *entry, const char *name, sslproxy_cert_adapt *cert_adapt);
241 static void dump_CpuAffinityMap(StoreEntry *const entry, const char *const name, const CpuAffinityMap *const cpuAffinityMap);
251 static void dump_configuration_includes_quoted_values(StoreEntry *const entry, const char *const name, bool recognizeQuotedValues);
254 static void dump_on_unsupported_protocol(StoreEntry *entry, const char *name, acl_access *access);
256 static void ParseAclWithAction(acl_access **access, const Acl::Answer &action, const char *desc, Acl::Node *acl = nullptr);
258 static void dump_http_upgrade_request_protocols(StoreEntry *entry, const char *name, HttpUpgradeProtocolAccess *protoGuards);
341 ReplaceSubstr(char*& str, int& len, unsigned substrIdx, unsigned substrLen, const char* newSubstr)
351 memmove(str + substrIdx + newSubstrLen, str + substrIdx + substrLen, len - substrIdx - substrLen + 1);
457 debugs(3, Important(68), "Processing Configuration File: " << file_name << " (depth " << depth << ")");
566 } else if (if_states.empty() || if_states.back()) { // test last if-statement meaning if present
625 throw TextException(ToSBuf("Found ", unrecognizedDirectives, " unrecognized directive(s)"), Here());
725 debugs(3, DBG_CRITICAL, "WARNING: This Squid binary can not handle files larger than 2GB. Limiting maximum_object_size to just below 2GB");
758 debugs(0, DBG_IMPORTANT, "WARNING: max_filedescriptors disabled. Operating System setrlimit(RLIMIT_NOFILE) is missing.");
762 debugs(0, DBG_IMPORTANT, "WARNING: max_filedescriptors limited to " << FD_SETSIZE << " by select() algorithm.");
834 debugs(22, DBG_IMPORTANT, "WARNING: use of 'override-expire' in 'refresh_pattern' violates HTTP");
843 debugs(22, DBG_IMPORTANT, "WARNING: use of 'override-lastmod' in 'refresh_pattern' violates HTTP");
852 debugs(22, DBG_IMPORTANT, "WARNING: use of 'reload-into-ims' in 'refresh_pattern' violates HTTP");
861 debugs(22, DBG_IMPORTANT, "WARNING: use of 'ignore-reload' in 'refresh_pattern' violates HTTP");
870 debugs(22, DBG_IMPORTANT, "WARNING: use of 'ignore-no-store' in 'refresh_pattern' violates HTTP");
879 debugs(22, DBG_IMPORTANT, "WARNING: use of 'ignore-private' in 'refresh_pattern' violates HTTP");
963 Config.ssl_client.sslContext_ = rawSslContext ? new Security::ContextPointer(rawSslContext) : nullptr;
974 Config.ssl_client.defaultPeerContext = new Security::FuturePeerContext(Security::ProxyOutgoingConfig(), *Config.ssl_client.sslContext_);
997 debugs(3, 2, "initializing " << AnyP::UriScheme(s->transport.protocol) << "_port " << s->s << " TLS contexts");
1013 // TODO: static_assert(safeRawHeaderValueSizeMax >= 64*1024); // no WARNINGs for default settings
1015 debugs(3, DBG_CRITICAL, "WARNING: Increasing request_header_max_size beyond " << safeRawHeaderValueSizeMax <<
1016 " bytes makes Squid more vulnerable to denial-of-service attacks; configured value: " << Config.maxRequestHeaderSize << " bytes");
1018 debugs(3, DBG_CRITICAL, "WARNING: Increasing reply_header_max_size beyond " << safeRawHeaderValueSizeMax <<
1019 " bytes makes Squid more vulnerable to denial-of-service attacks; configured value: " << Config.maxReplyHeaderSize << " bytes");
1026 debugs(3, DBG_PARSE_NOTE(DBG_IMPORTANT), "WARNING: pipeline_prefetch " << Config.pipeline_max_prefetch <<
1043 debugs(3, DBG_PARSE_NOTE(DBG_IMPORTANT), "WARNING: pipeline_prefetch breaks NTLM and Negotiate authentication. Forced pipeline_prefetch 0.");
1051 debugs(3, DBG_CRITICAL, "auth_schemes: at least one scheme name is required; got: " << authSchemes.rawSchemes);
1071 debugs(3, DBG_CRITICAL, "WARNING: url_rewrite_concurrency upgrade overriding url_rewrite_children settings.");
1111 throw TextException(ToSBuf("missing required parameter for obsolete directive: ", name), Here());
1175 throw TexcHere(ToSBuf("time unit '", unitName, "' is too small to be used in this context, the minimal unit is ",
1189 const auto maxYears = std::chrono::duration_cast<std::chrono::hours>(std::chrono::nanoseconds::max()).count()/HoursPerYear;
1240 "the nanosecond-level precision implied by the configured value: " << parsedValue << ' ' << token);
1638 debugs(3, DBG_PARSE_NOTE(DBG_IMPORTANT), "WARNING: Tos value '" << tos << "' adjusted to '" << chTos << "'");
1684 if (mc.hasMask() && std::find(pkt_dirs.begin(), pkt_dirs.end(), cfg_directive) != pkt_dirs.end())
1853 debugs(3, DBG_CRITICAL, "" << cfg_filename << " line " << config_lineno << ": " << config_input_line);
1892 debugs(3, DBG_CRITICAL, "" << cfg_filename << " line " << config_lineno << ": " << config_input_line);
1943 debugs(3, DBG_CRITICAL, "ERROR: Failure while parsing Config File: Unknown authentication scheme '" << type_str << "'.");
1951 debugs(3, DBG_CRITICAL, "Parsing Config File: Corruption configuring authentication scheme '" << type_str << "'.");
2012 ParseAclWithAction(acl_access **config, const Acl::Answer &action, const char *desc, Acl::Node *acl)
2300 throw TextException(ToSBuf("missing authentication support; required for userhash cache_peer ", *p), Here());
2312 debugs(0, DBG_CRITICAL, "WARNING: cache_peer option 'no-delay' requires --enable-delay-pools");
2345 debugs(0, DBG_CRITICAL, "WARNING: cache_peer option '" << token << "' requires --with-openssl");
2371 debugs(3, DBG_PARSE_NOTE(DBG_IMPORTANT), "ERROR: Ignoring unknown cache_peer option '" << token << "'");
2457 debugs(0, DBG_PARSE_NOTE(1), "ERROR: action '" << u << "' (line " << config_lineno << ") already has a password");
2590 debugs(0, DBG_PARSE_NOTE(DBG_IMPORTANT), "WARNING: 'enable' is deprecated. Please update to use 'on'.");
2595 debugs(0, DBG_PARSE_NOTE(DBG_IMPORTANT), "WARNING: 'disable' is deprecated. Please update to use 'off'.");
2598 debugs(0, DBG_PARSE_NOTE(DBG_IMPORTANT), "ERROR: Invalid option: Boolean options can only be 'on' or 'off'.");
2632 debugs(0, DBG_PARSE_NOTE(DBG_IMPORTANT), "WARNING: 'enable' is deprecated. Please update to use value 'on'.");
2639 debugs(0, DBG_PARSE_NOTE(DBG_IMPORTANT), "WARNING: 'disable' is deprecated. Please update to use value 'off'.");
2642 debugs(0, DBG_PARSE_NOTE(DBG_IMPORTANT), "ERROR: Invalid option: Tristate options can only be 'on', 'off', or 'warn'.");
2659 debugs(0, DBG_PARSE_NOTE(DBG_IMPORTANT), "WARNING: 'pipeline_prefetch on' is deprecated. Please update to use 1 (or a higher number).");
2664 debugs(0, DBG_PARSE_NOTE(2), "WARNING: 'pipeline_prefetch off' is deprecated. Please update to use '0'.");
2749 debugs(3, DBG_IMPORTANT, "WARNING: refresh_pattern minimum age negative. Cropped back to zero.");
2753 debugs(3, DBG_IMPORTANT, "WARNING: refresh_pattern minimum age too high. Cropped back to 1 year.");
2765 debugs(3, DBG_IMPORTANT, "WARNING: refresh_pattern maximum age negative. Cropped back to zero.");
2769 debugs(3, DBG_IMPORTANT, "WARNING: refresh_pattern maximum age too high. Cropped back to 1 year.");
2808 debugs(22, DBG_PARSE_NOTE(2), "UPGRADE: refresh_pattern option '" << token << "' is obsolete. Remove it.");
2956 throw TexcHere(ToSBuf("directive supports time values up to ", maxTime, " but is given ", seconds.count(), " seconds"));
2989 dump_time_nanoseconds(StoreEntry *entry, const char *name, const std::chrono::nanoseconds &var)
2991 // std::chrono::nanoseconds::rep is unknown a priori so we cast to (and print) the largest supported integer
3170 debugs(0, DBG_PARSE_NOTE(2), "ERROR: Invalid option '" << token << "': 'uri_whitespace' accepts 'strip', 'deny', 'allow', 'encode', and 'chop'.");
3282 debugs(0, DBG_PARSE_NOTE(2), "ERROR: Invalid option '" << token << "': 'memory_cache_mode' accepts 'always', 'disk', 'network', and 'never'.");
3404 debugs(3, DBG_CRITICAL, "FATAL: " << portType << "_port: missing ']' on IPv6 address: " << token);
3460 debugs(3, 3, portType << "_port: found Listen as Host " << s->defaultsite << " on IP: " << s->s);
3462 debugs(3, DBG_CRITICAL, "FATAL: " << portType << "_port: failed to resolve Host/IP: " << host);
3484 fatalf("%s directive does not support protocol=" SQUIDSBUFPH "\n", cfg_directive, SQUIDSBUFPRINT(value));
3495 debugs(3, DBG_CRITICAL, "FATAL: " << cfg_directive << ": Accelerator mode requires its own port. It cannot be shared with other modes.");
3503 debugs(3, DBG_CRITICAL, "FATAL: " << cfg_directive << ": Intercept mode requires its own interception port. It cannot be shared with other modes.");
3511 debugs(3, DBG_IMPORTANT, "Disabling Authentication on port " << s->s << " (interception enabled)");
3514 debugs(3,DBG_CRITICAL, "FATAL: " << cfg_directive << ": TPROXY option requires its own interception port. It cannot be shared with other modes.");
3524 debugs(3, DBG_IMPORTANT, "Disabling TPROXY Spoofing on port " << s->s << " (require-proxy-header enabled)");
3528 debugs(3, DBG_CRITICAL, "FATAL: " << cfg_directive << ": TPROXY support in the system does not work.");
3538 debugs(3, DBG_IMPORTANT, "Disabling TPROXY Spoofing on port " << s->s << " (require-proxy-header enabled)");
3543 debugs(3, DBG_CRITICAL, "FATAL: " << cfg_directive << ": defaultsite option requires Acceleration mode flag.");
3551 debugs(3, DBG_CRITICAL, "WARNING: " << cfg_directive << ": vhost option is deprecated. Use 'accel' mode flag instead.");
3557 debugs(3, DBG_IMPORTANT, "ERROR: " << cfg_directive << ": no-vhost option requires Acceleration mode flag.");
3562 debugs(3, DBG_CRITICAL, "FATAL: " << cfg_directive << ": vport option requires Acceleration mode flag.");
3569 debugs(3, DBG_CRITICAL, "FATAL: " << cfg_directive << ": vport option requires Acceleration mode flag.");
3576 debugs(3, DBG_CRITICAL, "FATAL: " << cfg_directive << ": protocol option requires Acceleration mode flag.");
3583 debugs(3, DBG_CRITICAL, "FATAL: " << cfg_directive << ": allow-direct option requires Acceleration mode flag.");
3590 debugs(3, DBG_IMPORTANT, "ERROR: " << cfg_directive << ": act-as-origin option requires Acceleration mode flag.");
3596 debugs(3, DBG_CRITICAL, "FATAL: " << cfg_directive << ": ignore-cc option requires Acceleration mode flag.");
3626 debugs(3, DBG_CRITICAL, "FATAL: " << cfg_directive << ": IPv6 addresses cannot be used as IPv4-Only. " << s->s );
3699 throw TexcHere(ToSBuf(cfg_directive, ' ', token, " option requires building Squid where SO_REUSEPORT is supported by the TCP stack"));
3760 debugs(3, DBG_CRITICAL, "FATAL: ssl-bump on https_port requires tproxy/intercept which is missing.");
3765 debugs(3, DBG_CRITICAL, "FATAL: tproxy/intercept on https_port requires ssl-bump which is missing.");
3771 debugs(3,DBG_CRITICAL, "FATAL: https_port: require-proxy-header option is not supported on HTTPS ports.");
3792 debugs(3, DBG_CRITICAL, "FATAL: " << AnyP::UriScheme(s->transport.protocol) << "_port requires a cert= parameter");
3886 storeAppendPrintf(e, " tcpkeepalive=%d,%d,%d", s->tcp_keepalive.idle, s->tcp_keepalive.interval, s->tcp_keepalive.timeout);
3939 debugs(0, DBG_CRITICAL, (opt_parse_cfg_only?"FATAL: ":"ERROR: ") << name << " " << path << ": " << xstrerr(xerrno));
4112 dump_CpuAffinityMap(StoreEntry *const entry, const char *const name, const CpuAffinityMap *const cpuAffinityMap)
4172 dump_icap_service_type(StoreEntry * entry, const char *name, const Adaptation::Icap::Config &cfg)
4210 dump_ecap_service_type(StoreEntry * entry, const char *name, const Adaptation::Ecap::Config &cfg)
4235 static void dump_icap_service_failure_limit(StoreEntry *entry, const char *name, const Adaptation::Icap::Config &cfg)
4285 debugs(3, DBG_CRITICAL, "FATAL: sslproxy_cert_adapt: setCommonName{" <<param << "} : using common name longer than 64 bytes is not supported");
4292 debugs(3, DBG_CRITICAL, "FATAL: sslproxy_cert_adapt: unknown cert adaptation algorithm: " << al);
4305 static void dump_sslproxy_cert_adapt(StoreEntry *entry, const char *name, sslproxy_cert_adapt *cert_adapt)
4351 static void dump_sslproxy_cert_sign(StoreEntry *entry, const char *name, sslproxy_cert_sign *cert_sign)
4497 static void dump_HeaderWithAclList(StoreEntry * entry, const char *name, HeaderWithAclList *headers)
4604 throw TextException(ToSBuf("malformed cache_log_message ID range: ", key, '=', value), Here());
4627 throw TextException(ToSBuf("repeated or conflicting cache_log_message option: ", key, '=', value), Here());
4630 throw TextException("cache_log_message is missing a required id=... or ids=... option", Here());
4633 throw TextException("cache_log_message is missing a required level=... or limit=... option", Here());
4645 static void dump_cache_log_message(StoreEntry *entry, const char *name, const DebugMessages *debugMessages)
4701 debugs(3, DBG_CRITICAL, "FATAL: do not mix \"ftp_epsv on|off\" cfg lines with \"ftp_epsv allow|deny ...\" cfg lines. Update your ftp_epsv rules.");
4804 debugs(3, DBG_CRITICAL, "FATAL: Expected 'response=' option after 'on_timeout=use_configured_response' option");
4809 debugs(3, DBG_CRITICAL, "FATAL: 'response=' option is valid only when used with the 'on_timeout=use_configured_response' option");
4815 dump_UrlHelperTimeout(StoreEntry *entry, const char *name, SquidConfig::UrlHelperTimeout &config)
4854 dump_configuration_includes_quoted_values(StoreEntry *const entry, const char *const name, bool)
4924 dump_http_upgrade_request_protocols(StoreEntry *entry, const char *rawName, HttpUpgradeProtocolAccess *protoGuards)
static void parse_http_header_access(HeaderManglers **manglers)
Definition: cache_cf.cc:1848
Definition: wordlist.h:41
static void dump_wordlist(StoreEntry *entry, const char *name, wordlist *list)
Definition: cache_cf.cc:3118
static void dump_access_log(StoreEntry *entry, const char *name, CustomLog *definitions)
Definition: cache_cf.cc:4027
static const char * FindStatement(const char *line, const char *statement)
Definition: cache_cf.cc:388
static void parsePortSpecification(const AnyP::PortCfgPointer &s, char *token)
Definition: cache_cf.cc:3386
static void dump_icap_service_type(StoreEntry *, const char *, const Adaptation::Icap::Config &)
Definition: cache_cf.cc:4172
static void dump_time_msec(StoreEntry *entry, const char *name, time_msec_t var)
Definition: cache_cf.cc:2967
virtual bool active() const =0
static void ParseAccess(ConfigParser &parser)
Definition: Config.cc:284
static std::chrono::nanoseconds ToNanoSeconds(const double value, const std::chrono::nanoseconds &unit)
Definition: cache_cf.cc:1183
static void parse_TokenOrQuotedString(char **var)
Definition: cache_cf.cc:2927
void DumpNamedAcls(std::ostream &, const char *directiveName, NamedAcls *)
report the given list of "acl" directives (using squid.conf syntax)
Definition: Acl.cc:335
int opt_send_signal
void appendf(const char *fmt,...) PRINTF_FORMAT_ARG2
Append operation with printf-style arguments.
Definition: Packable.h:61
static void parse_icap_service_type(Adaptation::Icap::Config *)
Definition: cache_cf.cc:4160
Definition: ProxyCerts.h:38
bool xstrtoui(const char *s, char **end, unsigned int *value, unsigned int min, unsigned int max)
Definition: xstrto.cc:86
static T Parse(ConfigParser &)
creates a new T instance using the given parser; never returns nil
static void dump_tristate(StoreEntry *entry, const char *name, int var)
Definition: cache_cf.cc:2606
static void parse_http_upgrade_request_protocols(HttpUpgradeProtocolAccess **protoGuards)
Definition: cache_cf.cc:4914
static void dump_time_nanoseconds(StoreEntry *entry, const char *name, const std::chrono::nanoseconds &var)
Definition: cache_cf.cc:2989
static void free_CpuAffinityMap(CpuAffinityMap **const cpuAffinityMap)
Definition: cache_cf.cc:4130
static void parse_ecap_service_type(Adaptation::Ecap::Config *)
Definition: cache_cf.cc:4198
struct SquidConfig::@102 ssl_client
static void parse_delay_pool_class(DelayConfig *cfg)
Definition: cache_cf.cc:1778
Security::ContextPointer createClientContext(bool setOptions)
generate a security client-context from these configured options
Definition: PeerOptions.cc:276
static void dump_kb_int64_t(StoreEntry *entry, const char *name, int64_t var)
Definition: cache_cf.cc:3026
static int parseManyConfigFiles(char *files, int depth)
Definition: cache_cf.cc:311
Definition: Acl.h:53
static int parse_line(char *)
AnyP::ProtocolVersion ProtocolVersion()
Protocol version to use in Http::Message structures wrapping FTP messages.
Definition: Elements.cc:24
static void free_removalpolicy(RemovalPolicySettings **settings)
Definition: cache_cf.cc:3195
struct SquidConfig::@87 Accel
void log(char *format,...)
Definition: RemovalPolicy.h:19
static void free_cachemgrpasswd(Mgr::ActionPasswordList **head)
Definition: cache_cf.cc:2466
int KidIdentifier
Definition: ClientDelayConfig.h:54
void append(char const *, int) override
Appends a c-string to existing packed data.
Definition: store.cc:803
static void dump_acl(StoreEntry *entry, const char *directiveName, Acl::NamedAcls *config)
Definition: cache_cf.cc:1482
static void free_sslproxy_ssl_bump(acl_access **ssl_bump)
Definition: cache_cf.cc:4490
Definition: dns_internal.cc:189
static void dump_time_t(StoreEntry *entry, const char *name, time_t var)
Definition: cache_cf.cc:2944
static void dump_ftp_epsv(StoreEntry *entry, const char *name, acl_access *ftp_epsv)
Definition: cache_cf.cc:4726
Note::Pointer parse(ConfigParser &parser)
Parses a notes line and returns a pointer to the parsed Note object.
Definition: Notes.cc:210
static void dump_http_upgrade_request_protocols(StoreEntry *entry, const char *name, HttpUpgradeProtocolAccess *protoGuards)
Definition: cache_cf.cc:4924
Security::FuturePeerContext * defaultPeerContext
Definition: SquidConfig.h:506
Definition: CachePeer.h:28
const char * ProtocolType_str[]
static void dump_sslproxy_ssl_bump(StoreEntry *entry, const char *name, acl_access *ssl_bump)
Definition: cache_cf.cc:4482
static bool RecognizeQuotedValues
configuration_includes_quoted_values in squid.conf
Definition: ConfigParser.h:152
static void dump_onoff(StoreEntry *entry, const char *name, int var)
Definition: cache_cf.cc:2573
static void dump_int(StoreEntry *entry, const char *name, int var)
Definition: cache_cf.cc:2533
void parseBytesOptionValue(size_t *bptr, const char *units, char const *value)
Parse bytes number from a string.
Definition: cache_cf.cc:1394
static void dump_authparam(StoreEntry *entry, const char *name, Auth::ConfigVector cfg)
Definition: cache_cf.cc:1973
SBuf service_name(APP_SHORTNAME)
Definition: SquidConfig.h:532
static void free_cache_log_message(DebugMessages **messages)
Definition: cache_cf.cc:4665
static void free_client_delay_pool_count(ClientDelayConfig *cfg)
Definition: cache_cf.cc:1809
static void dump_AuthSchemes(StoreEntry *entry, const char *name, acl_access *authSchemes)
Definition: cache_cf.cc:2001
static void dump_http_header_access(StoreEntry *entry, const char *name, const HeaderManglers *manglers)
Definition: cache_cf.cc:1841
void context(const SBuf &aName, const char *configuration)
sets user-specified ACL name and squid.conf context
Definition: Acl.cc:220
static void dump_http_header_replace(StoreEntry *entry, const char *name, const HeaderManglers *manglers)
Definition: cache_cf.cc:1880
Definition: PackableStream.h:75
A combination of PeerOptions and the corresponding Context.
Definition: PeerOptions.h:154
static void dump_cache_log_message(StoreEntry *entry, const char *name, const DebugMessages *messages)
Definition: cache_cf.cc:4645
void parsePoolAccess(ConfigParser &parser)
Definition: ClientDelayConfig.cc:95
static void dump_memcachemode(StoreEntry *entry, const char *name, SquidConfig &)
Definition: cache_cf.cc:3288
headerMangler * track(const char *name)
returns a mangler for the named header (known or custom)
Definition: HttpHeaderTools.cc:436
void dumpService(StoreEntry *, const char *) const
Definition: Config.cc:163
static void dump_UrlHelperTimeout(StoreEntry *, const char *, SquidConfig::UrlHelperTimeout &)
Definition: cache_cf.cc:4815
static void dump_CpuAffinityMap(StoreEntry *const entry, const char *const name, const CpuAffinityMap *const cpuAffinityMap)
Definition: cache_cf.cc:4112
char ThisCache[RFC2181_MAXHOSTNAMELEN<< 1]
std::unique_ptr< RegexPattern > regex(const char *expectedRegexDescription)
extracts and returns a regex (including any optional flags)
Definition: ConfigParser.cc:483
static void ParseNamedAcl(ConfigParser &, NamedAcls *&)
parses acl directive parts that follow directive name (i.e. "acl")
Definition: Acl.cc:229
Definition: UriScheme.h:31
static void parse_http_header_replace(HeaderManglers **manglers)
Definition: cache_cf.cc:1887
static NfMarkConfig Parse(const SBuf &token)
parses a token and returns an object, expects a "mark[/mask]" format
Definition: NfMarkConfig.cc:32
Definition: Config.h:25
static void parse_HeaderWithAclList(HeaderWithAclList **header)
Definition: cache_cf.cc:4510
static void parsePortCfg(AnyP::PortCfgPointer *, const char *protocol)
Definition: cache_cf.cc:3721
static void dump_delay_pool_count(StoreEntry *entry, const char *name, DelayConfig &cfg)
Definition: cache_cf.cc:1766
static void dump_cachedir(StoreEntry *entry, const char *name, const Store::DiskConfig &swap)
Definition: cache_cf.cc:1908
bool ResolveClientAddressesAsap
whether to do reverse DNS lookups for source IPs of accepted connections
Definition: fqdncache.cc:30
char * toStr(char *buf, const unsigned int blen, int force=AF_UNSPEC) const
Definition: Address.cc:812
ACLList * aclList
when the header field should be added (always if nil)
Definition: HttpHeaderTools.h:108
void requirePathnameExists(const char *name, const char *path)
Definition: cache_cf.cc:3925
#define TexcHere(msg)
legacy convenience macro; it is not difficult to type Here() now
Definition: TextException.h:63
static SchemeConfig * Find(const char *proxy_auth)
Definition: SchemeConfig.cc:59
struct SquidConfig2::@105 onoff
DefineRunnerRegistrator(sslBumpCfgRr)
struct SquidConfig::@91 Store
static void dump_icap_service_failure_limit(StoreEntry *, const char *, const Adaptation::Icap::Config &)
Definition: cache_cf.cc:4235
struct SquidConfig::@96 icons
static void dump_acl_b_size_t(StoreEntry *entry, const char *name, AclSizeLimit *head)
Definition: cache_cf.cc:1708
#define MAX_IPSTRLEN
Length of buffer that needs to be allocated to old a null-terminated IP-string.
Definition: forward.h:25
static void parse_configuration_includes_quoted_values(bool *recognizeQuotedValues)
Definition: cache_cf.cc:4838
static void parse_delay_pool_count(DelayConfig *cfg)
Definition: cache_cf.cc:1772
size_t DebugMessageId
an identifier for messages supporting configuration via cache_log_message
Definition: Messages.h:22
static void dump_denyinfo(StoreEntry *entry, const char *name, AclDenyInfoList *var)
Definition: cache_cf.cc:2473
size_t aclParseAclList(ConfigParser &, ACLList **config, const char *label)
Definition: Gadgets.cc:184
static void dump_cachemgrpasswd(StoreEntry *entry, const char *name, Mgr::ActionPasswordList *list)
Definition: cache_cf.cc:2414
DebugMessageId id
message identifier or, if the message has not been configured, zero
Definition: Messages.h:48
static void Print(std::ostream &, const T &)
reports the current T instance configuration in squid.conf format
static std::chrono::seconds ParseUrlRewriteTimeout()
Definition: cache_cf.cc:4741
Definition: PortCfg.h:23
Definition: SchemeConfig.h:46
static void parse_cache_log_message(DebugMessages **messages)
Definition: cache_cf.cc:4586
CachePeer * findCachePeerByName(const char *const name)
cache_peer with a given name (or nil)
Definition: neighbors.cc:1048
static void dump_b_int64_t(StoreEntry *entry, const char *name, int64_t var)
Definition: cache_cf.cc:3020
void configure(bool beSet)
enables or disables the option; updating to 'configured' state
Definition: YesNoNone.h:53
Definition: Notes.h:112
void dump_peer_options(StoreEntry *sentry, CachePeer *p)
Definition: neighbors.cc:1382
char ThisCache2[RFC2181_MAXHOSTNAMELEN<< 1]
Definition: RunnersRegistry.h:37
static void parse_sslproxy_cert_adapt(sslproxy_cert_adapt **cert_adapt)
Definition: cache_cf.cc:4252
void dump_acl_access(StoreEntry *entry, const char *name, acl_access *head)
Definition: cache_cf.cc:1510
static void dump_on_unsupported_protocol(StoreEntry *entry, const char *name, acl_access *access)
Definition: cache_cf.cc:4892
static void parse_sslproxy_cert_sign(sslproxy_cert_sign **cert_sign)
Definition: cache_cf.cc:4322
static Acl::Node * FindByName(const SBuf &)
A configured ACL with a given name or nil.
Definition: Acl.cc:159
static int parseOneConfigFile(const char *file_name, unsigned int depth)
Definition: cache_cf.cc:446
static void parse_client_delay_pool_rates(ClientDelayConfig *cfg)
Definition: cache_cf.cc:1827
static void parse_delay_pool_rates(DelayConfig *cfg)
Definition: cache_cf.cc:1784
static void free_icap_service_failure_limit(Adaptation::Icap::Config *)
Definition: cache_cf.cc:4244
void rejectDuplicateDirective()
rejects configuration due to a repeated directive
Definition: ConfigParser.cc:558
A collection of headerMangler objects for a given message kind.
Definition: HttpHeaderTools.h:47
static void dump_u_short(StoreEntry *entry, const char *name, unsigned short var)
Definition: cache_cf.cc:3081
int refresh_nocache_hack
static AnyP::ProtocolVersion parsePortProtocol(const SBuf &value)
Definition: cache_cf.cc:3471
static void ParseAclWithAction(acl_access **access, const Acl::Answer &action, const char *desc, Acl::Node *acl=nullptr)
Definition: cache_cf.cc:2012
static void SubstituteMacro(char *&line, int &len, const char *macroName, const char *substStr)
Definition: cache_cf.cc:359
representation of a neighbor_type_domain configuration directive. A POD
Definition: NeighborTypeDomainList.h:15
Definition: QosConfig.h:46
static void dump_client_delay_pool_count(StoreEntry *entry, const char *name, ClientDelayConfig &cfg)
Definition: cache_cf.cc:1815
void dumpPoolCount(StoreEntry *entry, const char *name) const
Definition: DelayConfig.cc:100
int reconfiguring
bool StringToInt(const char *s, int &result, const char **p, int base)
Definition: Parsing.cc:217
static void dump_acl_address(StoreEntry *entry, const char *name, Acl::Address *head)
Definition: cache_cf.cc:1566
const char * visible_appname_string
static void Dump(const DiskConfig &, StoreEntry &, const char *name)
prints the configuration into the provided StoreEntry
Definition: Disks.cc:467
Definition: BoolOps.h:42
Definition: SquidString.h:26
static void free_http_upgrade_request_protocols(HttpUpgradeProtocolAccess **protoGuards)
Definition: cache_cf.cc:4941
int httpd_suppress_version_string
Definition: SquidConfig.h:321
const char * appname_string
struct SquidConfig::@86 Program
static void defaults_postscriptum(void)
CachePeer & cachePeer(const char *peerNameTokenDescription)
extracts a cache_peer name token and returns the corresponding CachePeer
Definition: ConfigParser.cc:508
static void parse_sslproxy_ssl_bump(acl_access **ssl_bump)
Definition: cache_cf.cc:4402
std::ostream & CurrentException(std::ostream &os)
prints active (i.e., thrown but not yet handled) exception
Definition: TextException.cc:88
static void parse_cachemgrpasswd(Mgr::ActionPasswordList **head)
Definition: cache_cf.cc:2431
Definition: HttpHeaderTools.h:96
const HeaderTableRecord & lookup(const char *buf, const std::size_t len) const
look record type up by name (C-string and length)
Definition: RegisteredHeaders.cc:32
static void dump_uri_whitespace(StoreEntry *entry, const char *name, int var)
Definition: cache_cf.cc:3176
static void free_time_nanoseconds(std::chrono::nanoseconds *var)
Definition: cache_cf.cc:3002
Format
whether Action report uses valid YAML or unspecified/legacy formatting
Definition: ActionFeatures.h:30
static void dump_b_ssize_t(StoreEntry *entry, const char *name, ssize_t var)
Definition: cache_cf.cc:3014
uint64_t limit
logging attempts beyond this limit are logged at the DBG_DATA level
Definition: Messages.h:56
SBufList treeDump(const char *name, ActionToStringConverter converter) const
Definition: Tree.h:60
static bool NextKvPair(char *&key, char *&value)
Definition: ConfigParser.cc:448
static void dump_IpAddress_list(StoreEntry *, const char *, const Ip::Address_list *)
Definition: cache_cf.cc:3353
Definition: cache_cf.cc:4368
void add(Acl::Node *node)
appends the node to the collection and takes control over it
Definition: InnerNode.cc:36
const char * null_string
void closeDirective()
stops parsing the current configuration directive
Definition: ConfigParser.cc:565
static int check_null_access_log(CustomLog *customlog_definitions)
Definition: cache_cf.cc:4021
Definition: ProxyCerts.h:17
void setEmpty()
Fast reset of the stored content to what would be after default constructor.
Definition: Address.cc:204
static void parseBytesLine(size_t *bptr, const char *units)
Definition: cache_cf.cc:1295
static void parse_adaptation_service_set_type()
Definition: cache_cf.cc:4139
static void dump_configuration_includes_quoted_values(StoreEntry *const entry, const char *const name, bool recognizeQuotedValues)
Definition: cache_cf.cc:4854
static void free_HeaderWithAclList(HeaderWithAclList **header)
Definition: cache_cf.cc:4544
void dumpReplacement(StoreEntry *entry, const char *optionName) const
report the *_header_replace part of the configuration
Definition: HttpHeaderTools.cc:422
static void dump_peer(StoreEntry *entry, const char *name, const CachePeers *peers)
Definition: cache_cf.cc:2067
Definition: HttpHeaderTools.h:39
static void free_sslproxy_cert_adapt(sslproxy_cert_adapt **cert_adapt)
Definition: cache_cf.cc:4316
struct SquidConfig::@93 onoff
Definition: Stream.h:20
const HeaderLookupTable_t HeaderLookupTable
Definition: RegisteredHeaders.cc:60
a collection of DebugMessage objects (with fast access by message IDs)
Definition: Messages.h:67
static void parse_client_delay_pool_count(ClientDelayConfig *cfg)
Definition: cache_cf.cc:1821
static void SetConfigFilename(char const *file_name, bool is_pipe)
Definition: cache_cf.cc:281
static void free_sslproxy_cert_sign(sslproxy_cert_sign **cert_sign)
Definition: cache_cf.cc:4362
const std::vector< int > & processes() const
returns list of process numbers
Definition: CpuAffinityMap.h:27
static void parse_time_nanoseconds(std::chrono::nanoseconds *var)
Definition: cache_cf.cc:2996
Definition: YesNoNone.h:28
static void dump_address(StoreEntry *entry, const char *name, Ip::Address &addr)
Definition: cache_cf.cc:1529
void Parse()
interprets (and partially applies) squid.conf or equivalent configuration
Definition: cache_cf.cc:609
static void dump_generic_port(StoreEntry *e, const char *n, const AnyP::PortCfgPointer &s)
Definition: cache_cf.cc:3811
void dumpPoolCount(StoreEntry *entry, const char *name) const
Definition: ClientDelayConfig.cc:57
static void dump_sslproxy_cert_adapt(StoreEntry *entry, const char *name, sslproxy_cert_adapt *cert_adapt)
Definition: cache_cf.cc:4305
static void parse_delay_pool_access(DelayConfig *cfg)
Definition: cache_cf.cc:1790
static void dump_YesNoNone(StoreEntry *entry, const char *name, YesNoNone &option)
Definition: cache_cf.cc:3250
Definition: QosConfig.h:32
static void free_on_unsupported_protocol(acl_access **access)
Definition: cache_cf.cc:4908
void dumpAccess(StoreEntry *entry, const char *optionName) const
report the *_header_access part of the configuration
Definition: HttpHeaderTools.cc:410
Format::Format * valueFormat
compiled HTTP header field value (no macros)
Definition: HttpHeaderTools.h:111
static bool SawDirective(const T &raw)
whether we have seen (and, hence, configured) the given directive
Definition: cache_cf.cc:654
Definition: Store.h:37
void printAsNoteDirectives(StoreEntry *, const char *directiveName) const
Prints notes using "note" squid.conf directive format, one directive per stored note.
Definition: Notes.cc:263
struct RefreshPattern::@76 flags
char * foreignIntermediateCertsPath
Definition: SquidConfig.h:511
Definition: parse.c:160
int cmp(const SBuf &S, const size_type n) const
shorthand version for compare()
Definition: SBuf.h:279
char * ConfigFile
static void free_icap_service_type(Adaptation::Icap::Config *)
Definition: cache_cf.cc:4166
list of cachemgr password authorization definitions. Currently a POD.
Definition: ActionPasswordList.h:18
static void dump_string(StoreEntry *entry, const char *name, char *var)
Definition: cache_cf.cc:2870
static void parse_CpuAffinityMap(CpuAffinityMap **const cpuAffinityMap)
Definition: cache_cf.cc:4079
void RegisterAction(char const *action, char const *desc, OBJH *handler, Protected, Atomic, Format)
Definition: Registration.cc:54
Definition: Format.h:41
static void dump_PortCfg(StoreEntry *, const char *, const AnyP::PortCfgPointer &)
Definition: cache_cf.cc:3902
SBuf ToSBuf(Args &&... args)
slowly stream-prints all arguments into a freshly allocated SBuf
Definition: Stream.h:63
int opt_parse_cfg_only
static void DumpDirective(const T &raw, StoreEntry *entry, const char *name)
Definition: cache_cf.cc:679
Allows or blocks HTTP Upgrade protocols (see http_upgrade_request_protocols)
Definition: HttpUpgradeProtocolAccess.h:47
static void dump_sslproxy_cert_sign(StoreEntry *entry, const char *name, sslproxy_cert_sign *cert_sign)
Definition: cache_cf.cc:4351
struct servent * xgetservbyname(const char *name, const char *proto)
POSIX getservbyname(3) equivalent.
Definition: netdb.h:31
void setAnyAddr()
NOTE: Does NOT clear the Port stored. Only the Address and Type.
Definition: Address.cc:197
static TimeUnit FromNanoseconds(const std::chrono::nanoseconds &ns, const double parsedValue)
Definition: cache_cf.cc:1198
static void dump_removalpolicy(StoreEntry *entry, const char *name, RemovalPolicySettings *settings)
Definition: cache_cf.cc:3223
std::string fieldValue
HTTP header field value, possibly with macros.
Definition: HttpHeaderTools.h:105
static void FreeDirective(T &raw)
frees any resources associated with the given raw SquidConfig data member
Definition: cache_cf.cc:698
Definition: CustomLog.h:17
static void dump_refreshpattern(StoreEntry *entry, const char *name, RefreshPattern *head)
Definition: cache_cf.cc:2676
static void dump_int64_t(StoreEntry *entry, const char *name, int64_t var)
Definition: cache_cf.cc:2553
static void dump_acl_tos(StoreEntry *entry, const char *name, acl_tos *head)
Definition: cache_cf.cc:1604
void aclParseAccessLine(const char *directive, ConfigParser &, acl_access **config)
Parses a single line of a "action followed by acls" directive (e.g., http_access).
Definition: Gadgets.cc:132
static bool isUnsignedNumeric(const char *str, size_t len)
Definition: cache_cf.cc:2105
static void free_refreshpattern(RefreshPattern **head)
Definition: cache_cf.cc:2858
virtual void parse(SchemeConfig *, size_t, char *)
Definition: SchemeConfig.cc:84
Definition: SquidConfig.h:63
static void parse_UrlHelperTimeout(SquidConfig::UrlHelperTimeout *)
Definition: cache_cf.cc:4772
static void parse_removalpolicy(RemovalPolicySettings **settings)
Definition: cache_cf.cc:3210
static bool parseTimeUnit(const char *unitName, std::chrono::nanoseconds &ns)
Definition: cache_cf.cc:1142
static void dump_SBufList(StoreEntry *entry, const SBufList &words)
Definition: cache_cf.cc:1454
static void parse_on_unsupported_protocol(acl_access **access)
Definition: cache_cf.cc:4868
static void default_all(void)
void forEach(const Visitor &) const
iterates over all configured rules, calling the given visitor
Definition: HttpUpgradeProtocolAccess.h:96
static void defaults_if_none(void)
static void free_ecap_service_type(Adaptation::Ecap::Config *)
Definition: cache_cf.cc:4204
static void parse_IpAddress_list(Ip::Address_list **)
Definition: cache_cf.cc:3329
static void free_all(void)
const char * cfg_directive
During parsing, the name of the current squid.conf directive being parsed.
Definition: cache_cf.cc:269
Definition: DelayConfig.h:18
static void free_delay_pool_count(DelayConfig *cfg)
Definition: cache_cf.cc:1760
static void parse_client_delay_pool_access(ClientDelayConfig *cfg)
Definition: cache_cf.cc:1833
static void dump_HeaderWithAclList(StoreEntry *entry, const char *name, HeaderWithAclList *headers)
Definition: cache_cf.cc:4497
static void parseBytesLineSigned(ssize_t *bptr, const char *units)
Definition: cache_cf.cc:1342
PeerOptions & ProxyOutgoingConfig()
configuration options for DIRECT server access
Definition: PeerOptions.cc:25
Definition: Address.h:42
static void parse_adaptation_service_chain_type()
Definition: cache_cf.cc:4145
static void dump_ecap_service_type(StoreEntry *, const char *, const Adaptation::Ecap::Config &)
Definition: cache_cf.cc:4210
static DebugMessageId ParseDebugMessageId(const char *value, const char eov)
Definition: cache_cf.cc:4578
struct SquidConfig::@80 Timeout
struct SquidConfig::@85 Log
Definition: PeerDigest.h:74
static void parse_port_option(AnyP::PortCfgPointer &s, char *token)
Definition: cache_cf.cc:3489
bool levelled() const
whether the default logging level of this message has been altered
Definition: Messages.h:32
static void parse_access_log(CustomLog **customlog_definitions)
Definition: cache_cf.cc:3974
static void dump_b_size_t(StoreEntry *entry, const char *name, size_t var)
Definition: cache_cf.cc:3008
Definition: ConfigParser.h:45
void setReplacement(const char *name, const char *replacementValue)
updates mangler for the named header with a replacement value
Definition: HttpHeaderTools.cc:453
static void parse_AuthSchemes(acl_access **authSchemes)
Definition: cache_cf.cc:1980
static void free_configuration_includes_quoted_values(bool *recognizeQuotedValues)
Definition: cache_cf.cc:4861
constexpr DebugMessageId DebugMessageIdUpperBound
The maximum used DebugMessage::id plus 1. Increase as you add new IDs.
Definition: Messages.h:64
AnyP::ProtocolVersion ProtocolVersion(unsigned int aMajor, unsigned int aMinor)
HTTP version label information.
Definition: ProtocolVersion.h:19
Definition: ProtocolVersion.h:23
Definition: Address.h:382
static void parse_icap_service_failure_limit(Adaptation::Icap::Config *)
Definition: cache_cf.cc:4218
static void free_UrlHelperTimeout(SquidConfig::UrlHelperTimeout *)
Definition: cache_cf.cc:4830
bool limited() const
whether the number of logging attempts have been limited
Definition: Messages.h:35
static void parseBytesLine64(int64_t *bptr, const char *units)
Definition: cache_cf.cc:1248
static void ReplaceSubstr(char *&str, int &len, unsigned substrIdx, unsigned substrLen, const char *newSubstr)
Definition: cache_cf.cc:341
Introduction
- About Squid
- Why Squid?
- Squid Developers
- How to Donate
- How to Help Out
- Getting Squid
- Squid Source Packages
- Squid Deployment Case-Studies
- Squid Software Foundation
Documentation
- Quick Setup
- Configuration:
- FAQ and Wiki
- Guide Books:
- Non-English
- More...
Support
- Security Advisories
- Bugzilla Database
- Mailing lists
- Contacting us
- Commercial services
- Project Sponsors
- Squid-based products