From f10b7f74be2ec4ac6beef392085feba4e65f2165 Mon Sep 17 00:00:00 2001
From: Fijxu
Date: Sun, 20 Apr 2025 17:23:32 -0400
Subject: [PATCH] update anubis and patches
---
anubis | 2 +-
...xess-change-default-background-color.patch | 255 +++++-------------
...-enable-or-disable-the-anubis-mascot.patch | 246 ++++++++---------
patches/0003-disable-secure-context.patch | 39 +++
4 files changed, 236 insertions(+), 306 deletions(-)
create mode 100644 patches/0003-disable-secure-context.patch
diff --git a/anubis b/anubis
index 9865e3d..b15017d 160000
--- a/anubis
+++ b/anubis
@@ -1 +1 @@
-Subproject commit 9865e3ded82998e810c8eb0dca6195eada7c446d
+Subproject commit b15017d097666b40124ccc07c697d60a25a38ec8
diff --git a/patches/0001-xess-change-default-background-color.patch b/patches/0001-xess-change-default-background-color.patch
index 627c566..9f14544 100644
--- a/patches/0001-xess-change-default-background-color.patch
+++ b/patches/0001-xess-change-default-background-color.patch
@@ -1,218 +1,107 @@
-From bad9dd03ecf45316772ec386f4997817d435cc57 Mon Sep 17 00:00:00 2001
+From 70e6958d69a18ed6d0a6ff2c16c1c1fbdb06361a Mon Sep 17 00:00:00 2001
From: Fijxu
Date: Sun, 30 Mar 2025 01:06:20 -0300
-Subject: [PATCH 1/2] xess: change default background color
+Subject: [PATCH 1/3] xess: change default background color
---
- web/index_templ.go | 123 +++++++++++++--------------------------------
- xess/xess.css | 4 +-
- 2 files changed, 36 insertions(+), 91 deletions(-)
+ web/index_templ.go | 20 ++++++++++----------
+ xess/xess.css | 4 ++--
+ 2 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/web/index_templ.go b/web/index_templ.go
-index a3e10fe..e4cece2 100644
+index 7f501e3..0bc3cf2 100644
--- a/web/index_templ.go
+++ b/web/index_templ.go
-@@ -154,49 +154,21 @@ func index() templ.Component {
- templ_7745c5c3_Var7 = templ.NopComponent
+@@ -96,7 +96,7 @@ func base(title string, body templ.Component, challenge any, ogTags map[string]s
+ return templ_7745c5c3_Err
+ }
}
- ctx = templ.ClearChildren(ctx)
-- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 11, "Loading...
Why am I seeing this? You are seeing this because the administrator of this website has set up Anubis to protect the server against the scourge of AI companies aggressively scraping websites . This can and does cause downtime for the websites, which makes their resources inaccessible for everyone.
Anubis is a compromise. Anubis uses a Proof-of-Work scheme in the vein of Hashcash , a proposed proof-of-work scheme for reducing email spam. The idea is that at individual scales the additional load is ignorable, but at mass scraper levels it adds up and makes scraping much more expensive.
Ultimately, this is a hack whose real purpose is to give a \"good enough\" placeholder solution so that more time can be spent on fingerprinting and identifying headless browsers (EG: via how they do font rendering) so that the challenge proof of work page doesn't need to be presented to users that are much more likely to be legitimate.
Please note that Anubis requires the use of modern JavaScript features that plugins like JShelter will disable. Please disable JShelter or other such plugins for this domain.
Sadly, you must enable JavaScript to get past this challenge. This is required because AI companies have changed the social contract around how website hosting works. A no-JS solution is a work-in-progress.
")
-+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 12, "\">Why am I seeing this? You are seeing this because the administrator of this website has set up Anubis to protect the server against the scourge of AI companies aggressively scraping websites . This can and does cause downtime for the websites, which makes their resources inaccessible for everyone.
Anubis is a compromise. Anubis uses a Proof-of-Work scheme in the vein of Hashcash , a proposed proof-of-work scheme for reducing email spam. The idea is that at individual scales the additional load is ignorable, but at mass scraper levels it adds up and makes scraping much more expensive.
Ultimately, this is a hack whose real purpose is to give a \"good enough\" placeholder solution so that more time can be spent on fingerprinting and identifying headless browsers (EG: via how they do font rendering) so that the challenge proof of work page doesn't need to be presented to users that are much more likely to be legitimate.
Please note that Anubis requires the use of modern JavaScript features that plugins like JShelter will disable. Please disable JShelter or other such plugins for this domain.
Sadly, you must enable JavaScript to get past this challenge. This is required because AI companies have changed the social contract around how website hosting works. A no-JS solution is a work-in-progress.
")
+@@ -238,7 +238,7 @@ func errorPage(message string, mail string) templ.Component {
+ var templ_7745c5c3_Var12 string
+ templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinStringErrs("/.within.website/x/cmd/anubis/static/img/reject.webp?cacheBuster=" + anubis.Version)
if templ_7745c5c3_Err != nil {
- return templ_7745c5c3_Err
+- return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 141, Col: 102}
++ return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 139, Col: 102}
}
-@@ -220,75 +192,62 @@ func errorPage(message string, mail string) templ.Component {
- }()
- }
- ctx = templ.InitializeContext(ctx)
-- templ_7745c5c3_Var11 := templ.GetChildren(ctx)
-- if templ_7745c5c3_Var11 == nil {
-- templ_7745c5c3_Var11 = templ.NopComponent
-+ templ_7745c5c3_Var9 := templ.GetChildren(ctx)
-+ if templ_7745c5c3_Var9 == nil {
-+ templ_7745c5c3_Var9 = templ.NopComponent
- }
- ctx = templ.ClearChildren(ctx)
-- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 15, "")
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var12))
if templ_7745c5c3_Err != nil {
- return templ_7745c5c3_Err
- }
-- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 16, "\">
")
-- if templ_7745c5c3_Err != nil {
-- return templ_7745c5c3_Err
-- }
-- var templ_7745c5c3_Var13 string
-- templ_7745c5c3_Var13, templ_7745c5c3_Err = templ.JoinStringErrs(message)
-+ var templ_7745c5c3_Var10 string
-+ templ_7745c5c3_Var10, templ_7745c5c3_Err = templ.JoinStringErrs(message)
+@@ -251,7 +251,7 @@ func errorPage(message string, mail string) templ.Component {
+ var templ_7745c5c3_Var13 string
+ templ_7745c5c3_Var13, templ_7745c5c3_Err = templ.JoinStringErrs(message)
if templ_7745c5c3_Err != nil {
-- return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 140, Col: 16}
-+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 122, Col: 16}
+- return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 143, Col: 16}
++ return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 141, Col: 16}
}
-- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var13))
-+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var10))
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var13))
if templ_7745c5c3_Err != nil {
- return templ_7745c5c3_Err
- }
-- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 17, ".
Try again ")
-+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 14, ".
Try again ")
- if templ_7745c5c3_Err != nil {
- return templ_7745c5c3_Err
- }
- if mail != "" {
-- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 18, "
Go home or if you believe you should not be blocked, please contact the webmaster at Go home or if you believe you should not be blocked, please contact the webmaster at ")
-+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 16, "\">")
- if templ_7745c5c3_Err != nil {
- return templ_7745c5c3_Err
- }
-- var templ_7745c5c3_Var15 string
-- templ_7745c5c3_Var15, templ_7745c5c3_Err = templ.JoinStringErrs(mail)
-+ var templ_7745c5c3_Var12 string
-+ templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinStringErrs(mail)
- if templ_7745c5c3_Err != nil {
-- return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 144, Col: 9}
-+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 126, Col: 9}
- }
-- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var15))
-+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var12))
- if templ_7745c5c3_Err != nil {
- return templ_7745c5c3_Err
- }
-- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 20, "
")
-+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 17, "")
- if templ_7745c5c3_Err != nil {
- return templ_7745c5c3_Err
- }
- } else {
-- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 21, "
Go home
")
-+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 18, "
Go home
")
- if templ_7745c5c3_Err != nil {
- return templ_7745c5c3_Err
- }
- }
-- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 22, "
")
-+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 19, "")
+@@ -331,7 +331,7 @@ func bench() templ.Component {
+ templ_7745c5c3_Var17, templ_7745c5c3_Err = templ.JoinStringErrs("/.within.website/x/cmd/anubis/static/img/pensive.webp?cacheBuster=" +
+ anubis.Version)
if templ_7745c5c3_Err != nil {
- return templ_7745c5c3_Err
+- return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 178, Col: 22}
++ return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 176, Col: 22}
}
-@@ -312,40 +271,26 @@ func bench() templ.Component {
- }()
- }
- ctx = templ.InitializeContext(ctx)
-- templ_7745c5c3_Var16 := templ.GetChildren(ctx)
-- if templ_7745c5c3_Var16 == nil {
-- templ_7745c5c3_Var16 = templ.NopComponent
-+ templ_7745c5c3_Var13 := templ.GetChildren(ctx)
-+ if templ_7745c5c3_Var13 == nil {
-+ templ_7745c5c3_Var13 = templ.NopComponent
- }
- ctx = templ.ClearChildren(ctx)
-- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 23, "Loading...
Running the benchmark tool requires JavaScript to be enabled.
")
-+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 21, "\">
Running the benchmark tool requires JavaScript to be enabled.
")
- if templ_7745c5c3_Err != nil {
- return templ_7745c5c3_Err
- }
diff --git a/xess/xess.css b/xess/xess.css
index 86cbd42..94c7deb 100644
--- a/xess/xess.css
diff --git a/patches/0002-add-option-to-enable-or-disable-the-anubis-mascot.patch b/patches/0002-add-option-to-enable-or-disable-the-anubis-mascot.patch
index 82d5591..561f755 100644
--- a/patches/0002-add-option-to-enable-or-disable-the-anubis-mascot.patch
+++ b/patches/0002-add-option-to-enable-or-disable-the-anubis-mascot.patch
@@ -1,15 +1,15 @@
-From 4177cb828912d26ff1bd97428663e315a4ae6945 Mon Sep 17 00:00:00 2001
+From c039d0ac8dac7808fd77bd725f93d8626e50e3f3 Mon Sep 17 00:00:00 2001
From: Fijxu
Date: Mon, 14 Apr 2025 15:37:58 -0400
-Subject: [PATCH 2/2] add option to enable or disable the anubis mascot
+Subject: [PATCH 2/3] add option to enable or disable the anubis mascot
---
anubis.go | 2 +
cmd/anubis/main.go | 1 +
web/index.templ | 11 +++
- web/index_templ.go | 179 +++++++++++++++++++++++++++++++++++----------
- web/js/main.mjs | 17 +++--
- 5 files changed, 166 insertions(+), 44 deletions(-)
+ web/index_templ.go | 168 +++++++++++++++++++++++++++++----------------
+ web/js/main.mjs | 15 ++--
+ 5 files changed, 132 insertions(+), 65 deletions(-)
diff --git a/anubis.go b/anubis.go
index b184a45..7ba4e0c 100644
@@ -34,18 +34,18 @@ index 724f88a..544c639 100644
flag.Parse()
diff --git a/web/index.templ b/web/index.templ
-index 01d12b6..5d2c197 100644
+index 989d717..3d9a54a 100644
--- a/web/index.templ
+++ b/web/index.templ
-@@ -56,6 +56,7 @@ templ base(title string, body templ.Component, ogTags map[string]string) {
- }
-
- @templ.JSONScript("anubis_version", anubis.Version)
+@@ -57,6 +57,7 @@ templ base(title string, body templ.Component, challenge any, ogTags map[string]
+ if challenge != nil {
+ @templ.JSONScript("anubis_challenge", challenge)
+ }
+ @templ.JSONScript("enable_mascot", anubis.EnableMascot)
-@@ -71,7 +72,9 @@ templ base(title string, body templ.Component, ogTags map[string]string) {
+@@ -72,7 +73,9 @@ templ base(title string, body templ.Component, challenge any, ogTags map[string]
href="https://techaro.lol"
>Techaro. Made with ❤️ in 🇨🇦.
@@ -55,7 +55,7 @@ index 01d12b6..5d2c197 100644
-@@ -81,18 +84,22 @@ templ base(title string, body templ.Component, ogTags map[string]string) {
+@@ -82,18 +85,22 @@ templ base(title string, body templ.Component, challenge any, ogTags map[string]
templ index() {
@@ -78,7 +78,7 @@ index 01d12b6..5d2c197 100644
Loading...
-@@ -131,12 +138,14 @@ templ index() {
+@@ -132,12 +139,14 @@ templ index() {
templ errorPage(message string, mail string) {
@@ -93,7 +93,7 @@ index 01d12b6..5d2c197 100644
{ message }.
Try again
if mail != "" {
-@@ -168,12 +177,14 @@ templ bench() {
+@@ -169,12 +178,14 @@ templ bench() {
style="padding-top:0.25rem;display:grid;grid-template-columns:subgrid;grid-auto-rows:min-content;grid-column:1/-1;row-gap:0.25rem;overflow-y:auto;font-variant-numeric:tabular-nums">
@@ -109,12 +109,12 @@ index 01d12b6..5d2c197 100644
diff --git a/web/index_templ.go b/web/index_templ.go
-index e4cece2..13d5995 100644
+index 0bc3cf2..bfc705b 100644
--- a/web/index_templ.go
+++ b/web/index_templ.go
-@@ -104,6 +104,10 @@ func base(title string, body templ.Component, ogTags map[string]string) templ.Co
- if templ_7745c5c3_Err != nil {
- return templ_7745c5c3_Err
+@@ -110,6 +110,10 @@ func base(title string, body templ.Component, challenge any, ogTags map[string]s
+ return templ_7745c5c3_Err
+ }
}
+ templ_7745c5c3_Err = templ.JSONScript("enable_mascot", anubis.EnableMascot).Render(ctx, templ_7745c5c3_Buffer)
+ if templ_7745c5c3_Err != nil {
@@ -123,16 +123,16 @@ index e4cece2..13d5995 100644
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 8, "
")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
-@@ -111,7 +115,7 @@ func base(title string, body templ.Component, ogTags map[string]string) templ.Co
+@@ -117,7 +121,7 @@ func base(title string, body templ.Component, challenge any, ogTags map[string]s
var templ_7745c5c3_Var6 string
templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(title)
if templ_7745c5c3_Err != nil {
-- return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 64, Col: 52}
-+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 65, Col: 52}
+- return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 65, Col: 52}
++ return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 66, Col: 52}
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6))
if templ_7745c5c3_Err != nil {
-@@ -125,7 +129,17 @@ func base(title string, body templ.Component, ogTags map[string]string) templ.Co
+@@ -131,7 +135,17 @@ func base(title string, body templ.Component, challenge any, ogTags map[string]s
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
@@ -151,15 +151,34 @@ index e4cece2..13d5995 100644
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
-@@ -154,21 +168,65 @@ func index() templ.Component {
+@@ -160,35 +174,51 @@ func index() templ.Component {
templ_7745c5c3_Var7 = templ.NopComponent
}
ctx = templ.ClearChildren(ctx)
-- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 11, "Loading...
Why am I seeing this? You are seeing this because the administrator of this website has set up Anubis to protect the server against the scourge of AI companies aggressively scraping websites . This can and does cause downtime for the websites, which makes their resources inaccessible for everyone.
Anubis is a compromise. Anubis uses a Proof-of-Work scheme in the vein of Hashcash , a proposed proof-of-work scheme for reducing email spam. The idea is that at individual scales the additional load is ignorable, but at mass scraper levels it adds up and makes scraping much more expensive.
Ultimately, this is a hack whose real purpose is to give a \"good enough\" placeholder solution so that more time can be spent on fingerprinting and identifying headless browsers (EG: via how they do font rendering) so that the challenge proof of work page doesn't need to be presented to users that are much more likely to be legitimate.
Please note that Anubis requires the use of modern JavaScript features that plugins like JShelter will disable. Please disable JShelter or other such plugins for this domain.
Sadly, you must enable JavaScript to get past this challenge. This is required because AI companies have changed the social contract around how website hosting works. A no-JS solution is a work-in-progress.
")
+- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 14, "\">Why am I seeing this? You are seeing this because the administrator of this website has set up Anubis to protect the server against the scourge of AI companies aggressively scraping websites . This can and does cause downtime for the websites, which makes their resources inaccessible for everyone.
Anubis is a compromise. Anubis uses a Proof-of-Work scheme in the vein of Hashcash , a proposed proof-of-work scheme for reducing email spam. The idea is that at individual scales the additional load is ignorable, but at mass scraper levels it adds up and makes scraping much more expensive.
Ultimately, this is a hack whose real purpose is to give a \"good enough\" placeholder solution so that more time can be spent on fingerprinting and identifying headless browsers (EG: via how they do font rendering) so that the challenge proof of work page doesn't need to be presented to users that are much more likely to be legitimate.
Please note that Anubis requires the use of modern JavaScript features that plugins like JShelter will disable. Please disable JShelter or other such plugins for this domain.
Sadly, you must enable JavaScript to get past this challenge. This is required because AI companies have changed the social contract around how website hosting works. A no-JS solution is a work-in-progress.
")
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 19, "\">
Why am I seeing this? You are seeing this because the administrator of this website has set up Anubis to protect the server against the scourge of AI companies aggressively scraping websites . This can and does cause downtime for the websites, which makes their resources inaccessible for everyone.
Anubis is a compromise. Anubis uses a Proof-of-Work scheme in the vein of Hashcash , a proposed proof-of-work scheme for reducing email spam. The idea is that at individual scales the additional load is ignorable, but at mass scraper levels it adds up and makes scraping much more expensive.
Ultimately, this is a hack whose real purpose is to give a \"good enough\" placeholder solution so that more time can be spent on fingerprinting and identifying headless browsers (EG: via how they do font rendering) so that the challenge proof of work page doesn't need to be presented to users that are much more likely to be legitimate.
Please note that Anubis requires the use of modern JavaScript features that plugins like JShelter will disable. Please disable JShelter or other such plugins for this domain.
Sadly, you must enable JavaScript to get past this challenge. This is required because AI companies have changed the social contract around how website hosting works. A no-JS solution is a work-in-progress.
")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
-@@ -192,62 +250,85 @@ func errorPage(message string, mail string) templ.Component {
- }()
- }
- ctx = templ.InitializeContext(ctx)
-- templ_7745c5c3_Var9 := templ.GetChildren(ctx)
-- if templ_7745c5c3_Var9 == nil {
-- templ_7745c5c3_Var9 = templ.NopComponent
-+ templ_7745c5c3_Var11 := templ.GetChildren(ctx)
-+ if templ_7745c5c3_Var11 == nil {
-+ templ_7745c5c3_Var11 = templ.NopComponent
+@@ -231,38 +261,48 @@ func errorPage(message string, mail string) templ.Component {
+ templ_7745c5c3_Var11 = templ.NopComponent
}
ctx = templ.ClearChildren(ctx)
-- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 13, "
")
+- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 15, "
")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
-- var templ_7745c5c3_Var10 string
-- templ_7745c5c3_Var10, templ_7745c5c3_Err = templ.JoinStringErrs(message)
+- var templ_7745c5c3_Var12 string
+- templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinStringErrs("/.within.website/x/cmd/anubis/static/img/reject.webp?cacheBuster=" + anubis.Version)
+- if templ_7745c5c3_Err != nil {
+- return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 139, Col: 102}
+- }
+- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var12))
+- if templ_7745c5c3_Err != nil {
+- return templ_7745c5c3_Err
+ if anubis.EnableMascot {
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 21, "
")
- if templ_7745c5c3_Err != nil {
-- return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 122, Col: 16}
-+ return templ_7745c5c3_Err
}
-- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var10))
-+ var templ_7745c5c3_Var13 string
-+ templ_7745c5c3_Var13, templ_7745c5c3_Err = templ.JoinStringErrs(message)
-+ if templ_7745c5c3_Err != nil {
-+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 149, Col: 16}
-+ }
-+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var13))
+- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 16, "\">
")
++ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 23, "
")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
-- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 14, ".
Try again ")
+ var templ_7745c5c3_Var13 string
+ templ_7745c5c3_Var13, templ_7745c5c3_Err = templ.JoinStringErrs(message)
+ if templ_7745c5c3_Err != nil {
+- return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 141, Col: 16}
++ return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 150, Col: 16}
+ }
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var13))
+ if templ_7745c5c3_Err != nil {
+ return templ_7745c5c3_Err
+ }
+- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 17, ".
Try again ")
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 24, ".
Try again ")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
if mail != "" {
-- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 15, "
Go home or if you believe you should not be blocked, please contact the webmaster at Go home or if you believe you should not be blocked, please contact the webmaster at Go home or if you believe you should not be blocked, please contact the webmaster at ")
+- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 19, "\">")
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 26, "\">")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
-- var templ_7745c5c3_Var12 string
-- templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinStringErrs(mail)
-+ var templ_7745c5c3_Var15 string
-+ templ_7745c5c3_Var15, templ_7745c5c3_Err = templ.JoinStringErrs(mail)
+ var templ_7745c5c3_Var15 string
+ templ_7745c5c3_Var15, templ_7745c5c3_Err = templ.JoinStringErrs(mail)
if templ_7745c5c3_Err != nil {
-- return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 126, Col: 9}
-+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 153, Col: 9}
+- return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 145, Col: 9}
++ return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 154, Col: 9}
}
-- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var12))
-+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var15))
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var15))
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
-- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 17, "
")
+- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 20, "")
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 27, "")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
} else {
-- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 18, "
Go home
")
+- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 21, "
Go home
")
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 28, "
Go home
")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
}
-- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 19, "
")
+- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 22, "
")
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 29, "
")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
-@@ -271,26 +352,50 @@ func bench() templ.Component {
- }()
- }
- ctx = templ.InitializeContext(ctx)
-- templ_7745c5c3_Var13 := templ.GetChildren(ctx)
-- if templ_7745c5c3_Var13 == nil {
-- templ_7745c5c3_Var13 = templ.NopComponent
-+ templ_7745c5c3_Var16 := templ.GetChildren(ctx)
-+ if templ_7745c5c3_Var16 == nil {
-+ templ_7745c5c3_Var16 = templ.NopComponent
+@@ -323,21 +363,31 @@ func bench() templ.Component {
+ templ_7745c5c3_Var16 = templ.NopComponent
}
ctx = templ.ClearChildren(ctx)
-- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 20, "Loading...
Running the benchmark tool requires JavaScript to be enabled.
")
+- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 25, "\">
Running the benchmark tool requires JavaScript to be enabled.
")
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 34, "\">
Running the benchmark tool requires JavaScript to be enabled.
")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
diff --git a/web/js/main.mjs b/web/js/main.mjs
-index a093c74..6888f8e 100644
+index 9bb6031..7203bfd 100644
--- a/web/js/main.mjs
+++ b/web/js/main.mjs
@@ -81,6 +81,7 @@ function showContinueBar(hash, nonce, t0, t1) {
@@ -428,16 +439,7 @@ index a093c74..6888f8e 100644
});
}
}
-@@ -142,7 +143,7 @@ function showContinueBar(hash, nonce, t0, t1) {
- ohNoes({
- titleMsg: "Internal error!",
- statusMsg: `Failed to fetch challenge config: ${err.message}`,
-- imageSrc: imageURL("reject", anubisVersion),
-+ ...(enableMascot && { imageSrc: imageURL("reject", anubisVersion) }),
- });
- throw err;
- });
-@@ -152,7 +153,7 @@ function showContinueBar(hash, nonce, t0, t1) {
+@@ -140,7 +141,7 @@ function showContinueBar(hash, nonce, t0, t1) {
ohNoes({
titleMsg: "Challenge error!",
statusMsg: `Failed to resolve check algorithm. You may want to reload the page.`,
@@ -446,7 +448,7 @@ index a093c74..6888f8e 100644
});
return;
}
-@@ -210,7 +211,9 @@ function showContinueBar(hash, nonce, t0, t1) {
+@@ -198,7 +199,9 @@ function showContinueBar(hash, nonce, t0, t1) {
title.innerHTML = "Success!";
status.innerHTML = `Done! Took ${t1 - t0}ms, ${nonce} iterations`;
@@ -457,7 +459,7 @@ index a093c74..6888f8e 100644
progress.style.display = "none";
if (userReadDetails) {
-@@ -265,7 +268,7 @@ function showContinueBar(hash, nonce, t0, t1) {
+@@ -253,7 +256,7 @@ function showContinueBar(hash, nonce, t0, t1) {
ohNoes({
titleMsg: "Calculation error!",
statusMsg: `Failed to calculate challenge: ${err.message}`,
diff --git a/patches/0003-disable-secure-context.patch b/patches/0003-disable-secure-context.patch
new file mode 100644
index 0000000..e0c8353
--- /dev/null
+++ b/patches/0003-disable-secure-context.patch
@@ -0,0 +1,39 @@
+From 1555f2c81ee223d1e923050841bd8ba4bfe6e11c Mon Sep 17 00:00:00 2001
+From: Fijxu
+Date: Sun, 20 Apr 2025 17:23:17 -0400
+Subject: [PATCH 3/3] disable secure context
+
+---
+ web/js/main.mjs | 16 ++++++++--------
+ 1 file changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/web/js/main.mjs b/web/js/main.mjs
+index 7203bfd..d250aa8 100644
+--- a/web/js/main.mjs
++++ b/web/js/main.mjs
+@@ -100,14 +100,14 @@ function showContinueBar(hash, nonce, t0, t1) {
+ progress.style.display = "none";
+ };
+
+- if (!window.isSecureContext) {
+- ohNoes({
+- titleMsg: "Your context is not secure!",
+- statusMsg: `Try connecting over HTTPS or let the admin know to set up HTTPS. For more information, see MDN .`,
+- ...(enableMascot && { imageSrc: imageURL("reject", anubisVersion) }),
+- });
+- return;
+- }
++ // if (!window.isSecureContext) {
++ // ohNoes({
++ // titleMsg: "Your context is not secure!",
++ // statusMsg: `Try connecting over HTTPS or let the admin know to set up HTTPS. For more information, see MDN .`,
++ // ...(enableMascot && { imageSrc: imageURL("reject", anubisVersion) }),
++ // });
++ // return;
++ // }
+
+ // const testarea = document.getElementById('testarea');
+
+--
+2.49.0
+