fragcap

Profile schema

The TOML schema a profile declares: game identity, capture defaults, and the stages that match processes.

A profile is a TOML file that names a game and describes the processes fragcap should attribute its traffic to. It is validated before every capture: a profile that does not parse cleanly stops the run, and validation reports every problem it finds in one pass rather than the first.

This is schema version 1. Unknown keys are refused, not ignored, so a typo such as payloads = false for payload = false is reported rather than silently producing a capture you did not intend.

A minimal profile

schema = 1

[game]
id = "game"
name = "Test Game"

[[stage]]
role = "client"
lifecycle = "session"
terminal = true
match = { exe = "game.exe" }

Top level

KeyRequiredMeaning
schemayesThe schema version. 1.
gameyesThe game's identity (below).
capturenoCapture defaults (below).
stageyesOne or more [[stage]] tables; at least one.

[game]

KeyRequiredMeaning
idyesThe slug, used to resolve the profile by name.
nameyesThe display name.
platformnoThe platform for managed launch, if any.
app_idnoThe platform's application id, if any.

[capture]

Defaults the command line can override. Each key here corresponds to a run flag.

KeyMeaning
modeThe capture mode: file, stream, or ring.
durationThe default capture duration bound (for example "5m").
rolesThe roles captured by default.
loopbackWhether to include the loopback adapter.
payloadWhether to record packet payloads.

[[stage]]

Each stage names one process fragcap watches for and how its lifecycle affects the capture. A profile has one or more stages.

KeyRequiredMeaning
roleyesThe stage's role name, unique within the profile.
lifecycleyesHow an exit is treated: transient, session, or service.
terminalnoWhether this stage's exit ends the capture. At most one stage is terminal, and its lifecycle is session.
matchyesThe predicates that select the process (below).

match

An inline table of predicates. All that are present must hold for a process to match. A validated profile always constrains at least one.

KeyMatches against
exeThe executable file name, as a glob (for example "game.exe").
path_containsA substring of the full image path.
path_regexA regular expression against the full image path.
cmdline_containsA substring of the process command line.
descends_fromThe role of an ancestor process, resolved over the process tree fragcap builds. It never matches a process against itself.

descends_from is how a profile names a client launched indirectly: it matches the process whose ancestor is another stage's process, rather than assuming the client is a direct child of the launcher. See writing a profile for the worked case.

On this page