firewall

package
v1.3.10 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2023 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

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 Append added in v1.3.2

func Append(rules ...driver.Rule) (err error)

func AsWhitelist added in v1.3.2

func AsWhitelist(ipVersion, table, chain string) (err error)

func Clear added in v1.3.5

func Clear(ipVersion string) (err error)

func Delete added in v1.3.2

func Delete(rules ...driver.Rule) (err error)

func DynamicRuleFromDB added in v1.3.2

func DynamicRuleFromDB(c echo.Context, row *dbschema.NgingFirewallRuleDynamic) (rule gerberos.Rule, err error)

func DynamicRuleParseForm added in v1.3.2

func DynamicRuleParseForm(c echo.Context, rule *dbschema.NgingFirewallRuleDynamic) error

func Engine

func Engine(ipVersionNumber string) driver.Driver

func EngineIPv4

func EngineIPv4() driver.Driver

func EngineIPv6

func EngineIPv6() driver.Driver

func FindPositionByID added in v1.3.5

func FindPositionByID(ipVersion, table, chain string, id uint) (uint, error)

func GetBackend added in v1.3.2

func GetBackend() string

func Insert added in v1.3.2

func Insert(rules ...driver.Rule) (err error)

func RegisterDynamicRuleAction added in v1.3.2

func RegisterDynamicRuleAction(k string, v string, formElements echo.KVList)

func RegisterDynamicRuleBackend added in v1.3.2

func RegisterDynamicRuleBackend(k string, v string)

func RegisterDynamicRuleSource added in v1.3.2

func RegisterDynamicRuleSource(k string, v string, formElements echo.KVList)

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 RulesGroupByIPVersion(rules []driver.Rule) map[string][]driver.Rule

func SetDynamicRuleForm added in v1.3.2

func SetDynamicRuleForm(c echo.Context, rule *dbschema.NgingFirewallRuleDynamic) error

func Update added in v1.3.2

func Update(rule driver.Rule) (err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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