Documentation
¶
Index ¶
- func ApplyLandlockRestrictions(logger *slog.Logger, cfg LandlockConfig) error
- func Run(ctx context.Context, logger *slog.Logger, config config.AppConfig) error
- func RunChild(logger *slog.Logger, config config.AppConfig) error
- func RunParent(ctx context.Context, logger *slog.Logger, config config.AppConfig) error
- type LandJail
- type LandlockConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyLandlockRestrictions ¶
func ApplyLandlockRestrictions(logger *slog.Logger, cfg LandlockConfig) error
func Run ¶
Run is the main entry point that determines whether to execute as a parent or child process. If running as a child (CHILD env var is set), it applies landlock restrictions and executes the target command. Otherwise, it runs as the parent process, sets up the proxy server, and manages the child process lifecycle.
Types ¶
type LandJail ¶
type LandJail struct {
// contains filtered or unexported fields
}
func NewLandJail ¶
func (*LandJail) RunChildProcess ¶
type LandlockConfig ¶
type LandlockConfig struct {
// TODO(yevhenii):
// - should it be able to bind to any port?
// - should it be able to connect to any port on localhost?
// BindTCPPorts []int
ConnectTCPPorts []int
}
Click to show internal directories.
Click to hide internal directories.