mirror of
https://github.com/TecharoHQ/anubis.git
synced 2026-04-17 05:44:57 +00:00
fix(lib): use mazeGen instead of bsGen
Signed-off-by: Xe Iaso <me@xeiaso.net>
This commit is contained in:
@@ -176,14 +176,14 @@ func New(opts Options) (*Server, error) {
|
|||||||
registerWithPrefix(anubis.APIPrefix+"check", http.HandlerFunc(result.maybeReverseProxyHttpStatusOnly), "")
|
registerWithPrefix(anubis.APIPrefix+"check", http.HandlerFunc(result.maybeReverseProxyHttpStatusOnly), "")
|
||||||
registerWithPrefix("/", http.HandlerFunc(result.maybeReverseProxyOrPage), "")
|
registerWithPrefix("/", http.HandlerFunc(result.maybeReverseProxyOrPage), "")
|
||||||
|
|
||||||
bsgen, err := naive.New(result.store, result.logger)
|
mazeGen, err := naive.New(result.store, result.logger)
|
||||||
if err == nil {
|
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 = append(
|
||||||
opts.Policy.Bots,
|
opts.Policy.Bots,
|
||||||
policy.Bot{
|
policy.Bot{
|
||||||
Rules: bsgen.CheckNetwork(),
|
Rules: mazeGen.CheckNetwork(),
|
||||||
Action: config.RuleWeigh,
|
Action: config.RuleWeigh,
|
||||||
Weight: &config.Weight{
|
Weight: &config.Weight{
|
||||||
Adjust: 30,
|
Adjust: 30,
|
||||||
@@ -191,7 +191,7 @@ func New(opts Options) (*Server, error) {
|
|||||||
Name: "honeypot/network",
|
Name: "honeypot/network",
|
||||||
},
|
},
|
||||||
policy.Bot{
|
policy.Bot{
|
||||||
Rules: bsgen.CheckUA(),
|
Rules: mazeGen.CheckUA(),
|
||||||
Action: config.RuleWeigh,
|
Action: config.RuleWeigh,
|
||||||
Weight: &config.Weight{
|
Weight: &config.Weight{
|
||||||
Adjust: 30,
|
Adjust: 30,
|
||||||
|
|||||||
Reference in New Issue
Block a user