Documentation
¶
Overview ¶
Weblang firewall package. Web defense mechanism implementation
Index ¶
Constants ¶
View Source
const Action_403Status uint8 = 0x03
Defense action: return http status 403 to prevent access to web resource (not recommended action, because hackers often try to hack when they see that web resource exists)
View Source
const Action_BlockClientIp uint8 = 0x01
Defense action: Block client's IP address and prevent access to web application. Good for prevent brute force attacks.
View Source
const Action_Fake404Status uint8 = 0x02
Defense action: return Http status 404 Not found to prevent access to web resource (recommended action)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Firewall ¶
type Firewall struct {
Rules []FirewallRule // Active Firewall rules for web application
}
Web application firewall struct
type FirewallRule ¶
type FirewallRule struct { RequestUrlPattern string // request pattern to block HttpMethod string // Http method: GET, POST and etc. MaxAllowedCount int // Maximum allowed access count to resource. 0 - means take action immediately CountInterval int64 // Time interval seconds until MaxAllowedCount would be valid and should increment value by one Action uint8 // block action type ActionTimePeriod int64 // time period (seconds) until action is active after web attack incident occurs. -1 means forever }
FirewallRule to take action against dangerous web attacks base of RequestUrlPattern and HttpMethod
Click to show internal directories.
Click to hide internal directories.