MCPcopy Create free account

hub / github.com/0x4D31/finch / functions

Functions481 in github.com/0x4D31/finch

↓ 78 callersMethodGet
(key string)
internal/proxy/cache.go:52
↓ 68 callersMethodClose
()
internal/proxy/server_test.go:1330
↓ 67 callersMethodClose
Close immediately closes the server.
internal/proxy/server.go:251
↓ 46 callersMethodWriteHeader
(statusCode int)
internal/sse/server_test.go:54
↓ 39 callersMethodClose
Close closes underlying writer if it is a file.
internal/logger/jsonl.go:107
↓ 37 callersFunctionNew
New returns a new admin server. addr specifies the address the server listens on. cfg provides the initial configuration served at /config; it may be
internal/admin/server.go:52
↓ 36 callersFunctionLoad
Load reads and validates the HCL configuration from path.
internal/config/config.go:381
↓ 36 callersFunctionLoadHCL
LoadHCL loads rules from an HCL file.
internal/rules/hcl.go:248
↓ 36 callersMethodServe
()
internal/proxy/http3.go:190
↓ 34 callersFunctionNew
New creates a Server that listens on listenAddr and forwards to upstreamURL. A self-signed certificate is generated if certFile and keyFile are empty.
internal/proxy/server.go:111
↓ 33 callersMethodAdd
(key string, val *reverseproxy.HTTPHandler, tr *http.Transport)
internal/proxy/cache.go:62
↓ 32 callersMethodClose
Close stops the parser's background goroutine.
pkg/quic/clienthello.go:115
↓ 32 callersFunctionNew
New creates a Logger writing to path. If path is empty, stdout is used.
internal/logger/jsonl.go:68
↓ 32 callersFunctionreadVarInt
(b []byte)
pkg/quic/clienthello.go:169
↓ 31 callersMethodHeader
()
internal/sse/server_test.go:47
↓ 25 callersFunctionnewTestConfig
(t *testing.T)
internal/admin/server_test.go:21
↓ 24 callersFunctionExtractClientHello
ExtractClientHello decrypts a QUIC Initial datagram (v1 or v2) and returns a TLS-style ClientHello record ready for fingerprinting.
pkg/quic/clienthello.go:663
↓ 24 callersFunctionwithRange
withRange appends line and column information to an error using the provided range.
internal/rules/hcl.go:92
↓ 22 callersMethodwrap
(h http.HandlerFunc)
internal/admin/server.go:99
↓ 19 callersFunctionEnumerateRuleSets
EnumerateRuleSets returns info for all rule files referenced by cfg. The returned slice is sorted by path and stable across invocations.
internal/config/config.go:102
↓ 16 callersFunctionNewHub
NewHub creates a Hub.
internal/sse/hub.go:15
↓ 15 callersFunctionhexToBytes
(t *testing.T, s string)
pkg/quic/clienthello_test.go:22
↓ 14 callersFunctionAbsFromCWD
AbsFromCWD resolves p against the current working directory when not already absolute and returns a canonical absolute path.
internal/loader/loader.go:55
↓ 13 callersFunctionapplyHeaderProtection
(first *byte, pn []byte, hpKey, sample []byte, alg string)
pkg/quic/clienthello.go:266
↓ 12 callersMethodloadConfig
(w http.ResponseWriter, r *http.Request)
internal/admin/server.go:131
↓ 11 callersFunctionNewLoader
NewLoader creates a Loader for the given default rule action.
cmd/finch/loader.go:29
↓ 11 callersMethodPublish
Publish sends the event to all subscribers, dropping it for any subscriber whose buffer is full.
internal/sse/hub.go:21
↓ 11 callersFunctionWatch
Watch monitors path for modifications and invokes onChange on each change. It continues watching even if the file or directory is recreated, using exp
internal/watch/watch.go:22
↓ 11 callersFunctionderiveInitialKeys
(dcid, salt []byte, version uint32, keyLen int)
pkg/quic/clienthello.go:138
↓ 10 callersMethodEval
(*fingerprint.RequestCtx)
internal/rules/hcl.go:26
↓ 10 callersMethodLoadFromFile
LoadFromFile loads rule definitions from an HCL file.
internal/rules/engine.go:29
↓ 10 callersFunctionNewServer
NewServer creates a new SSE server bound to addr.
internal/sse/server.go:22
↓ 10 callersMethodShutdown
Shutdown gracefully stops the server.
internal/sse/server.go:34
↓ 10 callersMethodSubscribe
Subscribe registers a new subscriber with the given buffer size. The returned channel is closed when the context is done.
internal/sse/hub.go:49
↓ 9 callersMethodEvalRule
Eval finds the first matching rule for the request context. If no rule matches, ActionAllow and empty ruleID are returned.
internal/rules/engine.go:47
↓ 9 callersMethodLoad
Load replaces the engine rule set atomically.
internal/rules/engine.go:19
↓ 9 callersMethodServeHTTP
(w http.ResponseWriter, r *http.Request)
internal/proxy/server.go:384
↓ 9 callersFunctionclearStates
()
pkg/quic/clienthello_test.go:148
↓ 9 callersFunctioncompileFieldCond
(name string, vals []string)
internal/rules/hcl.go:457
↓ 9 callersFunctioncompilePattern
(p string, ci bool)
internal/rules/hcl.go:656
↓ 9 callersFunctionmakeInitialPacketOffset
(t *testing.T, version []byte, pnLen int, salt []byte, dcid []byte, off uint64, data []byte)
pkg/quic/clienthello_test.go:166
↓ 9 callersMethodshutdown
(pf parsedFlags)
cmd/finch/runtime.go:262
↓ 9 callersFunctionwatchConfig
watchConfig watches the provided config file for changes and reloads rule engines and Suricata sets via the given Loader when updates occur.
cmd/finch/configwatcher.go:34
↓ 8 callersMethodClose
()
internal/proxy/http3_error_test.go:42
↓ 8 callersMethodLoadEngine
LoadEngine loads rules from path and watches for changes.
cmd/finch/loader.go:39
↓ 8 callersMethodWrite
(p []byte)
internal/sse/server_test.go:48
↓ 8 callersMethodhandleRule
(id, ruleID string, w http.ResponseWriter, r *http.Request)
internal/admin/server.go:361
↓ 8 callersMethodhandleRuleSet
(w http.ResponseWriter, r *http.Request)
internal/admin/server.go:248
↓ 8 callersFunctionmakeInitialPacket
(t *testing.T, version []byte, pnLen int, salt []byte, ch []byte)
pkg/quic/clienthello_test.go:77
↓ 7 callersMethodStart
()
cmd/finch/runtime.go:227
↓ 7 callersFunctionencodeVarInt
(v uint64)
pkg/quic/clienthello_test.go:153
↓ 7 callersFunctionfreePort
(t *testing.T)
cmd/finch/main_test.go:26
↓ 7 callersFunctionparseFile
(path string)
internal/admin/rulefile.go:55
↓ 7 callersFunctionrangeFromDiags
rangeFromDiags returns the first diagnostic's subject range, if any.
internal/rules/hcl.go:97
↓ 7 callersMethodupdateListenerRuleset
(w http.ResponseWriter, r *http.Request)
internal/admin/server.go:494
↓ 6 callersFunctionNew
New extracts fingerprint information from the request context. When the context lacks metadata from fingerproxy, fingerprint fields remain empty and n
internal/fingerprint/context.go:33
↓ 6 callersMethodStart
Start begins listening for connections.
internal/sse/server.go:31
↓ 6 callersFunctionSynthesiseFromFlags
SynthesiseFromFlags builds a config for quick mode from a cli.Command.
internal/loader/loader.go:183
↓ 6 callersFunctionValidate
Validate checks that cfg contains all mandatory fields and no duplicate listener IDs.
internal/config/config.go:228
↓ 6 callersMethodadd
(addr string, rec []byte)
internal/proxy/http3.go:61
↓ 6 callersMethodevents
(w http.ResponseWriter, r *http.Request)
internal/sse/server.go:36
↓ 6 callersFunctionwriteAtomic
(path string, data []byte)
internal/admin/rulefile.go:75
↓ 5 callersFunctionFlush
Flush calls Flush on fl and returns any FlushErr result.
internal/sse/flush.go:12
↓ 5 callersMethodRemoveWatch
RemoveWatch is an alias for CancelWatcher for backward compatibility.
cmd/finch/loader.go:180
↓ 5 callersMethodSetGalahOptions
SetGalahOptions updates Galah cache and event logging settings.
internal/proxy/server.go:283
↓ 5 callersFunctionapplyHeaderProtectionMask
(first *byte, pn []byte, mask []byte)
pkg/quic/clienthello.go:256
↓ 5 callersFunctioncompilePathPattern
(p string)
internal/rules/hcl.go:618
↓ 5 callersFunctionextractClientHelloFrames
extractClientHelloFrames is a helper used in tests to parse CRYPTO frames from a QUIC Initial payload and assemble the contained ClientHello bytes.
pkg/quic/clienthello_test.go:307
↓ 5 callersMethodget
(addr string)
internal/proxy/http3.go:88
↓ 5 callersFunctionnewInspectConn
(pc net.PacketConn)
internal/proxy/http3.go:38
↓ 5 callersFunctionrunServe
runServe parses args using the serve flags and returns the resulting config after applying overrides or synthesis. It mirrors serveAction without star
cmd/finch/cli_test.go:21
↓ 5 callersFunctionrunValidate
(args []string)
cmd/finch/cli_test.go:177
↓ 5 callersFunctionstartRuntime
(cfg *config.Config, pf parsedFlags, hub *sse.Hub, sseSrv **sse.Server, adminSrv **admin.Server)
cmd/finch/runtime.go:241
↓ 4 callersMethodLoadSuricata
LoadSuricata loads Suricata rules from dir and watches for changes.
cmd/finch/loader.go:97
↓ 4 callersMethodLog
Log writes the event as a single JSON line.
internal/logger/jsonl.go:115
↓ 4 callersFunctionMerge
Merge applies CLI overrides to cfg according to precedence rules.
internal/loader/loader.go:91
↓ 4 callersFunctionResolvePaths
ResolvePaths updates all path fields in cfg to be absolute by joining them with baseDir when they are not already absolute. baseDir is resolved to its
internal/config/config.go:135
↓ 4 callersMethodaddListener
(l config.ListenerConfig, cfg *config.Config, globalEng *rules.Engine, suriSet *atomic.Pointer[suricata.RuleSe
cmd/finch/runtime.go:129
↓ 4 callersFunctioncanonicalPath
(p string)
cmd/finch/configwatcher.go:21
↓ 4 callersFunctiondecodePN
(b []byte)
pkg/quic/clienthello.go:192
↓ 4 callersFunctiondecryptInitial
(key, iv []byte, pn uint64, header, payload []byte)
pkg/quic/clienthello.go:271
↓ 4 callersMethodgetProxy
(u *url.URL)
internal/proxy/server.go:693
↓ 4 callersFunctionheaderProtectionMask
(hpKey, sample []byte, alg string)
pkg/quic/clienthello.go:235
↓ 4 callersFunctionhkdfExpandLabel
(secret []byte, label string, l int)
pkg/quic/clienthello.go:123
↓ 4 callersFunctionnewH3Server
(addr string, handler http.Handler, tlsConf *tls.Config)
internal/proxy/http3.go:171
↓ 4 callersFunctionnewProxyCache
(size int)
internal/proxy/cache.go:41
↓ 4 callersFunctionnewTarpitHandler
(cfg TarpitConfig)
internal/proxy/tarpit.go:86
↓ 4 callersFunctionselfSignedCert
selfSignedCert creates a temporary self-signed certificate.
internal/proxy/server.go:316
↓ 4 callersFunctionsingleSlashJoin
(a, b string)
internal/proxy/util.go:10
↓ 4 callersMethodupdateETag
()
internal/admin/server.go:66
↓ 4 callersFunctionwaitForEngine
(t *testing.T, e *Engine, cond func([]*Rule) bool)
internal/rules/engine_watch_test.go:13
↓ 3 callersMethodClose
()
internal/proxy/http3.go:198
↓ 3 callersFunctionEvalComposite
EvalComposite evaluates the request against a listener-specific engine first and then the global engine. The global engine's DefaultAction is used whe
internal/rules/engine.go:76
↓ 3 callersMethodLocalAddr
()
internal/proxy/http3_error_test.go:43
↓ 3 callersMethodSetGalahService
SetGalahService stores svc atomically and updates the rule handler.
internal/proxy/server.go:275
↓ 3 callersMethodWrite
(b []byte)
internal/proxy/echo_error_test.go:20
↓ 3 callersFunctionWriteJSON
WriteJSON writes cfg encoded as JSON to path.
internal/config/config.go:440
↓ 3 callersFunctioncomputePNLen
(first, mask0 byte, version uint32)
pkg/quic/clienthello.go:225
↓ 3 callersFunctiondecodePacketType
(first byte, version uint32)
pkg/quic/clienthello.go:214
↓ 3 callersFunctionechoHandler
echoHandler serves fingerprint details of the client.
internal/proxy/echo.go:150
next →1–100 of 481, ranked by callers