Documentation ¶
Overview ¶
Copyright (c) 2020 The BFE Authors.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright (c) 2020 The BFE Authors.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
Constants ¶
const (
RuleBashCmd = "RuleBashCmd" // bash cmd
)
Variables ¶
This section is empty.
Functions ¶
func IsValidRule ¶
Types ¶
type RuleBashCmdExe ¶
type RuleBashCmdExe struct { }
func NewRuleBashCmdExe ¶
func NewRuleBashCmdExe() *RuleBashCmdExe
func (*RuleBashCmdExe) Check ¶
func (rule *RuleBashCmdExe) Check(req *RuleRequestInfo) bool
func (*RuleBashCmdExe) CheckString ¶
func (rule *RuleBashCmdExe) CheckString(pStr *string) bool
func (*RuleBashCmdExe) Init ¶
func (rule *RuleBashCmdExe) Init() error
type RuleRequestInfo ¶
type RuleRequestInfo struct { Method string // "GET", "POST", "PUT", "DELETE" Version string // "HTTP_1_0", "HTTP_1_1" Headers map[string][]string //Header Uri string // uri UriUnquote string // unquoted uri UriParsed *url.URL // parsed uri QueryValues url.Values // parsed query string values }
func NewRuleRequestInfo ¶
func NewRuleRequestInfo(req *bfe_basic.Request) *RuleRequestInfo
type WafRule ¶
type WafRule interface { Init() error Check(req *RuleRequestInfo) bool }
type WafRuleTable ¶
type WafRuleTable struct {
// contains filtered or unexported fields
}
func NewWafRuleTable ¶
func NewWafRuleTable() *WafRuleTable
func (*WafRuleTable) Init ¶
func (wr *WafRuleTable) Init()