fix(lib): use mazeGen instead of bsGen

Signed-off-by: Xe Iaso <me@xeiaso.net>
This commit is contained in:
Xe Iaso
2025-12-16 01:26:00 -05:00
parent 958daba4a1
commit 83c8c3606a

View File

@@ -176,14 +176,14 @@ func New(opts Options) (*Server, error) {
registerWithPrefix(anubis.APIPrefix+"check", http.HandlerFunc(result.maybeReverseProxyHttpStatusOnly), "")
registerWithPrefix("/", http.HandlerFunc(result.maybeReverseProxyOrPage), "")
bsgen, err := naive.New(result.store, result.logger)
mazeGen, err := naive.New(result.store, result.logger)
if err == nil {
registerWithPrefix(anubis.APIPrefix+"honeypot/{id}/{stage}", bsgen, http.MethodGet)
registerWithPrefix(anubis.APIPrefix+"honeypot/{id}/{stage}", mazeGen, http.MethodGet)
opts.Policy.Bots = append(
opts.Policy.Bots,
policy.Bot{
Rules: bsgen.CheckNetwork(),
Rules: mazeGen.CheckNetwork(),
Action: config.RuleWeigh,
Weight: &config.Weight{
Adjust: 30,
@@ -191,7 +191,7 @@ func New(opts Options) (*Server, error) {
Name: "honeypot/network",
},
policy.Bot{
Rules: bsgen.CheckUA(),
Rules: mazeGen.CheckUA(),
Action: config.RuleWeigh,
Weight: &config.Weight{
Adjust: 30,