Documentation
¶
Index ¶
- func LoadPoliciesOrDefault(fname string, defaultDifficulty int) (*policy.ParsedConfig, error)
- type CheckResult
- type Options
- type Server
- func (s *Server) ClearCookie(w http.ResponseWriter)
- func (s *Server) MakeChallenge(w http.ResponseWriter, r *http.Request)
- func (s *Server) MaybeReverseProxy(w http.ResponseWriter, r *http.Request)
- func (s *Server) PassChallenge(w http.ResponseWriter, r *http.Request)
- func (s *Server) RenderIndex(w http.ResponseWriter, r *http.Request)
- func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (s *Server) TestError(w http.ResponseWriter, r *http.Request)
- type UnixRoundTripper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadPoliciesOrDefault ¶
func LoadPoliciesOrDefault(fname string, defaultDifficulty int) (*policy.ParsedConfig, error)
Types ¶
type CheckResult ¶
func (CheckResult) LogValue ¶
func (cr CheckResult) LogValue() slog.Value
type Options ¶
type Options struct {
Next http.Handler
Policy *policy.ParsedConfig
ServeRobotsTXT bool
PrivateKey ed25519.PrivateKey
CookieDomain string
CookieName string
CookiePartitioned bool
}
type Server ¶
type Server struct {
DNSBLCache *decaymap.Impl[string, dnsbl.DroneBLResponse]
// contains filtered or unexported fields
}
func (*Server) ClearCookie ¶
func (s *Server) ClearCookie(w http.ResponseWriter)
func (*Server) MakeChallenge ¶
func (s *Server) MakeChallenge(w http.ResponseWriter, r *http.Request)
func (*Server) MaybeReverseProxy ¶
func (s *Server) MaybeReverseProxy(w http.ResponseWriter, r *http.Request)
func (*Server) PassChallenge ¶
func (s *Server) PassChallenge(w http.ResponseWriter, r *http.Request)
func (*Server) RenderIndex ¶
func (s *Server) RenderIndex(w http.ResponseWriter, r *http.Request)
Click to show internal directories.
Click to hide internal directories.