updated Authenticate to return status code

This commit is contained in:
2025-01-31 19:54:28 +09:00
parent 8bee855aa8
commit 148dfbcfe1
5 changed files with 101 additions and 29 deletions

13
hodu.go
View File

@ -48,6 +48,19 @@ type Service interface {
WriteLog(id string, level LogLevel, fmtstr string, args ...interface{})
}
type HttpAccessAction int
const (
HTTP_ACCESS_ACCEPT HttpAccessAction = iota
HTTP_ACCESS_REJECT
HTTP_ACCESS_AUTH_REQUIRED
)
type HttpAccessRule struct {
Prefix string
OrgNets []netip.Prefix
Action HttpAccessAction
}
type JsonErrmsg struct {
Text string `json:"error-text"`
}