Documentation ¶
Index ¶
- type Direction
- type FireForwardInfo
- type FireInfo
- type Firewall
- func (r *Firewall) Forward(rule Forward, operation Operation) error
- func (r *Firewall) ListForward() ([]FireForwardInfo, error)
- func (r *Firewall) ListRichRule() ([]FireInfo, error)
- func (r *Firewall) ListRule() ([]FireInfo, error)
- func (r *Firewall) Port(rule FireInfo, operation Operation) error
- func (r *Firewall) RichRules(rule FireInfo, operation Operation) error
- func (r *Firewall) Status() (bool, error)
- func (r *Firewall) Version() (string, error)
- type Forward
- type Operation
- type Protocol
- type Strategy
- type Type
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FireForwardInfo ¶
type FireInfo ¶
type FireInfo struct { Type Type `json:"type"` // rich or normal Family string `json:"family"` // ipv4 ipv6 Address string `json:"address"` // 源地址或目标地址 PortStart uint `json:"port_start"` // 1-65535 PortEnd uint `json:"port_end"` // 1-65535 Protocol Protocol `json:"protocol"` // tcp udp tcp/udp Strategy Strategy `json:"strategy"` // accept drop reject mark Direction Direction `json:"direction"` // in out 入站或出站 }
type Firewall ¶
type Firewall struct {
// contains filtered or unexported fields
}
func NewFirewall ¶
func NewFirewall() *Firewall
func (*Firewall) ListForward ¶
func (r *Firewall) ListForward() ([]FireForwardInfo, error)
func (*Firewall) ListRichRule ¶
Click to show internal directories.
Click to hide internal directories.