Documentation ¶
Index ¶
- Variables
- func Append(rules ...driver.Rule) (err error)
- func AsWhitelist(ipVersion, table, chain string) (err error)
- func Clear(ipVersion string) (err error)
- func Delete(rules ...driver.Rule) (err error)
- func DynamicRuleFromDB(c echo.Context, row *dbschema.NgingFirewallRuleDynamic) (rule gerberos.Rule, err error)
- func DynamicRuleParseForm(c echo.Context, rule *dbschema.NgingFirewallRuleDynamic) error
- func Engine(ipVersionNumber string) driver.Driver
- func EngineIPv4() driver.Driver
- func EngineIPv6() driver.Driver
- func FindPositionByID(ipVersion, table, chain string, id uint) (uint, error)
- func GetBackend() string
- func Insert(rules ...driver.Rule) (err error)
- func RegisterDynamicRuleAction(k string, v string, formElements echo.KVList)
- func RegisterDynamicRuleBackend(k string, v string)
- func RegisterDynamicRuleSource(k string, v string, formElements echo.KVList)
- func ResetBackend()
- func ResetEngine()
- func RulesGroupByIPVersion(rules []driver.Rule) map[string][]driver.Rule
- func SetDynamicRuleForm(c echo.Context, rule *dbschema.NgingFirewallRuleDynamic) error
- func Update(rule driver.Rule) (err error)
Constants ¶
This section is empty.
Variables ¶
View Source
var DynamicRuleActions = echo.NewKVData(). Add(`ban`, `禁止访问`, echo.KVOptHKV(`formElements`, dynamicRuleActionFormElements[`ban`])). Add(`log`, `记录日志`, echo.KVOptHKV(`formElements`, dynamicRuleActionFormElements[`log`]))
View Source
var DynamicRuleBackends = echo.NewKVData().
Add(`ipset`, `ipset`).
Add(`nft`, `nftables`)
View Source
var DynamicRuleSources = echo.NewKVData(). Add(`file`, `日志文件(使用tail)`, echo.KVOptHKV(`formElements`, dynamicRuleSourceFormElements[`file`])). Add(`systemd`, `服务日志(使用journalctl)`, echo.KVOptHKV(`formElements`, dynamicRuleSourceFormElements[`systemd`])). Add(`kernel`, `系统日志(使用journalctl)`). Add(`process`, `命令`, echo.KVOptHKV(`formElements`, dynamicRuleSourceFormElements[`process`]))
Functions ¶
func AsWhitelist ¶ added in v1.3.2
func DynamicRuleFromDB ¶ added in v1.3.2
func DynamicRuleParseForm ¶ added in v1.3.2
func DynamicRuleParseForm(c echo.Context, rule *dbschema.NgingFirewallRuleDynamic) error
func EngineIPv4 ¶
func EngineIPv6 ¶
func FindPositionByID ¶ added in v1.3.5
func GetBackend ¶ added in v1.3.2
func GetBackend() string
func RegisterDynamicRuleAction ¶ added in v1.3.2
func RegisterDynamicRuleBackend ¶ added in v1.3.2
func RegisterDynamicRuleSource ¶ added in v1.3.2
func ResetBackend ¶ added in v1.3.2
func ResetBackend()
func ResetEngine ¶ added in v1.3.2
func ResetEngine()
func RulesGroupByIPVersion ¶ added in v1.3.2
func SetDynamicRuleForm ¶ added in v1.3.2
func SetDynamicRuleForm(c echo.Context, rule *dbschema.NgingFirewallRuleDynamic) error
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.