Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/caddyserver/caddy
/ functions
Functions
2,647 in github.com/caddyserver/caddy
⨍
Functions
2,647
◇
Types & classes
525
↓ 2 callers
Method
getCAFromAPIRequestPath
(r *http.Request)
modules/caddypki/adminapi.go:174
↓ 2 callers
Method
getConfigForName
(name string)
modules/caddytls/tls.go:853
↓ 2 callers
Method
getDatabaseKey
()
modules/caddypki/acmeserver/acmeserver.go:253
↓ 2 callers
Method
getEtagFromFile
Finds the first corresponding etag file for a given file in the file system and return its content
modules/caddyhttp/fileserver/staticfiles.go:777
↓ 2 callers
Function
getFirstHostFromRoute
getFirstHostFromRoute traverses a route's matchers to find the Host rule. Since we are dealing with internally generated redirect routes, the host is
modules/caddyhttp/autohttps.go:893
↓ 2 callers
Function
getHeaderFieldVals
getHeaderFieldVals returns the field values for the given fieldName from input. The host parameter should be obtained from the http.Request.Host field
modules/caddyhttp/matchers.go:1027
↓ 2 callers
Function
getLastConfig
getLastConfig returns the last-known config file and adapter.
caddy.go:1281
↓ 2 callers
Method
getSTEK
getSTEK locks and loads the current STEK from storage. If none currently exists, a new STEK is created and persisted. If the current STEK is outdated
modules/caddytls/distributedstek/distributedstek.go:150
↓ 2 callers
Method
handleUpstreams
handleUpstreams reports the status of the reverse proxy upstream pool.
modules/caddyhttp/reverseproxy/admin.go:62
↓ 2 callers
Function
hasVaryValue
(hdr http.Header, target string)
modules/caddyhttp/encode/encode.go:480
↓ 2 callers
Function
hashCookie
hashCookie hashes (HMAC 256) some data with the secret
modules/caddyhttp/reverseproxy/selectionpolicies.go:770
↓ 2 callers
Method
implicitTailscaleManagersOnly
implicitTailscaleManagersOnly returns true if this policy is configured to serve only Tailscale names from the Tailscale manager at handshake-time.
modules/caddytls/automation.go:434
↓ 2 callers
Method
init
init should be called before we write a response, if rw.buf has contents.
modules/caddyhttp/encode/encode.go:446
↓ 2 callers
Function
initAdminMetrics
()
admin_test.go:303
↓ 2 callers
Method
initServer
InitServer this will configure the server with a configurion of a specific type. The configType must be either "json" or the adapter type.
caddytest/caddytest.go:131
↓ 2 callers
Method
installRoot
installRoot installs this CA's root certificate into the local trust store(s) if it is not already trusted. The CA must already be provisioned.
modules/caddypki/ca.go:436
↓ 2 callers
Function
isCaddyfile
(configFile, adapterName string)
cmd/main.go:112
↓ 2 callers
Function
isModuleMapType
isModuleMapType returns true if the type is map[string]json.RawMessage. It assumes that the string key is the module name, but this is not always the
modules.go:365
↓ 2 callers
Method
isNextOnNewLine
isNextOnNewLine determines whether the current token is on a different line (higher line number) than the next token. It handles imported tokens corre
caddyconfig/caddyfile/dispenser.go:520
↓ 2 callers
Function
isSymlink
isSymlink return true if f is a symbolic link.
modules/caddyhttp/fileserver/browse.go:351
↓ 2 callers
Function
isTailscaleDomain
(name string)
caddyconfig/httpcaddyfile/tlsapp.go:1191
↓ 2 callers
Function
isTrustedClientIP
isTrustedClientIP returns true if the given IP address is in the list of trusted IP ranges.
modules/caddyhttp/server.go:1081
↓ 2 callers
Function
isWebsocket
isWebsocket returns true if r looks to be an upgrade request for WebSockets. It is a fairly naive check.
modules/caddyhttp/reverseproxy/streaming.go:565
↓ 2 callers
Method
isWildcardOrDefault
isWildcardOrDefault determines if the subjects include any wildcard domains, or is the "default" policy (i.e. no subjects) which is unbounded.
modules/caddytls/automation.go:465
↓ 2 callers
Function
journaldPriorityPrefix
(level zapcore.Level)
modules/logging/journaldencoder.go:178
↓ 2 callers
Function
leastRequests
leastRequests returns the host with the least number of active requests to it. If more than one host has the same least number of active requests, the
modules/caddyhttp/reverseproxy/selectionpolicies.go:805
↓ 2 callers
Method
listenerProtocolsWithDefaults
(lnProtocols []string)
modules/caddyhttp/server.go:936
↓ 2 callers
Function
listenersUseAnyPortOtherThan
listenersUseAnyPortOtherThan returns true if there are any listeners in addresses that use a port which is not otherPort. Mostly borrowed from unexpor
caddyconfig/httpcaddyfile/httptype.go:1688
↓ 2 callers
Method
listenersUseAnyPortOtherThan
listenersUseAnyPortOtherThan returns true if there are any listeners in s that use a port which is not otherPort.
modules/caddyhttp/server.go:547
↓ 2 callers
Method
loadModulesFromSomeMap
loadModulesFromSomeMap loads modules from val, which must be a type of map[string]any. Depending on inlineModuleKey, it will be interpreted as either
context.go:300
↓ 2 callers
Function
lowerExceptPlaceholders
lowerExceptPlaceholders lowercases s except within placeholders (substrings in non-escaped '{ }' spans). See https://github.com/caddyserver/caddy/issu
caddyconfig/httpcaddyfile/addresses.go:478
↓ 2 callers
Function
makeArgsReplacer
makeArgsReplacer prepares a Replacer which can replace non-variadic args placeholders in imported tokens.
caddyconfig/caddyfile/importargs.go:98
↓ 2 callers
Method
makeRedirRoute
(redirToPort uint, matcherSet MatcherSet)
modules/caddyhttp/autohttps.go:544
↓ 2 callers
Function
manageIdentity
manageIdentity sets up automated identity management for this server.
admin.go:461
↓ 2 callers
Method
mapDirOpenError
mapDirOpenError maps the provided non-nil error from opening name to a possibly better non-nil error. In particular, it turns OS-specific errors about
modules/caddyhttp/fileserver/staticfiles.go:636
↓ 2 callers
Method
marshalBinary
marshalBinary writes this config to the cryptobyte builder. If there is an error, it will occur before any writes have happened.
modules/caddytls/ech.go:1042
↓ 2 callers
Method
mask
(s string)
modules/logging/filters.go:257
↓ 2 callers
Function
matchHeaders
matchHeaders returns true if input matches the criteria in against without regex. The host parameter should be obtained from the http.Request.Host fie
modules/caddyhttp/matchers.go:1041
↓ 2 callers
Function
matchIPByCidrZones
(clientIP netip.Addr, zoneID string, cidrs []*netip.Prefix, zones []string)
modules/caddyhttp/ip_matchers.go:340
↓ 2 callers
Method
matches
(ip netip.Addr, ranges []netip.Prefix)
modules/caddytls/matchers.go:390
↓ 2 callers
Function
newCert
(commonName, templateName string, lifetime time.Duration)
modules/caddypki/certificates.go:50
↓ 2 callers
Function
newCloseOnCloseReader
(s string)
modules/caddyhttp/reverseproxy/retries_test.go:43
↓ 2 callers
Function
newDefaultProductionLog
newDefaultProductionLog configures a custom log that is intended for use by default if no other log is specified in a config. It writes to stderr, use
logging.go:710
↓ 2 callers
Function
newDefaultProductionLogEncoder
(wo WriterOpener)
logging.go:735
↓ 2 callers
Function
newOpenTelemetryWrapper
newOpenTelemetryWrapper is responsible for the openTelemetryWrapper initialization using provided configuration.
modules/caddyhttp/tracing/tracer.go:45
↓ 2 callers
Function
newSharedQUICState
newSharedQUICState creates a new sharedQUICState
listeners.go:530
↓ 2 callers
Function
newVarsTestRequest
(t *testing.T, target string, headers http.Header, vars map[string]any)
modules/caddyhttp/vars_test.go:26
↓ 2 callers
Method
nextGroup
()
caddyconfig/httpcaddyfile/httptype.go:1747
↓ 2 callers
Function
normalizeDirPerm
normalizeDirPerm ensures that read bits also have execute bits set.
modules/logging/filewriter.go:299
↓ 2 callers
Function
normalizeDirectiveName
normalizeDirectiveName ensures directives that should be sorted at the same level are named the same before sorting happens.
caddyconfig/httpcaddyfile/httptype.go:1402
↓ 2 callers
Method
normalizeRules
normalizeRules returns `nil` if policy is nil, the `Allow` and `Deny` rules are `nil`,
modules/caddypki/acmeserver/policy.go:67
↓ 2 callers
Function
normalizeWebsocketHeaders
normalizeWebsocketHeaders ensures we use the standard casing as per RFC 6455, i.e. `WebSocket` with uppercase 'S'. Most servers don't care about this
modules/caddyhttp/reverseproxy/reverseproxy.go:746
↓ 2 callers
Method
openCurlyBrace
openCurlyBrace expects the current token to be an opening curly brace. This acts like an assertion because it returns an error if the token is not an
caddyconfig/caddyfile/parse.go:687
↓ 2 callers
Method
openResponseWriter
openResponseWriter creates a new response writer that may (or may not) encode the response with encodingName. The returned response writer MUST be clo
modules/caddyhttp/encode/encode.go:223
↓ 2 callers
Function
parseAdminListenAddr
parseAdminListenAddr extracts a singular listen address from either addr or defaultAddr, returning the network and the address of the listener.
admin.go:1391
↓ 2 callers
Function
parseCanonicalArrayIndex
(idx string)
admin.go:1139
↓ 2 callers
Function
parseEnvFile
parseEnvFile parses an env file from KEY=VALUE format. It's pretty naive. Limited value quotation is supported, but variable and command expansions ar
cmd/main.go:385
↓ 2 callers
Method
parseIPRange
(str string)
modules/caddytls/matchers.go:371
↓ 2 callers
Function
parseIPZoneFromString
(address string)
modules/caddyhttp/ip_matchers.go:317
↓ 2 callers
Function
parseLevel
(levelInput string)
logging.go:751
↓ 2 callers
Function
parseLinkHeader
parseLinkHeader is responsible for parsing Link header and returning list of found resources. Accepted formats are: Link: <resource>; as=script Li
modules/caddyhttp/push/link.go:37
↓ 2 callers
Function
parseLogHelper
parseLogHelper is used both for the parseLog directive within Server Blocks, as well as the global "log" option for configuring loggers at the global
caddyconfig/httpcaddyfile/builtins.go:941
↓ 2 callers
Function
parseMatcherDefinitions
(d *caddyfile.Dispenser, matchers map[string]caddy.ModuleMap)
caddyconfig/httpcaddyfile/httptype.go:1537
↓ 2 callers
Function
parsePolicy
(name string)
modules/caddyhttp/proxyprotocol/policy.go:75
↓ 2 callers
Function
parseSegmentAsConfig
parseSegmentAsConfig parses the segment such that its subdirectives are themselves treated as directives, including named matcher definitions, and the
caddyconfig/httpcaddyfile/directives.go:356
↓ 2 callers
Function
parseVariadic
parseVariadic determines if the token is a variadic placeholder, and if so, determines the index range (start/end) of args to use. Returns a boolean s
caddyconfig/caddyfile/importargs.go:31
↓ 2 callers
Function
placeholderShorthands
placeholderShorthands returns a slice of old-new string pairs, where the left of the pair is a placeholder shorthand that may be used in the Caddyfile
caddyconfig/httpcaddyfile/shorthands.go:53
↓ 2 callers
Function
printEnvironment
()
cmd/main.go:452
↓ 2 callers
Method
processQueryString
(s string)
modules/logging/filters.go:408
↓ 2 callers
Method
processString
processString applies all regexp operations to a single string with input validation.
modules/logging/filters.go:800
↓ 2 callers
Method
promptForCredentials
(w http.ResponseWriter, err error)
modules/caddyhttp/caddyauth/basicauth.go:207
↓ 2 callers
Function
provisionCidrsZonesFromRanges
(ranges []string)
modules/caddyhttp/ip_matchers.go:284
↓ 2 callers
Method
provisionCommon
(ctx Context, logging *Logging)
logging.go:342
↓ 2 callers
Function
provisionContext
provisionContext creates a new context from the given configuration and provisions storage and apps. If `newCfg` is nil a new empty configuration will
caddy.go:484
↓ 2 callers
Method
publishECHConfigs
publishECHConfigs publishes any configs that are configured for publication and which haven't been published already.
modules/caddytls/ech.go:314
↓ 2 callers
Method
publishedSvcParams
(domain string, existing libdns.SvcParams, configListBin []byte)
modules/caddytls/ech.go:906
↓ 2 callers
Function
randString
randString returns a string of n random characters. It is not even remotely secure OR a proper distribution. But it's good enough for some things. It
modules/caddyhttp/errors.go:90
↓ 2 callers
Function
readConfig
readConfig traverses the current config to path and writes its JSON encoding to out.
caddy.go:280
↓ 2 callers
Method
recordAutoHTTPSRedirectAddress
recordAutoHTTPSRedirectAddress stores redirect destinations for one domain using a single winning port while keeping all bind addresses on that port.
modules/caddyhttp/autohttps.go:522
↓ 2 callers
Method
recordedAddrs
recordedAddrs returns a snapshot of all PROXY-header source addresses seen so far.
caddytest/integration/proxyprotocol_test.go:136
↓ 2 callers
Method
registerConnection
registerConnection holds onto conn so it can be closed in the event of a server shutdown. This is useful because hijacked connections or connections d
modules/caddyhttp/reverseproxy/streaming.go:383
↓ 2 callers
Function
removeConnectionHeaders
removeConnectionHeaders removes hop-by-hop headers listed in the "Connection" header of h. See RFC 7230, section 6.1
modules/caddyhttp/reverseproxy/reverseproxy.go:1587
↓ 2 callers
Function
removeTLSALPN
(srv *Server, target string)
modules/caddyhttp/app.go:425
↓ 2 callers
Method
renewCertsForCA
(ca *CA)
modules/caddypki/maintain.go:62
↓ 2 callers
Function
replaceEnvVars
replaceEnvVars replaces all occurrences of environment variables. It mutates the underlying array and returns the updated slice.
caddyconfig/caddyfile/parse.go:69
↓ 2 callers
Function
replaceRemoteAdminServer
replaceRemoteAdminServer replaces the running remote admin server according to the relevant configuration in cfg. It stops any previous remote admin s
admin.go:510
↓ 2 callers
Method
resetHealth
resetHealth resets the health check counters.
modules/caddyhttp/reverseproxy/hosts.go:244
↓ 2 callers
Function
resolveIpVersion
(versions *IPVersions)
modules/caddyhttp/reverseproxy/upstreams.go:265
↓ 2 callers
Function
rootAndIntermediatePEM
(ca *CA)
modules/caddypki/adminapi.go:220
↓ 2 callers
Function
rootCertFromAdmin
rootCertFromAdmin makes the API request to fetch the root certificate for the named CA via admin API.
modules/caddypki/command.go:207
↓ 2 callers
Method
rotateECHKeys
rotateECHKeys updates the ECH keys/configs that are outdated if rotation is needed. It should be called in a write lock on ech.configsMu. If a lock is
modules/caddytls/ech.go:190
↓ 2 callers
Method
rotateKeys
rotateKeys rotates the keys of oldSTEK and returns the new distributedSTEK with updated keys and timestamps. It stores the returned STEK in storage, s
modules/caddytls/distributedstek/distributedstek.go:184
↓ 2 callers
Function
run
run runs newCfg and starts all its apps if start is true. If any errors happen, cleanup is performed if any modules were provisioned; apps that were s
caddy.go:419
↓ 2 callers
Method
selectFile
selectFile chooses a file according to m.TryPolicy by appending the paths in m.TryFiles to m.Root, with placeholder replacements.
modules/caddyhttp/fileserver/matcher.go:333
↓ 2 callers
Method
serveHTTP
serveHTTP is the internal entry point for API requests. It may be called more than once per request, for example if a request is rewritten (i.e. inter
admin.go:812
↓ 2 callers
Function
setAuthUserPlaceholders
(repl *caddy.Replacer, namespace string, user User)
modules/caddyhttp/caddyauth/caddyauth.go:126
↓ 2 callers
Method
setConfigsFromStorage
setConfigsFromStorage sets the ECH configs in memory to those in storage. It must be called in a write lock on ech.configsMu.
modules/caddytls/ech.go:148
↓ 2 callers
Function
setupListenerWrapperTest
(t *testing.T, handlerFunc http.HandlerFunc)
caddytest/integration/listener_test.go:15
↓ 2 callers
Method
shouldLogRequest
shouldLogRequest returns true if this request should be logged.
modules/caddyhttp/server.go:803
↓ 2 callers
Function
splitModule
(arg string)
cmd/packagesfuncs.go:49
← previous
next →
601–700 of 2,647, ranked by callers