Documentation ¶
Index ¶
- type Chain
- type Direct
- type IptablesRule
- type IptablesTranslator
- func (t *IptablesTranslator) StoreRules(rawIptables string) (string, error)
- func (t *IptablesTranslator) WithDirectFilePath(filePath string) *IptablesTranslator
- func (t *IptablesTranslator) WithDryRun(dryRun bool) *IptablesTranslator
- func (t *IptablesTranslator) WithOutput(output io.Writer) *IptablesTranslator
- type Rule
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Chain ¶
type Chain struct { // required, ip family: "ipv4", "ipv6", "eb" IPv string `xml:"ipv,attr"` // required, netfilter table: "nat", "mangle", etc. Table string `xml:"table,attr"` // required, netfilter chain: "FORWARD", custom chain names Chain string `xml:"chain,attr"` XMLName struct{} `xml:"chain"` }
func NewIP4Chain ¶
type IptablesRule ¶
type IptablesTranslator ¶
type IptablesTranslator struct {
// contains filtered or unexported fields
}
func NewIptablesTranslator ¶
func NewIptablesTranslator() *IptablesTranslator
func (*IptablesTranslator) StoreRules ¶
func (t *IptablesTranslator) StoreRules(rawIptables string) (string, error)
func (*IptablesTranslator) WithDirectFilePath ¶
func (t *IptablesTranslator) WithDirectFilePath(filePath string) *IptablesTranslator
func (*IptablesTranslator) WithDryRun ¶
func (t *IptablesTranslator) WithDryRun(dryRun bool) *IptablesTranslator
func (*IptablesTranslator) WithOutput ¶
func (t *IptablesTranslator) WithOutput(output io.Writer) *IptablesTranslator
type Rule ¶
type Rule struct { // required, ip family: "ipv4", "ipv6", "eb" IPv string `xml:"ipv,attr"` // required, netfilter table: "nat", "mangle", etc. Table string `xml:"table,attr"` // required, netfilter chain: "FORWARD", custom chain names Chain string `xml:"chain,attr"` // required, smaller the number more front the rule in chain Priority int `xml:"priority,attr"` // match and action command line options for {ip,ip6,eb}tables Body string `xml:",chardata"` XMLName struct{} `xml:"rule"` }
Click to show internal directories.
Click to hide internal directories.