firewall

package
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 26, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCmdAdd

func NewCmdAdd(f *cmdutil.Factory, runF func(context.Context, *AddOptions) error) *cobra.Command

NewCmdAdd creates the firewall add command.

func NewCmdBypass

func NewCmdBypass(f *cmdutil.Factory, runF func(context.Context, *BypassOptions) error) *cobra.Command

NewCmdBypass creates the firewall bypass command.

func NewCmdDisable

func NewCmdDisable(f *cmdutil.Factory, runF func(context.Context, *DisableOptions) error) *cobra.Command

NewCmdDisable creates the firewall disable command.

func NewCmdDown

func NewCmdDown(f *cmdutil.Factory, runF func(context.Context, *DownOptions) error) *cobra.Command

NewCmdDown creates the firewall down command.

func NewCmdEnable

func NewCmdEnable(f *cmdutil.Factory, runF func(context.Context, *EnableOptions) error) *cobra.Command

NewCmdEnable creates the firewall enable command.

func NewCmdFirewall

func NewCmdFirewall(f *cmdutil.Factory) *cobra.Command

NewCmdFirewall creates the parent command for firewall management.

func NewCmdList

func NewCmdList(f *cmdutil.Factory, runF func(context.Context, *ListOptions) error) *cobra.Command

NewCmdList creates the firewall list command.

func NewCmdReload

func NewCmdReload(f *cmdutil.Factory, runF func(context.Context, *ReloadOptions) error) *cobra.Command

NewCmdReload creates the firewall reload command.

func NewCmdRemove

func NewCmdRemove(f *cmdutil.Factory, runF func(context.Context, *RemoveOptions) error) *cobra.Command

NewCmdRemove creates the firewall remove command.

func NewCmdRotateCA

func NewCmdRotateCA(f *cmdutil.Factory, runF func(context.Context, *RotateCAOptions) error) *cobra.Command

NewCmdRotateCA creates the firewall rotate-ca command.

func NewCmdServe

func NewCmdServe(f *cmdutil.Factory, runF func(context.Context, *UpOptions) error) *cobra.Command

NewCmdServe creates the hidden blocking daemon entrypoint. This is invoked by the detached firewall startup path.

func NewCmdStatus

func NewCmdStatus(f *cmdutil.Factory, runF func(context.Context, *StatusOptions) error) *cobra.Command

NewCmdStatus creates the firewall status command.

func NewCmdUp

func NewCmdUp(f *cmdutil.Factory, runF func(context.Context, *UpOptions) error) *cobra.Command

NewCmdUp creates the firewall up command. This ensures the firewall daemon is running, then returns immediately.

Types

type AddOptions

type AddOptions struct {
	IOStreams *iostreams.IOStreams
	Firewall  func(context.Context) (firewall.FirewallManager, error)
	Domain    string
	Proto     string
	Port      int
}

AddOptions holds the options for the firewall add command.

type BypassDashboardConfig

type BypassDashboardConfig struct {
	Agent    string
	Duration time.Duration
}

BypassDashboardConfig holds the configuration for the bypass dashboard.

type BypassDashboardResult

type BypassDashboardResult struct {
	Err         error
	Detached    bool // user pressed q/Esc (switch to non-interactive)
	Interrupted bool // user pressed Ctrl+C (stop bypass)
}

BypassDashboardResult is returned when the dashboard exits.

func RunBypassDashboard

func RunBypassDashboard(ios *iostreams.IOStreams, cfg BypassDashboardConfig, ch <-chan any) BypassDashboardResult

RunBypassDashboard runs the interactive bypass dashboard.

type BypassOptions

type BypassOptions struct {
	IOStreams      *iostreams.IOStreams
	TUI            *tui.TUI
	ProjectManager func() (project.ProjectManager, error)
	Firewall       func(context.Context) (firewall.FirewallManager, error)
	Agent          string
	Duration       time.Duration
	Stop           bool
	NonInteractive bool
}

BypassOptions holds the options for the firewall bypass command.

type DisableOptions

type DisableOptions struct {
	IOStreams      *iostreams.IOStreams
	ProjectManager func() (project.ProjectManager, error)
	Firewall       func(context.Context) (firewall.FirewallManager, error)
	Agent          string
}

DisableOptions holds the options for the firewall disable command.

type DownOptions

type DownOptions struct {
	IOStreams *iostreams.IOStreams
	Config    func() (config.Config, error)
}

DownOptions holds the options for the firewall down command.

type EnableOptions

type EnableOptions struct {
	IOStreams      *iostreams.IOStreams
	ProjectManager func() (project.ProjectManager, error)
	Firewall       func(context.Context) (firewall.FirewallManager, error)
	Agent          string
}

EnableOptions holds the options for the firewall enable command.

type ListOptions

type ListOptions struct {
	IOStreams *iostreams.IOStreams
	TUI       *tui.TUI
	Firewall  func(context.Context) (firewall.FirewallManager, error)
	Format    *cmdutil.FormatFlags
}

ListOptions holds the options for the firewall list command.

type ReloadOptions

type ReloadOptions struct {
	IOStreams *iostreams.IOStreams
	Firewall  func(context.Context) (firewall.FirewallManager, error)
}

ReloadOptions holds the options for the firewall reload command.

type RemoveOptions

type RemoveOptions struct {
	IOStreams *iostreams.IOStreams
	Firewall  func(context.Context) (firewall.FirewallManager, error)
	Domain    string
	Proto     string
	Port      int
}

RemoveOptions holds the options for the firewall remove command.

type RotateCAOptions

type RotateCAOptions struct {
	IOStreams *iostreams.IOStreams
	Config    func() (config.Config, error)
	Firewall  func(context.Context) (fwpkg.FirewallManager, error)
}

RotateCAOptions holds the options for the firewall rotate-ca command.

type StatusOptions

type StatusOptions struct {
	IOStreams *iostreams.IOStreams
	Firewall  func(context.Context) (firewall.FirewallManager, error)
	Format    *cmdutil.FormatFlags
}

StatusOptions holds the options for the firewall status command.

type UpOptions

type UpOptions struct {
	IOStreams *iostreams.IOStreams
	Config    func() (config.Config, error)
	Logger    func() (*logger.Logger, error)
}

UpOptions holds the options for the firewall up command.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL