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
↓ 1 callers
Method
matchPatternWithEscapeSequence
(escapedPath, matchPath string)
modules/caddyhttp/matchers.go:545
↓ 1 callers
Method
matchStatusCode
(statusCode int)
modules/caddyhttp/responsematchers.go:47
↓ 1 callers
Function
matcherSetFromMatcherToken
( tkn caddyfile.Token, matcherDefs map[string]caddy.ModuleMap, warnings *[]caddyconfig.Warning, )
caddyconfig/httpcaddyfile/httptype.go:1430
↓ 1 callers
Function
matcherSetHasExpressionMatcher
matcherSetHasExpressionMatcher reports whether a matcher set contains at least one expression matcher. Expression matchers can reference response data
modules/caddyhttp/reverseproxy/reverseproxy.go:1785
↓ 1 callers
Method
matches
(ip netip.Addr, ranges []netip.Prefix)
modules/caddytls/matchers.go:505
↓ 1 callers
Method
matchesModule
(moduleID string)
logging.go:525
↓ 1 callers
Function
mergeChallengesConfig
(base, overrides *caddytls.ChallengesConfig)
caddyconfig/httpcaddyfile/tlsapp.go:710
↓ 1 callers
Function
mergeDNSChallengeConfig
(base, overrides *caddytls.DNSChallengeConfig)
caddyconfig/httpcaddyfile/tlsapp.go:771
↓ 1 callers
Function
mergeHTTPChallengeConfig
(base, overrides *caddytls.HTTPChallengeConfig)
caddyconfig/httpcaddyfile/tlsapp.go:733
↓ 1 callers
Function
mergeTLSALPNChallengeConfig
(base, overrides *caddytls.TLSALPNChallengeConfig)
caddyconfig/httpcaddyfile/tlsapp.go:752
↓ 1 callers
Function
mkdirAllFromFile
mkdirAllFromFile creates missing dirs using the file's mode (with r→x) so 0644 → 0755, 0600 → 0700, etc.
modules/logging/filewriter.go:345
↓ 1 callers
Function
mkdirAllInherit
mkdirAllInherit creates missing dirs using the nearest existing parent's permissions, normalized with r→x.
modules/logging/filewriter.go:314
↓ 1 callers
Function
newDelegator
(w http.ResponseWriter)
metrics.go:64
↓ 1 callers
Function
newECHConfigID
(ctx caddy.Context)
modules/caddytls/ech.go:1102
↓ 1 callers
Function
newH2ListenerWithVersionsWithTLSTester
(t *testing.T, serverVersions []string, clientVersions []string)
caddytest/integration/h2listener_test.go:13
↓ 1 callers
Function
newH2ListenerWithVersionsWithoutTLSTester
(t *testing.T, serverVersions []string, clientVersions []string)
caddytest/integration/h2listener_test.go:73
↓ 1 callers
Function
newMaskKey
Copied from https://github.com/gorilla/websocket/blob/v1.5.0/conn.go#L184
modules/caddyhttp/reverseproxy/streaming.go:558
↓ 1 callers
Function
newMetricsUpstreamsHealthyUpdater
(handler *Handler, ctx caddy.Context)
modules/caddyhttp/reverseproxy/metrics.go:53
↓ 1 callers
Function
newProxyProtoBackend
newProxyProtoBackend starts a TCP listener wrapped with go-proxyproto on a random local port and serves requests with a simple "OK" body. The PROXY h
caddytest/integration/proxyprotocol_test.go:79
↓ 1 callers
Method
newResource
newResource creates a resource that describe current handler instance and merge it with a default attributes value.
modules/caddyhttp/tracing/tracer.go:140
↓ 1 callers
Function
newRootCommandFactory
(fn func() *cobra.Command)
cmd/commandfactory.go:12
↓ 1 callers
Function
newTLSProxyProtoBackend
newTLSProxyProtoBackend starts a TLS listener that first reads and strips PROXY protocol headers (go-proxyproto, REQUIRE policy) and then performs a T
caddytest/integration/proxyprotocol_test.go:163
↓ 1 callers
Method
next
next loads the next token into the lexer. A token is delimited by whitespace, unless the token starts with a quotes character (") in which case the to
caddyconfig/caddyfile/lexer.go:107
↓ 1 callers
Method
onlyInternalIssuer
()
modules/caddytls/automation.go:455
↓ 1 callers
Function
onlyVersionText
()
cmd/cobra.go:127
↓ 1 callers
Method
openDatabase
()
modules/caddypki/acmeserver/acmeserver.go:277
↓ 1 callers
Method
openLogs
openLogs sets up the config and opens all the configured writers. It closes its logs when ctx is canceled, so it should clean up after itself.
logging.go:86
↓ 1 callers
Method
openWriter
openWriter opens a writer using opener, and returns true if the writer is new, or false if the writer already exists.
logging.go:250
↓ 1 callers
Method
originAllowed
(origin *url.URL)
admin.go:976
↓ 1 callers
Function
originalRequest
originalRequest returns a partial, shallow copy of req, including: req.Method, deep copy of req.URL (into the urlCopy parameter, which should be on th
modules/caddyhttp/server.go:1015
↓ 1 callers
Function
parseErrorCode
parseErrorCode checks if the input is a status code number, prefixed by "=", and returns an error if so.
modules/caddyhttp/fileserver/matcher.go:533
↓ 1 callers
Method
parseIPRange
(str string)
modules/caddytls/matchers.go:486
↓ 1 callers
Function
pemEncode
(blockType string, b []byte)
modules/caddypki/crypto.go:60
↓ 1 callers
Method
prepareRequest
prepareRequest clones req so that it can be safely modified without changing the original request or introducing data races. It then modifies it so th
modules/caddyhttp/reverseproxy/reverseproxy.go:762
↓ 1 callers
Method
proxyLoopIteration
proxyLoopIteration implements an iteration of the proxy loop. Despite the enormous amount of local state that has to be passed in, we brought this int
modules/caddyhttp/reverseproxy/reverseproxy.go:603
↓ 1 callers
Function
proxyProtoConfig
proxyProtoConfig builds a Caddy JSON configuration that: - listens on listenPort for inbound HTTP requests - proxies them to backendAddr with PROXY pr
caddytest/integration/proxyprotocol_test.go:324
↓ 1 callers
Function
proxyProtoTLSConfig
proxyProtoTLSConfig builds a Caddy JSON configuration that proxies to a TLS upstream with PROXY protocol. The transport uses insecure_skip_verify so
caddytest/integration/proxyprotocol_test.go:228
↓ 1 callers
Method
rangedPort
()
modules/caddyhttp/reverseproxy/addresses.go:49
↓ 1 callers
Function
readFileIntoBuffer
readFileIntoBuffer reads the file at filePath into a size limited buffer.
replacer.go:423
↓ 1 callers
Method
register
register sets the session ticket keys on cfg and keeps them updated. Any values registered must be unregistered, or they will not be garbage-collected
modules/caddytls/sessiontickets.go:164
↓ 1 callers
Function
removeCaddyBinary
removeCaddyBinary removes the Caddy binary at the given path. On any non-Windows OS, this simply calls os.Remove, since they should probably not exhi
cmd/removebinary.go:27
↓ 1 callers
Method
removeNode
(name string)
caddyconfig/caddyfile/importgraph.go:45
↓ 1 callers
Method
removeNodes
(names []string)
caddyconfig/caddyfile/importgraph.go:49
↓ 1 callers
Method
renewCerts
()
modules/caddypki/maintain.go:51
↓ 1 callers
Function
replaceLocalAdminServer
replaceLocalAdminServer replaces the running local admin server according to the relevant configuration in cfg. If no configuration for the admin endp
admin.go:374
↓ 1 callers
Method
replaceablePort
()
modules/caddyhttp/reverseproxy/addresses.go:53
↓ 1 callers
Function
reqEqual
reqEqual if r1 and r2 are equal enough for our purposes.
modules/caddyhttp/rewrite/rewrite_test.go:496
↓ 1 callers
Function
reusePort
reusePort sets SO_REUSEPORT. Ineffective for unix sockets.
listen_unix.go:203
↓ 1 callers
Function
reuseUnixSocket
reuseUnixSocket copies and reuses the unix domain socket (UDS) if we already have it open; if not, unlink it so we can have it. No-op if not a unix ne
listen_unix.go:43
↓ 1 callers
Method
reverseProxy
reverseProxy performs a round-trip to the given backend and processes the response with the client. (This method is mostly the beginning of what was b
modules/caddyhttp/reverseproxy/reverseproxy.go:990
↓ 1 callers
Method
rotate
rotate rotates keys on a regular basis, sending each updated set of keys down keysChan, until doneChan is closed.
modules/caddytls/standardstek/stek.go:84
↓ 1 callers
Method
rotate
rotate rotates keys on a regular basis, sending each updated set of keys down keysChan, until doneChan is closed.
modules/caddytls/distributedstek/distributedstek.go:207
↓ 1 callers
Method
rotationNeeded
rotationNeeded returns true if any ECH key needs to be replaced, or deleted. It must be called inside a read or write lock of ech.configsMu (probably
modules/caddytls/ech.go:285
↓ 1 callers
Method
scanConfigForHosts
scanConfigForHosts scans the HTTP app configuration to build a set of allowed hosts for metrics collection, similar to how auto-HTTPS scans for domain
modules/caddyhttp/metrics.go:232
↓ 1 callers
Function
selectRandomHost
selectRandomHost returns a random available host
modules/caddyhttp/reverseproxy/selectionpolicies.go:780
↓ 1 callers
Method
serveBrowse
(fileSystem fs.FS, root, dirPath string, w http.ResponseWriter, r *http.Request, next caddyhttp.Handler)
modules/caddyhttp/fileserver/browse.go:78
↓ 1 callers
Method
serveHTTP3
serveHTTP3 creates a QUIC listener, configures an HTTP/3 server if not already done, and then uses that server to serve HTTP/3 over the listener, with
modules/caddyhttp/server.go:671
↓ 1 callers
Method
servePreloadLinks
servePreloadLinks parses Link headers from upstream and pushes resources described by them. If a resource has the "nopush" attribute or describes an e
modules/caddyhttp/push/handler.go:166
↓ 1 callers
Method
serversFromPairings
serversFromPairings creates the servers for each pairing of addresses to server blocks. Each pairing is essentially a server definition.
caddyconfig/httpcaddyfile/httptype.go:535
↓ 1 callers
Method
setDeadline
()
listen.go:213
↓ 1 callers
Function
setDefaultTLSParams
setDefaultTLSParams sets the default TLS cipher suites, protocol versions, and server preferences of cfg if they are not already set; it does not over
modules/caddytls/connpolicy.go:931
↓ 1 callers
Method
setReadSize
Private interface so it can only be used in this package #TODO: maybe export it later
modules/caddyhttp/responsewriter.go:251
↓ 1 callers
Function
setResourceLimits
(logger *zap.Logger)
cmd/main.go:475
↓ 1 callers
Method
setupNewDefault
(ctx Context)
logging.go:137
↓ 1 callers
Method
shouldAllowHostMetrics
shouldAllowHostMetrics determines if metrics should be collected for the given host. This implements the cardinality protection by only allowing metri
modules/caddyhttp/metrics.go:270
↓ 1 callers
Method
shouldUseTLS
shouldUseTLS returns true if TLS should be used for req.
modules/caddyhttp/reverseproxy/httptransport.go:580
↓ 1 callers
Function
showVersion
(path string)
cmd/packagesfuncs.go:273
↓ 1 callers
Function
sortRoutes
(routes []ConfigValue)
caddyconfig/httpcaddyfile/directives.go:446
↓ 1 callers
Method
start
start loads the starting STEKs and spawns a goroutine which loops to rotate the STEKs, which continues until stop() is called. If start() was already
modules/caddytls/sessiontickets.go:94
↓ 1 callers
Function
statusError
statusError returns an error value that has a status code.
modules/caddyhttp/reverseproxy/reverseproxy.go:1598
↓ 1 callers
Method
stayUpdated
stayUpdated is a blocking function which rotates the keys whenever new ones are sent. It reads from keysChan until s.stop() is called.
modules/caddytls/sessiontickets.go:122
↓ 1 callers
Method
stop
stop terminates the key rotation goroutine.
modules/caddytls/sessiontickets.go:151
↓ 1 callers
Method
stop
()
modules/caddyhttp/reverseproxy/streaming.go:630
↓ 1 callers
Method
storeSTEK
(dstek distributedSTEK)
modules/caddytls/distributedstek/distributedstek.go:133
↓ 1 callers
Method
strictFileExists
strictFileExists returns true if file exists and matches the convention of the given file path. If the path ends in a forward slash, the file must als
modules/caddyhttp/fileserver/matcher.go:550
↓ 1 callers
Function
stringToChallenges
(chs []string)
modules/caddypki/acmeserver/challenges.go:71
↓ 1 callers
Function
testGetMetricValue
(labels map[string]string)
admin_test.go:397
↓ 1 callers
Function
testH2ToH1ChunkedResponseServeH1
(t *testing.T)
caddytest/integration/stream_test.go:362
↓ 1 callers
Function
testH2ToH2CStreamServeH2C
(t *testing.T)
caddytest/integration/stream_test.go:153
↓ 1 callers
Function
timeElapsed
(start time.Time, name string)
caddytest/caddytest.go:111
↓ 1 callers
Method
tlsNetConn
()
modules/caddyhttp/http2listener.go:81
↓ 1 callers
Method
toSmallstepType
()
modules/caddypki/acmeserver/challenges.go:60
↓ 1 callers
Function
trapSignalsCrossPlatform
trapSignalsCrossPlatform captures SIGINT or interrupt (depending on the OS), which initiates a graceful shutdown. A second SIGINT or interrupt will fo
sigtrap.go:37
↓ 1 callers
Function
trapSignalsPosix
trapSignalsPosix captures POSIX-only signals.
sigtrap_posix.go:31
↓ 1 callers
Function
trusted
(cert *x509.Certificate)
modules/caddypki/crypto.go:66
↓ 1 callers
Function
unmarshalCaddyfileMetricsOptions
(d *caddyfile.Dispenser)
caddyconfig/httpcaddyfile/options.go:478
↓ 1 callers
Function
unmarshalCaddyfileServerOptions
(d *caddyfile.Dispenser)
caddyconfig/httpcaddyfile/serveroptions.go:65
↓ 1 callers
Method
unregister
unregister stops session key management on cfg and removes the internal stored reference to cfg. If session tickets are disabled or if ticket key rota
modules/caddytls/sessiontickets.go:178
↓ 1 callers
Function
unsyncedDecodeAndRun
unsyncedDecodeAndRun removes any meta fields (like @id tags) from cfgJSON, decodes the result into a *Config, and runs it as the new config, replacing
caddy.go:337
↓ 1 callers
Function
userHasInfo
(user User)
modules/caddyhttp/caddyauth/caddyauth.go:122
↓ 1 callers
Method
valLooksLikeGlobalOptionsAfterImportedSnippets
()
caddyconfig/caddyfile/parse.go:697
↓ 1 callers
Function
validateTestPrerequisites
validateTestPrerequisites ensures the certificates are available in the designated path and Caddy sub-process is running.
caddytest/caddytest.go:267
↓ 1 callers
Function
verifyKeysMatch
verifyKeysMatch verifies that the public key in the [x509.Certificate] matches the public key of the [crypto.Signer].
modules/caddypki/crypto.go:127
↓ 1 callers
Function
watchConfigFile
watchConfigFile watches the config file at filename for changes and reloads the config if the file was updated. This function blocks indefinitely; it
cmd/main.go:251
↓ 1 callers
Method
willCycle
(from, to string)
caddyconfig/caddyfile/importgraph.go:98
↓ 1 callers
Function
wrapMiddleware
wrapMiddleware wraps mh such that it can be correctly appended to a list of middleware in preparation for compiling into a handler chain.
modules/caddyhttp/routes.go:331
↓ 1 callers
Method
wrapPrimaryRoute
wrapPrimaryRoute wraps stack (a compiled middleware handler chain) in s.enforcementHandler which performs crucial security checks, etc.
modules/caddyhttp/server.go:516
↓ 1 callers
Method
writeBeginRequest
(role uint16, flags uint8)
modules/caddyhttp/reverseproxy/fastcgi/writer.go:41
↓ 1 callers
Function
writeCaddyBinary
(path string, body *io.ReadCloser, fileInfo os.FileInfo)
cmd/packagesfuncs.go:319
↓ 1 callers
Function
writeCloseControl
writeCloseControl sends a best-effort Close control message to the given WebSocket connection. Thanks to @pascaldekloe who provided inspiration from h
modules/caddyhttp/reverseproxy/streaming.go:463
← previous
next →
1,101–1,200 of 2,647, ranked by callers