cache_cf.cc
Go to the documentation of this file.
126 static void dump_icap_service_type(StoreEntry *, const char *, const Adaptation::Icap::Config &);
132 static void dump_icap_service_failure_limit(StoreEntry *, const char *, const Adaptation::Icap::Config &);
138 static void dump_ecap_service_type(StoreEntry *, const char *, const Adaptation::Ecap::Config &);
166 static void dump_cache_log_message(StoreEntry *entry, const char *name, const DebugMessages *messages);
191 static void dump_http_header_access(StoreEntry * entry, const char *name, const HeaderManglers *manglers);
194 static void dump_http_header_replace(StoreEntry * entry, const char *name, const HeaderManglers *manglers);
198 static void dump_HeaderWithAclList(StoreEntry * entry, const char *name, HeaderWithAclList *headers);
224 static void dump_sslproxy_cert_sign(StoreEntry *entry, const char *name, sslproxy_cert_sign *cert_sign);
227 static void dump_sslproxy_cert_adapt(StoreEntry *entry, const char *name, sslproxy_cert_adapt *cert_adapt);
242 static void dump_CpuAffinityMap(StoreEntry *const entry, const char *const name, const CpuAffinityMap *const cpuAffinityMap);
252 static void dump_configuration_includes_quoted_values(StoreEntry *const entry, const char *const name, bool recognizeQuotedValues);
255 static void dump_on_unsupported_protocol(StoreEntry *entry, const char *name, acl_access *access);
257 static void ParseAclWithAction(acl_access **access, const Acl::Answer &action, const char *desc, Acl::Node *acl = nullptr);
259 static void dump_http_upgrade_request_protocols(StoreEntry *entry, const char *name, HttpUpgradeProtocolAccess *protoGuards);
342 ReplaceSubstr(char*& str, int& len, unsigned substrIdx, unsigned substrLen, const char* newSubstr)
352 memmove(str + substrIdx + newSubstrLen, str + substrIdx + substrLen, len - substrIdx - substrLen + 1);
458 debugs(3, Important(68), "Processing Configuration File: " << file_name << " (depth " << depth << ")");
567 } else if (if_states.empty() || if_states.back()) { // test last if-statement meaning if present
626 throw TextException(ToSBuf("Found ", unrecognizedDirectives, " unrecognized directive(s)"), Here());
726 debugs(3, DBG_CRITICAL, "WARNING: This Squid binary can not handle files larger than 2GB. Limiting maximum_object_size to just below 2GB");
759 debugs(0, DBG_IMPORTANT, "WARNING: max_filedescriptors disabled. Operating System setrlimit(RLIMIT_NOFILE) is missing.");
763 debugs(0, DBG_IMPORTANT, "WARNING: max_filedescriptors limited to " << FD_SETSIZE << " by select() algorithm.");
835 debugs(22, DBG_IMPORTANT, "WARNING: use of 'override-expire' in 'refresh_pattern' violates HTTP");
844 debugs(22, DBG_IMPORTANT, "WARNING: use of 'override-lastmod' in 'refresh_pattern' violates HTTP");
853 debugs(22, DBG_IMPORTANT, "WARNING: use of 'reload-into-ims' in 'refresh_pattern' violates HTTP");
862 debugs(22, DBG_IMPORTANT, "WARNING: use of 'ignore-reload' in 'refresh_pattern' violates HTTP");
871 debugs(22, DBG_IMPORTANT, "WARNING: use of 'ignore-no-store' in 'refresh_pattern' violates HTTP");
880 debugs(22, DBG_IMPORTANT, "WARNING: use of 'ignore-private' in 'refresh_pattern' violates HTTP");
964 Config.ssl_client.sslContext_ = rawSslContext ? new Security::ContextPointer(rawSslContext) : nullptr;
975 Config.ssl_client.defaultPeerContext = new Security::FuturePeerContext(Security::ProxyOutgoingConfig, *Config.ssl_client.sslContext_);
998 debugs(3, 2, "initializing " << AnyP::UriScheme(s->transport.protocol) << "_port " << s->s << " TLS contexts");
1014 // TODO: static_assert(safeRawHeaderValueSizeMax >= 64*1024); // no WARNINGs for default settings
1016 debugs(3, DBG_CRITICAL, "WARNING: Increasing request_header_max_size beyond " << safeRawHeaderValueSizeMax <<
1017 " bytes makes Squid more vulnerable to denial-of-service attacks; configured value: " << Config.maxRequestHeaderSize << " bytes");
1019 debugs(3, DBG_CRITICAL, "WARNING: Increasing reply_header_max_size beyond " << safeRawHeaderValueSizeMax <<
1020 " bytes makes Squid more vulnerable to denial-of-service attacks; configured value: " << Config.maxReplyHeaderSize << " bytes");
1027 debugs(3, DBG_PARSE_NOTE(DBG_IMPORTANT), "WARNING: pipeline_prefetch " << Config.pipeline_max_prefetch <<
1044 debugs(3, DBG_PARSE_NOTE(DBG_IMPORTANT), "WARNING: pipeline_prefetch breaks NTLM and Negotiate authentication. Forced pipeline_prefetch 0.");
1052 debugs(3, DBG_CRITICAL, "auth_schemes: at least one scheme name is required; got: " << authSchemes.rawSchemes);
1072 debugs(3, DBG_CRITICAL, "WARNING: url_rewrite_concurrency upgrade overriding url_rewrite_children settings.");
1112 throw TextException(ToSBuf("missing required parameter for obsolete directive: ", name), Here());
1176 throw TexcHere(ToSBuf("time unit '", unitName, "' is too small to be used in this context, the minimal unit is ",
1190 const auto maxYears = std::chrono::duration_cast<std::chrono::hours>(std::chrono::nanoseconds::max()).count()/HoursPerYear;
1241 "the nanosecond-level precision implied by the configured value: " << parsedValue << ' ' << token);
1639 debugs(3, DBG_PARSE_NOTE(DBG_IMPORTANT), "WARNING: Tos value '" << tos << "' adjusted to '" << chTos << "'");
1685 if (mc.hasMask() && std::find(pkt_dirs.begin(), pkt_dirs.end(), cfg_directive) != pkt_dirs.end())
1854 debugs(3, DBG_CRITICAL, "" << cfg_filename << " line " << config_lineno << ": " << config_input_line);
1893 debugs(3, DBG_CRITICAL, "" << cfg_filename << " line " << config_lineno << ": " << config_input_line);
1944 debugs(3, DBG_CRITICAL, "ERROR: Failure while parsing Config File: Unknown authentication scheme '" << type_str << "'.");
1952 debugs(3, DBG_CRITICAL, "Parsing Config File: Corruption configuring authentication scheme '" << type_str << "'.");
2013 ParseAclWithAction(acl_access **config, const Acl::Answer &action, const char *desc, Acl::Node *acl)
2301 throw TextException(ToSBuf("missing authentication support; required for userhash cache_peer ", *p), Here());
2313 debugs(0, DBG_CRITICAL, "WARNING: cache_peer option 'no-delay' requires --enable-delay-pools");
2346 debugs(0, DBG_CRITICAL, "WARNING: cache_peer option '" << token << "' requires --with-openssl");
2372 debugs(3, DBG_PARSE_NOTE(DBG_IMPORTANT), "ERROR: Ignoring unknown cache_peer option '" << token << "'");
2458 debugs(0, DBG_PARSE_NOTE(1), "ERROR: action '" << u << "' (line " << config_lineno << ") already has a password");
2591 debugs(0, DBG_PARSE_NOTE(DBG_IMPORTANT), "WARNING: 'enable' is deprecated. Please update to use 'on'.");
2596 debugs(0, DBG_PARSE_NOTE(DBG_IMPORTANT), "WARNING: 'disable' is deprecated. Please update to use 'off'.");
2599 debugs(0, DBG_PARSE_NOTE(DBG_IMPORTANT), "ERROR: Invalid option: Boolean options can only be 'on' or 'off'.");
2633 debugs(0, DBG_PARSE_NOTE(DBG_IMPORTANT), "WARNING: 'enable' is deprecated. Please update to use value 'on'.");
2640 debugs(0, DBG_PARSE_NOTE(DBG_IMPORTANT), "WARNING: 'disable' is deprecated. Please update to use value 'off'.");
2643 debugs(0, DBG_PARSE_NOTE(DBG_IMPORTANT), "ERROR: Invalid option: Tristate options can only be 'on', 'off', or 'warn'.");
2660 debugs(0, DBG_PARSE_NOTE(DBG_IMPORTANT), "WARNING: 'pipeline_prefetch on' is deprecated. Please update to use 1 (or a higher number).");
2665 debugs(0, DBG_PARSE_NOTE(2), "WARNING: 'pipeline_prefetch off' is deprecated. Please update to use '0'.");
2750 debugs(3, DBG_IMPORTANT, "WARNING: refresh_pattern minimum age negative. Cropped back to zero.");
2754 debugs(3, DBG_IMPORTANT, "WARNING: refresh_pattern minimum age too high. Cropped back to 1 year.");
2766 debugs(3, DBG_IMPORTANT, "WARNING: refresh_pattern maximum age negative. Cropped back to zero.");
2770 debugs(3, DBG_IMPORTANT, "WARNING: refresh_pattern maximum age too high. Cropped back to 1 year.");
2809 debugs(22, DBG_PARSE_NOTE(2), "UPGRADE: refresh_pattern option '" << token << "' is obsolete. Remove it.");
2957 throw TexcHere(ToSBuf("directive supports time values up to ", maxTime, " but is given ", seconds.count(), " seconds"));
2990 dump_time_nanoseconds(StoreEntry *entry, const char *name, const std::chrono::nanoseconds &var)
2992 // std::chrono::nanoseconds::rep is unknown a priori so we cast to (and print) the largest supported integer
3171 debugs(0, DBG_PARSE_NOTE(2), "ERROR: Invalid option '" << token << "': 'uri_whitespace' accepts 'strip', 'deny', 'allow', 'encode', and 'chop'.");
3283 debugs(0, DBG_PARSE_NOTE(2), "ERROR: Invalid option '" << token << "': 'memory_cache_mode' accepts 'always', 'disk', 'network', and 'never'.");
3405 debugs(3, DBG_CRITICAL, "FATAL: " << portType << "_port: missing ']' on IPv6 address: " << token);
3461 debugs(3, 3, portType << "_port: found Listen as Host " << s->defaultsite << " on IP: " << s->s);
3463 debugs(3, DBG_CRITICAL, "FATAL: " << portType << "_port: failed to resolve Host/IP: " << host);
3485 fatalf("%s directive does not support protocol=" SQUIDSBUFPH "\n", cfg_directive, SQUIDSBUFPRINT(value));
3496 debugs(3, DBG_CRITICAL, "FATAL: " << cfg_directive << ": Accelerator mode requires its own port. It cannot be shared with other modes.");
3504 debugs(3, DBG_CRITICAL, "FATAL: " << cfg_directive << ": Intercept mode requires its own interception port. It cannot be shared with other modes.");
3512 debugs(3, DBG_IMPORTANT, "Disabling Authentication on port " << s->s << " (interception enabled)");
3515 debugs(3,DBG_CRITICAL, "FATAL: " << cfg_directive << ": TPROXY option requires its own interception port. It cannot be shared with other modes.");
3525 debugs(3, DBG_IMPORTANT, "Disabling TPROXY Spoofing on port " << s->s << " (require-proxy-header enabled)");
3529 debugs(3, DBG_CRITICAL, "FATAL: " << cfg_directive << ": TPROXY support in the system does not work.");
3539 debugs(3, DBG_IMPORTANT, "Disabling TPROXY Spoofing on port " << s->s << " (require-proxy-header enabled)");
3544 debugs(3, DBG_CRITICAL, "FATAL: " << cfg_directive << ": defaultsite option requires Acceleration mode flag.");
3552 debugs(3, DBG_CRITICAL, "WARNING: " << cfg_directive << ": vhost option is deprecated. Use 'accel' mode flag instead.");
3558 debugs(3, DBG_IMPORTANT, "ERROR: " << cfg_directive << ": no-vhost option requires Acceleration mode flag.");
3563 debugs(3, DBG_CRITICAL, "FATAL: " << cfg_directive << ": vport option requires Acceleration mode flag.");
3570 debugs(3, DBG_CRITICAL, "FATAL: " << cfg_directive << ": vport option requires Acceleration mode flag.");
3577 debugs(3, DBG_CRITICAL, "FATAL: " << cfg_directive << ": protocol option requires Acceleration mode flag.");
3584 debugs(3, DBG_CRITICAL, "FATAL: " << cfg_directive << ": allow-direct option requires Acceleration mode flag.");
3591 debugs(3, DBG_IMPORTANT, "ERROR: " << cfg_directive << ": act-as-origin option requires Acceleration mode flag.");
3597 debugs(3, DBG_CRITICAL, "FATAL: " << cfg_directive << ": ignore-cc option requires Acceleration mode flag.");
3627 debugs(3, DBG_CRITICAL, "FATAL: " << cfg_directive << ": IPv6 addresses cannot be used as IPv4-Only. " << s->s );
3700 throw TexcHere(ToSBuf(cfg_directive, ' ', token, " option requires building Squid where SO_REUSEPORT is supported by the TCP stack"));
3761 debugs(3, DBG_CRITICAL, "FATAL: ssl-bump on https_port requires tproxy/intercept which is missing.");
3766 debugs(3, DBG_CRITICAL, "FATAL: tproxy/intercept on https_port requires ssl-bump which is missing.");
3772 debugs(3,DBG_CRITICAL, "FATAL: https_port: require-proxy-header option is not supported on HTTPS ports.");
3793 debugs(3, DBG_CRITICAL, "FATAL: " << AnyP::UriScheme(s->transport.protocol) << "_port requires a cert= parameter");
3887 storeAppendPrintf(e, " tcpkeepalive=%d,%d,%d", s->tcp_keepalive.idle, s->tcp_keepalive.interval, s->tcp_keepalive.timeout);
3940 debugs(0, DBG_CRITICAL, (opt_parse_cfg_only?"FATAL: ":"ERROR: ") << name << " " << path << ": " << xstrerr(xerrno));
4113 dump_CpuAffinityMap(StoreEntry *const entry, const char *const name, const CpuAffinityMap *const cpuAffinityMap)
4173 dump_icap_service_type(StoreEntry * entry, const char *name, const Adaptation::Icap::Config &cfg)
4211 dump_ecap_service_type(StoreEntry * entry, const char *name, const Adaptation::Ecap::Config &cfg)
4236 static void dump_icap_service_failure_limit(StoreEntry *entry, const char *name, const Adaptation::Icap::Config &cfg)
4286 debugs(3, DBG_CRITICAL, "FATAL: sslproxy_cert_adapt: setCommonName{" <<param << "} : using common name longer than 64 bytes is not supported");
4293 debugs(3, DBG_CRITICAL, "FATAL: sslproxy_cert_adapt: unknown cert adaptation algorithm: " << al);
4306 static void dump_sslproxy_cert_adapt(StoreEntry *entry, const char *name, sslproxy_cert_adapt *cert_adapt)
4352 static void dump_sslproxy_cert_sign(StoreEntry *entry, const char *name, sslproxy_cert_sign *cert_sign)
4498 static void dump_HeaderWithAclList(StoreEntry * entry, const char *name, HeaderWithAclList *headers)
4605 throw TextException(ToSBuf("malformed cache_log_message ID range: ", key, '=', value), Here());
4628 throw TextException(ToSBuf("repeated or conflicting cache_log_message option: ", key, '=', value), Here());
4631 throw TextException("cache_log_message is missing a required id=... or ids=... option", Here());
4634 throw TextException("cache_log_message is missing a required level=... or limit=... option", Here());
4646 static void dump_cache_log_message(StoreEntry *entry, const char *name, const DebugMessages *debugMessages)
4702 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.");
4805 debugs(3, DBG_CRITICAL, "FATAL: Expected 'response=' option after 'on_timeout=use_configured_response' option");
4810 debugs(3, DBG_CRITICAL, "FATAL: 'response=' option is valid only when used with the 'on_timeout=use_configured_response' option");
4816 dump_UrlHelperTimeout(StoreEntry *entry, const char *name, SquidConfig::UrlHelperTimeout &config)
4855 dump_configuration_includes_quoted_values(StoreEntry *const entry, const char *const name, bool)
4925 dump_http_upgrade_request_protocols(StoreEntry *entry, const char *rawName, HttpUpgradeProtocolAccess *protoGuards)
static void parse_http_header_access(HeaderManglers **manglers)
Definition: cache_cf.cc:1849
Definition: wordlist.h:41
static void dump_wordlist(StoreEntry *entry, const char *name, wordlist *list)
Definition: cache_cf.cc:3119
static void dump_access_log(StoreEntry *entry, const char *name, CustomLog *definitions)
Definition: cache_cf.cc:4028
static const char * FindStatement(const char *line, const char *statement)
Definition: cache_cf.cc:389
static void parsePortSpecification(const AnyP::PortCfgPointer &s, char *token)
Definition: cache_cf.cc:3387
static void dump_icap_service_type(StoreEntry *, const char *, const Adaptation::Icap::Config &)
Definition: cache_cf.cc:4173
static void dump_time_msec(StoreEntry *entry, const char *name, time_msec_t var)
Definition: cache_cf.cc:2968
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:1184
static void parse_TokenOrQuotedString(char **var)
Definition: cache_cf.cc:2928
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:4161
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:2607
static void parse_http_upgrade_request_protocols(HttpUpgradeProtocolAccess **protoGuards)
Definition: cache_cf.cc:4915
static void dump_time_nanoseconds(StoreEntry *entry, const char *name, const std::chrono::nanoseconds &var)
Definition: cache_cf.cc:2990
static void free_CpuAffinityMap(CpuAffinityMap **const cpuAffinityMap)
Definition: cache_cf.cc:4131
static void parse_ecap_service_type(Adaptation::Ecap::Config *)
Definition: cache_cf.cc:4199
static void parse_delay_pool_class(DelayConfig *cfg)
Definition: cache_cf.cc:1779
Security::ContextPointer createClientContext(bool setOptions)
generate a security client-context from these configured options
Definition: PeerOptions.cc:271
static void dump_kb_int64_t(StoreEntry *entry, const char *name, int64_t var)
Definition: cache_cf.cc:3027
static int parseManyConfigFiles(char *files, int depth)
Definition: cache_cf.cc:312
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:3196
void log(char *format,...)
Definition: RemovalPolicy.h:19
static void free_cachemgrpasswd(Mgr::ActionPasswordList **head)
Definition: cache_cf.cc:2467
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:1483
static void free_sslproxy_ssl_bump(acl_access **ssl_bump)
Definition: cache_cf.cc:4491
Definition: dns_internal.cc:189
static void dump_time_t(StoreEntry *entry, const char *name, time_t var)
Definition: cache_cf.cc:2945
static void dump_ftp_epsv(StoreEntry *entry, const char *name, acl_access *ftp_epsv)
Definition: cache_cf.cc:4727
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:4925
struct SquidConfig::@90 Program
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:4483
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:2574
static void dump_int(StoreEntry *entry, const char *name, int var)
Definition: cache_cf.cc:2534
void parseBytesOptionValue(size_t *bptr, const char *units, char const *value)
Parse bytes number from a string.
Definition: cache_cf.cc:1395
static void dump_authparam(StoreEntry *entry, const char *name, Auth::ConfigVector cfg)
Definition: cache_cf.cc:1974
SBuf service_name(APP_SHORTNAME)
struct SquidConfig::@97 onoff
Definition: SquidConfig.h:532
static void free_cache_log_message(DebugMessages **messages)
Definition: cache_cf.cc:4666
static void free_client_delay_pool_count(ClientDelayConfig *cfg)
Definition: cache_cf.cc:1810
static void dump_AuthSchemes(StoreEntry *entry, const char *name, acl_access *authSchemes)
Definition: cache_cf.cc:2002
static void dump_http_header_access(StoreEntry *entry, const char *name, const HeaderManglers *manglers)
Definition: cache_cf.cc:1842
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:1881
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:4646
void parsePoolAccess(ConfigParser &parser)
Definition: ClientDelayConfig.cc:95
static void dump_memcachemode(StoreEntry *entry, const char *name, SquidConfig &)
Definition: cache_cf.cc:3289
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:4816
static void dump_CpuAffinityMap(StoreEntry *const entry, const char *const name, const CpuAffinityMap *const cpuAffinityMap)
Definition: cache_cf.cc:4113
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:1888
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:4511
static void parsePortCfg(AnyP::PortCfgPointer *, const char *protocol)
Definition: cache_cf.cc:3722
static void dump_delay_pool_count(StoreEntry *entry, const char *name, DelayConfig &cfg)
Definition: cache_cf.cc:1767
static void dump_cachedir(StoreEntry *entry, const char *name, const Store::DiskConfig &swap)
Definition: cache_cf.cc:1909
bool ResolveClientAddressesAsap
whether to do reverse DNS lookups for source IPs of accepted connections
Definition: fqdncache.cc:30
PeerOptions ProxyOutgoingConfig
configuration options for DIRECT server access
Definition: PeerOptions.cc:24
char * toStr(char *buf, const unsigned int blen, int force=AF_UNSPEC) const
Definition: Address.cc:812
struct SquidConfig::@106 ssl_client
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:3926
#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
DefineRunnerRegistrator(sslBumpCfgRr)
static void dump_icap_service_failure_limit(StoreEntry *, const char *, const Adaptation::Icap::Config &)
Definition: cache_cf.cc:4236
static void dump_acl_b_size_t(StoreEntry *entry, const char *name, AclSizeLimit *head)
Definition: cache_cf.cc:1709
#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:4839
static void parse_delay_pool_count(DelayConfig *cfg)
Definition: cache_cf.cc:1773
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:2474
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:2415
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
virtual void parse(SchemeConfig *, int, char *)
Definition: SchemeConfig.cc:84
static std::chrono::seconds ParseUrlRewriteTimeout()
Definition: cache_cf.cc:4742
Definition: PortCfg.h:23
Definition: SchemeConfig.h:46
struct RefreshPattern::@80 flags
static void parse_cache_log_message(DebugMessages **messages)
Definition: cache_cf.cc:4587
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:3021
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:4253
void dump_acl_access(StoreEntry *entry, const char *name, acl_access *head)
Definition: cache_cf.cc:1511
static void dump_on_unsupported_protocol(StoreEntry *entry, const char *name, acl_access *access)
Definition: cache_cf.cc:4893
static void parse_sslproxy_cert_sign(sslproxy_cert_sign **cert_sign)
Definition: cache_cf.cc:4323
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:447
static void parse_client_delay_pool_rates(ClientDelayConfig *cfg)
Definition: cache_cf.cc:1828
static void parse_delay_pool_rates(DelayConfig *cfg)
Definition: cache_cf.cc:1785
static void free_icap_service_failure_limit(Adaptation::Icap::Config *)
Definition: cache_cf.cc:4245
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:3082
int refresh_nocache_hack
static AnyP::ProtocolVersion parsePortProtocol(const SBuf &value)
Definition: cache_cf.cc:3472
static void ParseAclWithAction(acl_access **access, const Acl::Answer &action, const char *desc, Acl::Node *acl=nullptr)
Definition: cache_cf.cc:2013
static void SubstituteMacro(char *&line, int &len, const char *macroName, const char *substStr)
Definition: cache_cf.cc:360
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:1816
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:1567
struct SquidConfig::@95 Store
const char * visible_appname_string
static void Dump(const DiskConfig &, StoreEntry &, const char *name)
prints the configuration into the provided StoreEntry
Definition: Disks.cc:469
Definition: BoolOps.h:42
Definition: SquidString.h:25
static void free_http_upgrade_request_protocols(HttpUpgradeProtocolAccess **protoGuards)
Definition: cache_cf.cc:4942
int httpd_suppress_version_string
Definition: SquidConfig.h:321
const char * appname_string
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:4403
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:2432
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:3177
static void free_time_nanoseconds(std::chrono::nanoseconds *var)
Definition: cache_cf.cc:3003
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:3015
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:3354
Definition: cache_cf.cc:4369
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:4022
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:1296
static void parse_adaptation_service_set_type()
Definition: cache_cf.cc:4140
static void dump_configuration_includes_quoted_values(StoreEntry *const entry, const char *const name, bool recognizeQuotedValues)
Definition: cache_cf.cc:4855
static void free_HeaderWithAclList(HeaderWithAclList **header)
Definition: cache_cf.cc:4545
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:2068
Definition: HttpHeaderTools.h:39
static void free_sslproxy_cert_adapt(sslproxy_cert_adapt **cert_adapt)
Definition: cache_cf.cc:4317
Definition: Stream.h:20
struct SquidConfig::@91 Accel
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:1822
static void SetConfigFilename(char const *file_name, bool is_pipe)
Definition: cache_cf.cc:282
static void free_sslproxy_cert_sign(sslproxy_cert_sign **cert_sign)
Definition: cache_cf.cc:4363
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:2997
Definition: YesNoNone.h:28
static void dump_address(StoreEntry *entry, const char *name, Ip::Address &addr)
Definition: cache_cf.cc:1530
void Parse()
interprets (and partially applies) squid.conf or equivalent configuration
Definition: cache_cf.cc:610
static void dump_generic_port(StoreEntry *e, const char *n, const AnyP::PortCfgPointer &s)
Definition: cache_cf.cc:3812
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:4306
static void parse_delay_pool_access(DelayConfig *cfg)
Definition: cache_cf.cc:1791
static void dump_YesNoNone(StoreEntry *entry, const char *name, YesNoNone &option)
Definition: cache_cf.cc:3251
Definition: QosConfig.h:32
static void free_on_unsupported_protocol(acl_access **access)
Definition: cache_cf.cc:4909
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:655
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
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
struct SquidConfig::@89 Log
struct SquidConfig::@84 Timeout
static void free_icap_service_type(Adaptation::Icap::Config *)
Definition: cache_cf.cc:4167
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:2871
static void parse_CpuAffinityMap(CpuAffinityMap **const cpuAffinityMap)
Definition: cache_cf.cc:4080
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:3903
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:680
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:4352
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:1199
static void dump_removalpolicy(StoreEntry *entry, const char *name, RemovalPolicySettings *settings)
Definition: cache_cf.cc:3224
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:699
Definition: CustomLog.h:17
static void dump_refreshpattern(StoreEntry *entry, const char *name, RefreshPattern *head)
Definition: cache_cf.cc:2677
static void dump_int64_t(StoreEntry *entry, const char *name, int64_t var)
Definition: cache_cf.cc:2554
static void dump_acl_tos(StoreEntry *entry, const char *name, acl_tos *head)
Definition: cache_cf.cc:1605
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:2106
static void free_refreshpattern(RefreshPattern **head)
Definition: cache_cf.cc:2859
struct SquidConfig::@100 icons
Definition: SquidConfig.h:63
static void parse_UrlHelperTimeout(SquidConfig::UrlHelperTimeout *)
Definition: cache_cf.cc:4773
static void parse_removalpolicy(RemovalPolicySettings **settings)
Definition: cache_cf.cc:3211
static bool parseTimeUnit(const char *unitName, std::chrono::nanoseconds &ns)
Definition: cache_cf.cc:1143
static void dump_SBufList(StoreEntry *entry, const SBufList &words)
Definition: cache_cf.cc:1455
static void parse_on_unsupported_protocol(acl_access **access)
Definition: cache_cf.cc:4869
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:4205
static void parse_IpAddress_list(Ip::Address_list **)
Definition: cache_cf.cc:3330
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:270
Definition: DelayConfig.h:18
static void free_delay_pool_count(DelayConfig *cfg)
Definition: cache_cf.cc:1761
static void parse_client_delay_pool_access(ClientDelayConfig *cfg)
Definition: cache_cf.cc:1834
static void dump_HeaderWithAclList(StoreEntry *entry, const char *name, HeaderWithAclList *headers)
Definition: cache_cf.cc:4498
static void parseBytesLineSigned(ssize_t *bptr, const char *units)
Definition: cache_cf.cc:1343
Definition: Address.h:42
static void parse_adaptation_service_chain_type()
Definition: cache_cf.cc:4146
static void dump_ecap_service_type(StoreEntry *, const char *, const Adaptation::Ecap::Config &)
Definition: cache_cf.cc:4211
struct SquidConfig2::@109 onoff
static DebugMessageId ParseDebugMessageId(const char *value, const char eov)
Definition: cache_cf.cc:4579
Definition: PeerDigest.h:74
static void parse_port_option(AnyP::PortCfgPointer &s, char *token)
Definition: cache_cf.cc:3490
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:3975
static void dump_b_size_t(StoreEntry *entry, const char *name, size_t var)
Definition: cache_cf.cc:3009
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:1981
static void free_configuration_includes_quoted_values(bool *recognizeQuotedValues)
Definition: cache_cf.cc:4862
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:4219
static void free_UrlHelperTimeout(SquidConfig::UrlHelperTimeout *)
Definition: cache_cf.cc:4831
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:1249
static void ReplaceSubstr(char *&str, int &len, unsigned substrIdx, unsigned substrLen, const char *newSubstr)
Definition: cache_cf.cc:342
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