diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-07-29 02:21:12 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-07-29 02:23:06 +0900 |
| commit | b43d10468039a07ada412dcab83e8e074ab9ef46 (patch) | |
| tree | 3eca94296dea7e9c364be9e3b29e18c6d33971a2 /hst | |
| parent | ddf48a6c22d4387ff2ca2e45afbcc86fa7d81968 (diff) | |
app: integrate interrupt forwarding
This significantly increases usability of command line tools running through hakurei.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'hst')
| -rw-r--r-- | hst/container.go | 2 | ||||
| -rw-r--r-- | hst/template.go | 22 | ||||
| -rw-r--r-- | hst/template_test.go | 2 |
3 files changed, 16 insertions, 10 deletions
diff --git a/hst/container.go b/hst/container.go index 00f74795..1ee9e839 100644 --- a/hst/container.go +++ b/hst/container.go @@ -10,6 +10,8 @@ type ( // container hostname Hostname string `json:"hostname,omitempty"` + // do not interrupt and wait for initial process during termination + ImmediateTermination bool `json:"immediate_termination,omitempty"` // extra seccomp flags SeccompFlags seccomp.ExportFlag `json:"seccomp_flags"` // extra seccomp presets diff --git a/hst/template.go b/hst/template.go index 3f0101ea..60af2ebc 100644 --- a/hst/template.go +++ b/hst/template.go @@ -57,16 +57,18 @@ func Template() *Config { Groups: []string{"video", "dialout", "plugdev"}, Container: &ContainerConfig{ - Hostname: "localhost", - Devel: true, - Userns: true, - Net: true, - Device: true, - SeccompFlags: seccomp.AllowMultiarch, - SeccompPresets: seccomp.PresetExt, - Tty: true, - Multiarch: true, - MapRealUID: true, + Hostname: "localhost", + Devel: true, + Userns: true, + Net: true, + Device: true, + ImmediateTermination: true, + SeccompFlags: seccomp.AllowMultiarch, + SeccompPresets: seccomp.PresetExt, + SeccompCompat: true, + Tty: true, + Multiarch: true, + MapRealUID: true, // example API credentials pulled from Google Chrome // DO NOT USE THESE IN A REAL BROWSER Env: map[string]string{ diff --git a/hst/template_test.go b/hst/template_test.go index 2baf991b..a9b92262 100644 --- a/hst/template_test.go +++ b/hst/template_test.go @@ -80,8 +80,10 @@ func TestTemplate(t *testing.T) { ], "container": { "hostname": "localhost", + "immediate_termination": true, "seccomp_flags": 1, "seccomp_presets": 1, + "seccomp_compat": true, "devel": true, "userns": true, "net": true, |
