feat Main HTTP Server; IP,URL Allowlist and Blocklist

This commit is contained in:
Roi Feng
2025-02-06 01:16:56 -05:00
commit dcbfa27722
12 changed files with 453 additions and 0 deletions

26
internal/action/action.go Normal file
View File

@ -0,0 +1,26 @@
package action
type Action int
const (
Undecided Action = iota // 0Undecided
Allow // 1Pass
Block // 2Deny
)
// Decision saves the result of the decision
type Decision struct {
result Action
}
func NewDecision() *Decision {
return &Decision{result: Undecided}
}
func (d *Decision) Get() Action {
return d.result
}
func (d *Decision) Set(new Action) {
d.result = new
}