Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/0x4D31/finch
/ functions
Functions
481 in github.com/0x4D31/finch
⨍
Functions
481
◇
Types & classes
63
↓ 78 callers
Method
Get
(key string)
internal/proxy/cache.go:52
↓ 68 callers
Method
Close
()
internal/proxy/server_test.go:1330
↓ 67 callers
Method
Close
Close immediately closes the server.
internal/proxy/server.go:251
↓ 46 callers
Method
WriteHeader
(statusCode int)
internal/sse/server_test.go:54
↓ 39 callers
Method
Close
Close closes underlying writer if it is a file.
internal/logger/jsonl.go:107
↓ 37 callers
Function
New
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 callers
Function
Load
Load reads and validates the HCL configuration from path.
internal/config/config.go:381
↓ 36 callers
Function
LoadHCL
LoadHCL loads rules from an HCL file.
internal/rules/hcl.go:248
↓ 36 callers
Method
Serve
()
internal/proxy/http3.go:190
↓ 34 callers
Function
New
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 callers
Method
Add
(key string, val *reverseproxy.HTTPHandler, tr *http.Transport)
internal/proxy/cache.go:62
↓ 32 callers
Method
Close
Close stops the parser's background goroutine.
pkg/quic/clienthello.go:115
↓ 32 callers
Function
New
New creates a Logger writing to path. If path is empty, stdout is used.
internal/logger/jsonl.go:68
↓ 32 callers
Function
readVarInt
(b []byte)
pkg/quic/clienthello.go:169
↓ 31 callers
Method
Header
()
internal/sse/server_test.go:47
↓ 25 callers
Function
newTestConfig
(t *testing.T)
internal/admin/server_test.go:21
↓ 24 callers
Function
ExtractClientHello
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 callers
Function
withRange
withRange appends line and column information to an error using the provided range.
internal/rules/hcl.go:92
↓ 22 callers
Method
wrap
(h http.HandlerFunc)
internal/admin/server.go:99
↓ 19 callers
Function
EnumerateRuleSets
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 callers
Function
NewHub
NewHub creates a Hub.
internal/sse/hub.go:15
↓ 15 callers
Function
hexToBytes
(t *testing.T, s string)
pkg/quic/clienthello_test.go:22
↓ 14 callers
Function
AbsFromCWD
AbsFromCWD resolves p against the current working directory when not already absolute and returns a canonical absolute path.
internal/loader/loader.go:55
↓ 13 callers
Function
applyHeaderProtection
(first *byte, pn []byte, hpKey, sample []byte, alg string)
pkg/quic/clienthello.go:266
↓ 12 callers
Method
loadConfig
(w http.ResponseWriter, r *http.Request)
internal/admin/server.go:131
↓ 11 callers
Function
NewLoader
NewLoader creates a Loader for the given default rule action.
cmd/finch/loader.go:29
↓ 11 callers
Method
Publish
Publish sends the event to all subscribers, dropping it for any subscriber whose buffer is full.
internal/sse/hub.go:21
↓ 11 callers
Function
Watch
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 callers
Function
deriveInitialKeys
(dcid, salt []byte, version uint32, keyLen int)
pkg/quic/clienthello.go:138
↓ 10 callers
Method
Eval
(*fingerprint.RequestCtx)
internal/rules/hcl.go:26
↓ 10 callers
Method
LoadFromFile
LoadFromFile loads rule definitions from an HCL file.
internal/rules/engine.go:29
↓ 10 callers
Function
NewServer
NewServer creates a new SSE server bound to addr.
internal/sse/server.go:22
↓ 10 callers
Method
Shutdown
Shutdown gracefully stops the server.
internal/sse/server.go:34
↓ 10 callers
Method
Subscribe
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 callers
Method
EvalRule
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 callers
Method
Load
Load replaces the engine rule set atomically.
internal/rules/engine.go:19
↓ 9 callers
Method
ServeHTTP
(w http.ResponseWriter, r *http.Request)
internal/proxy/server.go:384
↓ 9 callers
Function
clearStates
()
pkg/quic/clienthello_test.go:148
↓ 9 callers
Function
compileFieldCond
(name string, vals []string)
internal/rules/hcl.go:457
↓ 9 callers
Function
compilePattern
(p string, ci bool)
internal/rules/hcl.go:656
↓ 9 callers
Function
makeInitialPacketOffset
(t *testing.T, version []byte, pnLen int, salt []byte, dcid []byte, off uint64, data []byte)
pkg/quic/clienthello_test.go:166
↓ 9 callers
Method
shutdown
(pf parsedFlags)
cmd/finch/runtime.go:262
↓ 9 callers
Function
watchConfig
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 callers
Method
Close
()
internal/proxy/http3_error_test.go:42
↓ 8 callers
Method
LoadEngine
LoadEngine loads rules from path and watches for changes.
cmd/finch/loader.go:39
↓ 8 callers
Method
Write
(p []byte)
internal/sse/server_test.go:48
↓ 8 callers
Method
handleRule
(id, ruleID string, w http.ResponseWriter, r *http.Request)
internal/admin/server.go:361
↓ 8 callers
Method
handleRuleSet
(w http.ResponseWriter, r *http.Request)
internal/admin/server.go:248
↓ 8 callers
Function
makeInitialPacket
(t *testing.T, version []byte, pnLen int, salt []byte, ch []byte)
pkg/quic/clienthello_test.go:77
↓ 7 callers
Method
Start
()
cmd/finch/runtime.go:227
↓ 7 callers
Function
encodeVarInt
(v uint64)
pkg/quic/clienthello_test.go:153
↓ 7 callers
Function
freePort
(t *testing.T)
cmd/finch/main_test.go:26
↓ 7 callers
Function
parseFile
(path string)
internal/admin/rulefile.go:55
↓ 7 callers
Function
rangeFromDiags
rangeFromDiags returns the first diagnostic's subject range, if any.
internal/rules/hcl.go:97
↓ 7 callers
Method
updateListenerRuleset
(w http.ResponseWriter, r *http.Request)
internal/admin/server.go:494
↓ 6 callers
Function
New
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 callers
Method
Start
Start begins listening for connections.
internal/sse/server.go:31
↓ 6 callers
Function
SynthesiseFromFlags
SynthesiseFromFlags builds a config for quick mode from a cli.Command.
internal/loader/loader.go:183
↓ 6 callers
Function
Validate
Validate checks that cfg contains all mandatory fields and no duplicate listener IDs.
internal/config/config.go:228
↓ 6 callers
Method
add
(addr string, rec []byte)
internal/proxy/http3.go:61
↓ 6 callers
Method
events
(w http.ResponseWriter, r *http.Request)
internal/sse/server.go:36
↓ 6 callers
Function
writeAtomic
(path string, data []byte)
internal/admin/rulefile.go:75
↓ 5 callers
Function
Flush
Flush calls Flush on fl and returns any FlushErr result.
internal/sse/flush.go:12
↓ 5 callers
Method
RemoveWatch
RemoveWatch is an alias for CancelWatcher for backward compatibility.
cmd/finch/loader.go:180
↓ 5 callers
Method
SetGalahOptions
SetGalahOptions updates Galah cache and event logging settings.
internal/proxy/server.go:283
↓ 5 callers
Function
applyHeaderProtectionMask
(first *byte, pn []byte, mask []byte)
pkg/quic/clienthello.go:256
↓ 5 callers
Function
compilePathPattern
(p string)
internal/rules/hcl.go:618
↓ 5 callers
Function
extractClientHelloFrames
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 callers
Method
get
(addr string)
internal/proxy/http3.go:88
↓ 5 callers
Function
newInspectConn
(pc net.PacketConn)
internal/proxy/http3.go:38
↓ 5 callers
Function
runServe
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 callers
Function
runValidate
(args []string)
cmd/finch/cli_test.go:177
↓ 5 callers
Function
startRuntime
(cfg *config.Config, pf parsedFlags, hub *sse.Hub, sseSrv **sse.Server, adminSrv **admin.Server)
cmd/finch/runtime.go:241
↓ 4 callers
Method
LoadSuricata
LoadSuricata loads Suricata rules from dir and watches for changes.
cmd/finch/loader.go:97
↓ 4 callers
Method
Log
Log writes the event as a single JSON line.
internal/logger/jsonl.go:115
↓ 4 callers
Function
Merge
Merge applies CLI overrides to cfg according to precedence rules.
internal/loader/loader.go:91
↓ 4 callers
Function
ResolvePaths
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 callers
Method
addListener
(l config.ListenerConfig, cfg *config.Config, globalEng *rules.Engine, suriSet *atomic.Pointer[suricata.RuleSe
cmd/finch/runtime.go:129
↓ 4 callers
Function
canonicalPath
(p string)
cmd/finch/configwatcher.go:21
↓ 4 callers
Function
decodePN
(b []byte)
pkg/quic/clienthello.go:192
↓ 4 callers
Function
decryptInitial
(key, iv []byte, pn uint64, header, payload []byte)
pkg/quic/clienthello.go:271
↓ 4 callers
Method
getProxy
(u *url.URL)
internal/proxy/server.go:693
↓ 4 callers
Function
headerProtectionMask
(hpKey, sample []byte, alg string)
pkg/quic/clienthello.go:235
↓ 4 callers
Function
hkdfExpandLabel
(secret []byte, label string, l int)
pkg/quic/clienthello.go:123
↓ 4 callers
Function
newH3Server
(addr string, handler http.Handler, tlsConf *tls.Config)
internal/proxy/http3.go:171
↓ 4 callers
Function
newProxyCache
(size int)
internal/proxy/cache.go:41
↓ 4 callers
Function
newTarpitHandler
(cfg TarpitConfig)
internal/proxy/tarpit.go:86
↓ 4 callers
Function
selfSignedCert
selfSignedCert creates a temporary self-signed certificate.
internal/proxy/server.go:316
↓ 4 callers
Function
singleSlashJoin
(a, b string)
internal/proxy/util.go:10
↓ 4 callers
Method
updateETag
()
internal/admin/server.go:66
↓ 4 callers
Function
waitForEngine
(t *testing.T, e *Engine, cond func([]*Rule) bool)
internal/rules/engine_watch_test.go:13
↓ 3 callers
Method
Close
()
internal/proxy/http3.go:198
↓ 3 callers
Function
EvalComposite
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 callers
Method
LocalAddr
()
internal/proxy/http3_error_test.go:43
↓ 3 callers
Method
SetGalahService
SetGalahService stores svc atomically and updates the rule handler.
internal/proxy/server.go:275
↓ 3 callers
Method
Write
(b []byte)
internal/proxy/echo_error_test.go:20
↓ 3 callers
Function
WriteJSON
WriteJSON writes cfg encoded as JSON to path.
internal/config/config.go:440
↓ 3 callers
Function
computePNLen
(first, mask0 byte, version uint32)
pkg/quic/clienthello.go:225
↓ 3 callers
Function
decodePacketType
(first byte, version uint32)
pkg/quic/clienthello.go:214
↓ 3 callers
Function
echoHandler
echoHandler serves fingerprint details of the client.
internal/proxy/echo.go:150
next →
1–100 of 481, ranked by callers