update anubis and patches
All checks were successful
Docker image builds / build (push) Successful in 2m35s
All checks were successful
Docker image builds / build (push) Successful in 2m35s
This commit is contained in:
parent
f10b7f74be
commit
4c9098ad8c
4 changed files with 204 additions and 350 deletions
2
anubis
2
anubis
|
@ -1 +1 @@
|
||||||
Subproject commit b15017d097666b40124ccc07c697d60a25a38ec8
|
Subproject commit 6daf08216e0856b0c16c7e1c9a045a4d89cbca4d
|
|
@ -1,126 +1,25 @@
|
||||||
From 70e6958d69a18ed6d0a6ff2c16c1c1fbdb06361a Mon Sep 17 00:00:00 2001
|
From 11d4f6fd20a6f0d016f8016a7d487cfe48c93e2f Mon Sep 17 00:00:00 2001
|
||||||
From: Fijxu <fijxu@nadeko.net>
|
From: Fijxu <fijxu@nadeko.net>
|
||||||
Date: Sun, 30 Mar 2025 01:06:20 -0300
|
Date: Sun, 30 Mar 2025 01:06:20 -0300
|
||||||
Subject: [PATCH 1/3] xess: change default background color
|
Subject: [PATCH 1/2] xess: change default background color
|
||||||
|
|
||||||
---
|
---
|
||||||
web/index_templ.go | 20 ++++++++++----------
|
xess/xess.css | 2 +-
|
||||||
xess/xess.css | 4 ++--
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
2 files changed, 12 insertions(+), 12 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/web/index_templ.go b/web/index_templ.go
|
|
||||||
index 7f501e3..0bc3cf2 100644
|
|
||||||
--- a/web/index_templ.go
|
|
||||||
+++ b/web/index_templ.go
|
|
||||||
@@ -96,7 +96,7 @@ func base(title string, body templ.Component, challenge any, ogTags map[string]s
|
|
||||||
return templ_7745c5c3_Err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 7, "<style>\n body,\n html {\n height: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n margin-left: auto;\n margin-right: auto;\n }\n\n .centered-div {\n text-align: center;\n }\n\n #status {\n font-variant-numeric: tabular-nums;\n }\n\n #progress {\n display: none;\n width: min(20rem, 90%);\n height: 2rem;\n border-radius: 1rem;\n overflow: hidden;\n margin: 1rem 0 2rem;\n outline-color: #b16286;\n outline-offset: 2px;\n outline-style: solid;\n outline-width: 4px;\n }\n\n .bar-inner {\n background-color: #b16286;\n height: 100%;\n width: 0;\n transition: width 0.25s ease-in;\n }\n </style>")
|
|
||||||
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 7, "<style>\n body,\n html {\n height: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n margin-left: auto;\n margin-right: auto;\n }\n\n .centered-div {\n text-align: center;\n }\n\n #status {\n font-variant-numeric: tabular-nums;\n }\n\n #progress {\n display: none;\n width: min(20rem, 90%);\n height: 2rem;\n border-radius: 1rem;\n overflow: hidden;\n margin: 1rem 0 2rem;\n outline-offset: 2px;\n outline: #b16286 solid 4px;\n }\n\n .bar-inner {\n background-color: #b16286;\n height: 100%;\n width: 0;\n transition: width 0.25s ease-in;\n }\n </style>")
|
|
||||||
if templ_7745c5c3_Err != nil {
|
|
||||||
return templ_7745c5c3_Err
|
|
||||||
}
|
|
||||||
@@ -117,7 +117,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: 67, Col: 52}
|
|
||||||
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 65, Col: 52}
|
|
||||||
}
|
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6))
|
|
||||||
if templ_7745c5c3_Err != nil {
|
|
||||||
@@ -168,7 +168,7 @@ func index() templ.Component {
|
|
||||||
templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs("/.within.website/x/cmd/anubis/static/img/pensive.webp?cacheBuster=" +
|
|
||||||
anubis.Version)
|
|
||||||
if templ_7745c5c3_Err != nil {
|
|
||||||
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 91, Col: 18}
|
|
||||||
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 89, Col: 18}
|
|
||||||
}
|
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8))
|
|
||||||
if templ_7745c5c3_Err != nil {
|
|
||||||
@@ -182,7 +182,7 @@ func index() templ.Component {
|
|
||||||
templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs("/.within.website/x/cmd/anubis/static/img/happy.webp?cacheBuster=" +
|
|
||||||
anubis.Version)
|
|
||||||
if templ_7745c5c3_Err != nil {
|
|
||||||
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 97, Col: 18}
|
|
||||||
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 95, Col: 18}
|
|
||||||
}
|
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9))
|
|
||||||
if templ_7745c5c3_Err != nil {
|
|
||||||
@@ -196,7 +196,7 @@ func index() templ.Component {
|
|
||||||
templ_7745c5c3_Var10, templ_7745c5c3_Err = templ.JoinStringErrs(
|
|
||||||
"/.within.website/x/cmd/anubis/static/js/main.mjs?cacheBuster=" + anubis.Version)
|
|
||||||
if templ_7745c5c3_Err != nil {
|
|
||||||
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 101, Col: 84}
|
|
||||||
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 99, Col: 84}
|
|
||||||
}
|
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var10))
|
|
||||||
if templ_7745c5c3_Err != nil {
|
|
||||||
@@ -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.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}
|
|
||||||
}
|
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var12))
|
|
||||||
if templ_7745c5c3_Err != nil {
|
|
||||||
@@ -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: 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))
|
|
||||||
if templ_7745c5c3_Err != nil {
|
|
||||||
@@ -278,7 +278,7 @@ func errorPage(message string, mail string) templ.Component {
|
|
||||||
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: 147, Col: 9}
|
|
||||||
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 145, Col: 9}
|
|
||||||
}
|
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var15))
|
|
||||||
if templ_7745c5c3_Err != nil {
|
|
||||||
@@ -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.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}
|
|
||||||
}
|
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var17))
|
|
||||||
if templ_7745c5c3_Err != nil {
|
|
||||||
@@ -345,7 +345,7 @@ func bench() templ.Component {
|
|
||||||
templ_7745c5c3_Var18, templ_7745c5c3_Err = templ.JoinStringErrs(
|
|
||||||
"/.within.website/x/cmd/anubis/static/js/bench.mjs?cacheBuster=" + anubis.Version)
|
|
||||||
if templ_7745c5c3_Err != nil {
|
|
||||||
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 182, Col: 89}
|
|
||||||
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 180, Col: 89}
|
|
||||||
}
|
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var18))
|
|
||||||
if templ_7745c5c3_Err != nil {
|
|
||||||
diff --git a/xess/xess.css b/xess/xess.css
|
diff --git a/xess/xess.css b/xess/xess.css
|
||||||
index 86cbd42..94c7deb 100644
|
index c07143f..497317c 100644
|
||||||
--- a/xess/xess.css
|
--- a/xess/xess.css
|
||||||
+++ b/xess/xess.css
|
+++ b/xess/xess.css
|
||||||
@@ -33,12 +33,12 @@ main {
|
@@ -3,7 +3,7 @@
|
||||||
}
|
--body-preformatted-font: Iosevka Curly Iaso, monospace;
|
||||||
|
--body-title-font: Podkova, serif;
|
||||||
|
|
||||||
body {
|
- --dark-background: #1d2021;
|
||||||
- background: #1d2021;
|
+ --dark-background: #181818;
|
||||||
+ background: #181818;
|
--dark-text: #f9f5d7;
|
||||||
color: #f9f5d7;
|
--dark-text-selection: #d3869b;
|
||||||
}
|
--dark-preformatted-background: #3c3836;
|
||||||
|
|
||||||
pre {
|
|
||||||
- background-color: #3c3836;
|
|
||||||
+ background-color: #181818;
|
|
||||||
padding: 1em;
|
|
||||||
border: 0;
|
|
||||||
font-family: Iosevka Curly Iaso, monospace;
|
|
||||||
--
|
--
|
||||||
2.49.0
|
2.49.0
|
||||||
|
|
||||||
|
|
|
@ -1,31 +1,31 @@
|
||||||
From c039d0ac8dac7808fd77bd725f93d8626e50e3f3 Mon Sep 17 00:00:00 2001
|
From e2dd5f9982304f41aeb7002f5ccbaf9e60d96a18 Mon Sep 17 00:00:00 2001
|
||||||
From: Fijxu <fijxu@nadeko.net>
|
From: Fijxu <fijxu@nadeko.net>
|
||||||
Date: Mon, 14 Apr 2025 15:37:58 -0400
|
Date: Mon, 14 Apr 2025 15:37:58 -0400
|
||||||
Subject: [PATCH 2/3] add option to enable or disable the anubis mascot
|
Subject: [PATCH 2/2] add option to enable or disable the anubis mascot
|
||||||
|
|
||||||
---
|
---
|
||||||
anubis.go | 2 +
|
anubis.go | 2 +
|
||||||
cmd/anubis/main.go | 1 +
|
cmd/anubis/main.go | 1 +
|
||||||
web/index.templ | 11 +++
|
web/index.templ | 9 +++
|
||||||
web/index_templ.go | 168 +++++++++++++++++++++++++++++----------------
|
web/index_templ.go | 178 ++++++++++++++++++++++++++++-----------------
|
||||||
web/js/main.mjs | 15 ++--
|
web/js/main.mjs | 15 ++--
|
||||||
5 files changed, 132 insertions(+), 65 deletions(-)
|
5 files changed, 132 insertions(+), 73 deletions(-)
|
||||||
|
|
||||||
diff --git a/anubis.go b/anubis.go
|
diff --git a/anubis.go b/anubis.go
|
||||||
index b184a45..7ba4e0c 100644
|
index d626ebc..6c23e00 100644
|
||||||
--- a/anubis.go
|
--- a/anubis.go
|
||||||
+++ b/anubis.go
|
+++ b/anubis.go
|
||||||
@@ -17,3 +17,5 @@ const StaticPath = "/.within.website/x/cmd/anubis/"
|
@@ -23,3 +23,5 @@ const APIPrefix = "/.within.website/x/cmd/anubis/api/"
|
||||||
// DefaultDifficulty is the default "difficulty" (number of leading zeroes)
|
// DefaultDifficulty is the default "difficulty" (number of leading zeroes)
|
||||||
// that must be met by the client in order to pass the challenge.
|
// that must be met by the client in order to pass the challenge.
|
||||||
const DefaultDifficulty = 4
|
const DefaultDifficulty = 4
|
||||||
+
|
+
|
||||||
+var EnableMascot = false
|
+var EnableMascot = false
|
||||||
diff --git a/cmd/anubis/main.go b/cmd/anubis/main.go
|
diff --git a/cmd/anubis/main.go b/cmd/anubis/main.go
|
||||||
index 724f88a..544c639 100644
|
index ff2d14f..c82540d 100644
|
||||||
--- a/cmd/anubis/main.go
|
--- a/cmd/anubis/main.go
|
||||||
+++ b/cmd/anubis/main.go
|
+++ b/cmd/anubis/main.go
|
||||||
@@ -169,6 +169,7 @@ func startDecayMapCleanup(ctx context.Context, s *libanubis.Server) {
|
@@ -174,6 +174,7 @@ func startDecayMapCleanup(ctx context.Context, s *libanubis.Server) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
@ -34,39 +34,42 @@ index 724f88a..544c639 100644
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
|
|
||||||
diff --git a/web/index.templ b/web/index.templ
|
diff --git a/web/index.templ b/web/index.templ
|
||||||
index 989d717..3d9a54a 100644
|
index 872c8b1..969b339 100644
|
||||||
--- a/web/index.templ
|
--- a/web/index.templ
|
||||||
+++ b/web/index.templ
|
+++ b/web/index.templ
|
||||||
@@ -57,6 +57,7 @@ templ base(title string, body templ.Component, challenge any, ogTags map[string]
|
@@ -60,6 +60,7 @@ templ base(title string, body templ.Component, challenge any, ogTags map[string]
|
||||||
if challenge != nil {
|
@templ.JSONScript("anubis_challenge", challenge)
|
||||||
@templ.JSONScript("anubis_challenge", challenge)
|
}
|
||||||
}
|
@templ.JSONScript("anubis_base_prefix", anubis.BasePrefix)
|
||||||
+ @templ.JSONScript("enable_mascot", anubis.EnableMascot)
|
+ @templ.JSONScript("enable_mascot", anubis.EnableMascot)
|
||||||
|
</head>
|
||||||
</head>
|
<body id="top">
|
||||||
<body id="top">
|
<main>
|
||||||
@@ -72,7 +73,9 @@ templ base(title string, body templ.Component, challenge any, ogTags map[string]
|
@@ -84,8 +85,10 @@ templ base(title string, body templ.Component, challenge any, ogTags map[string]
|
||||||
href="https://techaro.lol"
|
|
||||||
>Techaro</a>. Made with ❤️ in 🇨🇦.
|
|
||||||
</p>
|
|
||||||
+ if anubis.EnableMascot {
|
|
||||||
<p>Mascot design by <a href="https://bsky.app/profile/celphase.bsky.social">CELPHASE</a>.</p>
|
|
||||||
+ }
|
|
||||||
</center>
|
|
||||||
</footer>
|
|
||||||
</main>
|
|
||||||
@@ -82,18 +85,22 @@ templ base(title string, body templ.Component, challenge any, ogTags map[string]
|
|
||||||
|
|
||||||
templ index() {
|
templ index() {
|
||||||
|
<div class="centered-div">
|
||||||
|
+ if anubis.EnableMascot {
|
||||||
|
<img id="image" style="width:100%;max-width:256px;" src={ anubis.BasePrefix + "/.within.website/x/cmd/anubis/static/img/pensive.webp?cacheBuster=" + anubis.Version }/>
|
||||||
|
<img style="display:none;" style="width:100%;max-width:256px;" src={ anubis.BasePrefix + "/.within.website/x/cmd/anubis/static/img/happy.webp?cacheBuster=" + anubis.Version }/>
|
||||||
|
+ }
|
||||||
|
<p id="status">Loading...</p>
|
||||||
|
<script async type="module" src={ anubis.BasePrefix + "/.within.website/x/cmd/anubis/static/js/main.mjs?cacheBuster=" + anubis.Version }></script>
|
||||||
|
<div id="progress" role="progressbar" aria-labelledby="status">
|
||||||
|
@@ -137,7 +140,9 @@ templ index() {
|
||||||
|
|
||||||
|
templ errorPage(message string, mail string) {
|
||||||
|
<div class="centered-div">
|
||||||
|
+ if anubis.EnableMascot {
|
||||||
|
<img id="image" alt="Sad Anubis" style="width:100%;max-width:256px;" src={ anubis.BasePrefix + "/.within.website/x/cmd/anubis/static/img/reject.webp?cacheBuster=" + anubis.Version }/>
|
||||||
|
+ }
|
||||||
|
<p>{ message }.</p>
|
||||||
|
<button onClick="window.location.reload();">Try again</button>
|
||||||
|
if mail != "" {
|
||||||
|
@@ -155,12 +160,14 @@ templ errorPage(message string, mail string) {
|
||||||
|
|
||||||
|
templ StaticHappy() {
|
||||||
<div class="centered-div">
|
<div class="centered-div">
|
||||||
+ if anubis.EnableMascot {
|
|
||||||
<img
|
|
||||||
id="image"
|
|
||||||
style="width:100%;max-width:256px;"
|
|
||||||
src={ "/.within.website/x/cmd/anubis/static/img/pensive.webp?cacheBuster=" +
|
|
||||||
anubis.Version }
|
|
||||||
/>
|
|
||||||
+ }
|
|
||||||
+ if anubis.EnableMascot {
|
+ if anubis.EnableMascot {
|
||||||
<img
|
<img
|
||||||
style="display:none;"
|
style="display:none;"
|
||||||
|
@ -74,47 +77,27 @@ index 989d717..3d9a54a 100644
|
||||||
src={ "/.within.website/x/cmd/anubis/static/img/happy.webp?cacheBuster=" +
|
src={ "/.within.website/x/cmd/anubis/static/img/happy.webp?cacheBuster=" +
|
||||||
anubis.Version }
|
anubis.Version }
|
||||||
/>
|
/>
|
||||||
+ }
|
+ }
|
||||||
<p id="status">Loading...</p>
|
<p>This is just a check endpoint for your reverse proxy to use.</p>
|
||||||
<script async type="module" src={
|
</div>
|
||||||
"/.within.website/x/cmd/anubis/static/js/main.mjs?cacheBuster=" + anubis.Version }></script>
|
}
|
||||||
@@ -132,12 +139,14 @@ templ index() {
|
@@ -188,7 +195,9 @@ templ bench() {
|
||||||
|
></tbody>
|
||||||
templ errorPage(message string, mail string) {
|
</table>
|
||||||
<div class="centered-div">
|
<div class="centered-div">
|
||||||
+ if anubis.EnableMascot {
|
+ if anubis.EnableMascot {
|
||||||
<img
|
<img id="image" style="width:100%;max-width:256px;" src={ anubis.BasePrefix + "/.within.website/x/cmd/anubis/static/img/pensive.webp?cacheBuster=" + anubis.Version }/>
|
||||||
id="image"
|
+ }
|
||||||
alt="Sad Anubis"
|
<p id="status" style="max-width:256px">Loading...</p>
|
||||||
style="width:100%;max-width:256px;"
|
<script async type="module" src={ anubis.BasePrefix + "/.within.website/x/cmd/anubis/static/js/bench.mjs?cacheBuster=" + anubis.Version }></script>
|
||||||
src={ "/.within.website/x/cmd/anubis/static/img/reject.webp?cacheBuster=" + anubis.Version }
|
<div id="sparkline"></div>
|
||||||
/>
|
|
||||||
+ }
|
|
||||||
<p>{ message }.</p>
|
|
||||||
<button onClick="window.location.reload();">Try again</button>
|
|
||||||
if mail != "" {
|
|
||||||
@@ -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"></tbody>
|
|
||||||
</table>
|
|
||||||
<div class="centered-div">
|
|
||||||
+ if anubis.EnableMascot {
|
|
||||||
<img
|
|
||||||
id="image"
|
|
||||||
style="width:100%;max-width:256px;"
|
|
||||||
src={ "/.within.website/x/cmd/anubis/static/img/pensive.webp?cacheBuster=" +
|
|
||||||
anubis.Version }
|
|
||||||
/>
|
|
||||||
+ }
|
|
||||||
<p id="status" style="max-width:256px">Loading...</p>
|
|
||||||
<script async type="module" src={
|
|
||||||
"/.within.website/x/cmd/anubis/static/js/bench.mjs?cacheBuster=" + anubis.Version }></script>
|
|
||||||
diff --git a/web/index_templ.go b/web/index_templ.go
|
diff --git a/web/index_templ.go b/web/index_templ.go
|
||||||
index 0bc3cf2..bfc705b 100644
|
index 35638b3..4a1756e 100644
|
||||||
--- a/web/index_templ.go
|
--- a/web/index_templ.go
|
||||||
+++ b/web/index_templ.go
|
+++ b/web/index_templ.go
|
||||||
@@ -110,6 +110,10 @@ func base(title string, body templ.Component, challenge any, ogTags map[string]s
|
@@ -114,6 +114,10 @@ func base(title string, body templ.Component, challenge any, ogTags map[string]s
|
||||||
return templ_7745c5c3_Err
|
if templ_7745c5c3_Err != nil {
|
||||||
}
|
return templ_7745c5c3_Err
|
||||||
}
|
}
|
||||||
+ templ_7745c5c3_Err = templ.JSONScript("enable_mascot", anubis.EnableMascot).Render(ctx, templ_7745c5c3_Buffer)
|
+ templ_7745c5c3_Err = templ.JSONScript("enable_mascot", anubis.EnableMascot).Render(ctx, templ_7745c5c3_Buffer)
|
||||||
+ if templ_7745c5c3_Err != nil {
|
+ if templ_7745c5c3_Err != nil {
|
||||||
|
@ -123,296 +106,307 @@ index 0bc3cf2..bfc705b 100644
|
||||||
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 8, "</head><body id=\"top\"><main><center><h1 id=\"title\" class=\".centered-div\">")
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 8, "</head><body id=\"top\"><main><center><h1 id=\"title\" class=\".centered-div\">")
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ_7745c5c3_Err
|
return templ_7745c5c3_Err
|
||||||
@@ -117,7 +121,7 @@ func base(title string, body templ.Component, challenge any, ogTags map[string]s
|
@@ -121,7 +125,7 @@ func base(title string, body templ.Component, challenge any, ogTags map[string]s
|
||||||
var templ_7745c5c3_Var6 string
|
var templ_7745c5c3_Var6 string
|
||||||
templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(title)
|
templ_7745c5c3_Var6, templ_7745c5c3_Err = templ.JoinStringErrs(title)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
- 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: 67, Col: 49}
|
||||||
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 66, Col: 52}
|
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 68, Col: 49}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var6))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
@@ -131,7 +135,17 @@ func base(title string, body templ.Component, challenge any, ogTags map[string]s
|
@@ -164,46 +168,56 @@ func index() templ.Component {
|
||||||
if templ_7745c5c3_Err != nil {
|
|
||||||
return templ_7745c5c3_Err
|
|
||||||
}
|
|
||||||
- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 10, "<footer><center><p>Protected by <a href=\"https://github.com/TecharoHQ/anubis\">Anubis</a> from <a href=\"https://techaro.lol\">Techaro</a>. Made with ❤️ in 🇨🇦.</p><p>Mascot design by <a href=\"https://bsky.app/profile/celphase.bsky.social\">CELPHASE</a>.</p></center></footer></main></body></html>")
|
|
||||||
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 10, "<footer><center><p>Protected by <a href=\"https://github.com/TecharoHQ/anubis\">Anubis</a> from <a href=\"https://techaro.lol\">Techaro</a>. Made with ❤️ in 🇨🇦.</p>")
|
|
||||||
+ if templ_7745c5c3_Err != nil {
|
|
||||||
+ return templ_7745c5c3_Err
|
|
||||||
+ }
|
|
||||||
+ if anubis.EnableMascot {
|
|
||||||
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 11, "<p>Mascot design by <a href=\"https://bsky.app/profile/celphase.bsky.social\">CELPHASE</a>.</p>")
|
|
||||||
+ if templ_7745c5c3_Err != nil {
|
|
||||||
+ return templ_7745c5c3_Err
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 12, "</center></footer></main></body></html>")
|
|
||||||
if templ_7745c5c3_Err != nil {
|
|
||||||
return templ_7745c5c3_Err
|
|
||||||
}
|
|
||||||
@@ -160,35 +174,51 @@ func index() templ.Component {
|
|
||||||
templ_7745c5c3_Var7 = templ.NopComponent
|
templ_7745c5c3_Var7 = templ.NopComponent
|
||||||
}
|
}
|
||||||
ctx = templ.ClearChildren(ctx)
|
ctx = templ.ClearChildren(ctx)
|
||||||
- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 11, "<div class=\"centered-div\"><img id=\"image\" style=\"width:100%;max-width:256px;\" src=\"")
|
- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 11, "<div class=\"centered-div\"><img id=\"image\" style=\"width:100%;max-width:256px;\" src=\"")
|
||||||
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 13, "<div class=\"centered-div\">")
|
|
||||||
if templ_7745c5c3_Err != nil {
|
|
||||||
return templ_7745c5c3_Err
|
|
||||||
}
|
|
||||||
- var templ_7745c5c3_Var8 string
|
|
||||||
- templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs("/.within.website/x/cmd/anubis/static/img/pensive.webp?cacheBuster=" +
|
|
||||||
- anubis.Version)
|
|
||||||
- if templ_7745c5c3_Err != nil {
|
- if templ_7745c5c3_Err != nil {
|
||||||
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 89, Col: 18}
|
- return templ_7745c5c3_Err
|
||||||
|
- }
|
||||||
|
- var templ_7745c5c3_Var8 string
|
||||||
|
- templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(anubis.BasePrefix + "/.within.website/x/cmd/anubis/static/img/pensive.webp?cacheBuster=" + anubis.Version)
|
||||||
|
- if templ_7745c5c3_Err != nil {
|
||||||
|
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 87, Col: 165}
|
||||||
- }
|
- }
|
||||||
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8))
|
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8))
|
||||||
- if templ_7745c5c3_Err != nil {
|
- if templ_7745c5c3_Err != nil {
|
||||||
- return templ_7745c5c3_Err
|
- return templ_7745c5c3_Err
|
||||||
- }
|
- }
|
||||||
- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 12, "\"> <img style=\"display:none;\" style=\"width:100%;max-width:256px;\" src=\"")
|
- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 12, "\"> <img style=\"display:none;\" style=\"width:100%;max-width:256px;\" src=\"")
|
||||||
|
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 11, "<div class=\"centered-div\">")
|
||||||
|
if templ_7745c5c3_Err != nil {
|
||||||
|
return templ_7745c5c3_Err
|
||||||
|
}
|
||||||
|
- var templ_7745c5c3_Var9 string
|
||||||
|
- templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(anubis.BasePrefix + "/.within.website/x/cmd/anubis/static/img/happy.webp?cacheBuster=" + anubis.Version)
|
||||||
|
- if templ_7745c5c3_Err != nil {
|
||||||
|
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 88, Col: 174}
|
||||||
|
- }
|
||||||
|
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9))
|
||||||
- if templ_7745c5c3_Err != nil {
|
- if templ_7745c5c3_Err != nil {
|
||||||
- return templ_7745c5c3_Err
|
- return templ_7745c5c3_Err
|
||||||
- }
|
|
||||||
- var templ_7745c5c3_Var9 string
|
|
||||||
- templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs("/.within.website/x/cmd/anubis/static/img/happy.webp?cacheBuster=" +
|
|
||||||
- anubis.Version)
|
|
||||||
- if templ_7745c5c3_Err != nil {
|
|
||||||
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 95, Col: 18}
|
|
||||||
+ if anubis.EnableMascot {
|
+ if anubis.EnableMascot {
|
||||||
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 14, "<img id=\"image\" style=\"width:100%;max-width:256px;\" src=\"")
|
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 12, "<img id=\"image\" style=\"width:100%;max-width:256px;\" src=\"")
|
||||||
+ if templ_7745c5c3_Err != nil {
|
+ if templ_7745c5c3_Err != nil {
|
||||||
+ return templ_7745c5c3_Err
|
+ return templ_7745c5c3_Err
|
||||||
+ }
|
+ }
|
||||||
+ var templ_7745c5c3_Var8 string
|
+ var templ_7745c5c3_Var8 string
|
||||||
+ templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs("/.within.website/x/cmd/anubis/static/img/pensive.webp?cacheBuster=" +
|
+ templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(anubis.BasePrefix + "/.within.website/x/cmd/anubis/static/img/pensive.webp?cacheBuster=" + anubis.Version)
|
||||||
+ anubis.Version)
|
|
||||||
+ if templ_7745c5c3_Err != nil {
|
+ if templ_7745c5c3_Err != nil {
|
||||||
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 93, Col: 18}
|
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 89, Col: 165}
|
||||||
+ }
|
+ }
|
||||||
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8))
|
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8))
|
||||||
+ if templ_7745c5c3_Err != nil {
|
+ if templ_7745c5c3_Err != nil {
|
||||||
+ return templ_7745c5c3_Err
|
+ return templ_7745c5c3_Err
|
||||||
+ }
|
+ }
|
||||||
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 15, "\"> ")
|
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 13, "\"> <img style=\"display:none;\" style=\"width:100%;max-width:256px;\" src=\"")
|
||||||
+ if templ_7745c5c3_Err != nil {
|
|
||||||
+ return templ_7745c5c3_Err
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9))
|
|
||||||
- if templ_7745c5c3_Err != nil {
|
|
||||||
- return templ_7745c5c3_Err
|
|
||||||
+ if anubis.EnableMascot {
|
|
||||||
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 16, "<img style=\"display:none;\" style=\"width:100%;max-width:256px;\" src=\"")
|
|
||||||
+ if templ_7745c5c3_Err != nil {
|
+ if templ_7745c5c3_Err != nil {
|
||||||
+ return templ_7745c5c3_Err
|
+ return templ_7745c5c3_Err
|
||||||
+ }
|
+ }
|
||||||
+ var templ_7745c5c3_Var9 string
|
+ var templ_7745c5c3_Var9 string
|
||||||
+ templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs("/.within.website/x/cmd/anubis/static/img/happy.webp?cacheBuster=" +
|
+ templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(anubis.BasePrefix + "/.within.website/x/cmd/anubis/static/img/happy.webp?cacheBuster=" + anubis.Version)
|
||||||
+ anubis.Version)
|
|
||||||
+ if templ_7745c5c3_Err != nil {
|
+ if templ_7745c5c3_Err != nil {
|
||||||
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 101, Col: 18}
|
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 90, Col: 174}
|
||||||
+ }
|
+ }
|
||||||
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9))
|
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9))
|
||||||
+ if templ_7745c5c3_Err != nil {
|
+ if templ_7745c5c3_Err != nil {
|
||||||
+ return templ_7745c5c3_Err
|
+ return templ_7745c5c3_Err
|
||||||
+ }
|
+ }
|
||||||
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 17, "\">")
|
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 14, "\">")
|
||||||
+ if templ_7745c5c3_Err != nil {
|
+ if templ_7745c5c3_Err != nil {
|
||||||
+ return templ_7745c5c3_Err
|
+ return templ_7745c5c3_Err
|
||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 13, "\"><p id=\"status\">Loading...</p><script async type=\"module\" src=\"")
|
- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 13, "\"><p id=\"status\">Loading...</p><script async type=\"module\" src=\"")
|
||||||
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 18, "<p id=\"status\">Loading...</p><script async type=\"module\" src=\"")
|
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 15, "<p id=\"status\">Loading...</p><script async type=\"module\" src=\"")
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ_7745c5c3_Err
|
return templ_7745c5c3_Err
|
||||||
}
|
}
|
||||||
@@ -196,13 +226,13 @@ func index() templ.Component {
|
var templ_7745c5c3_Var10 string
|
||||||
templ_7745c5c3_Var10, templ_7745c5c3_Err = templ.JoinStringErrs(
|
templ_7745c5c3_Var10, templ_7745c5c3_Err = templ.JoinStringErrs(anubis.BasePrefix + "/.within.website/x/cmd/anubis/static/js/main.mjs?cacheBuster=" + anubis.Version)
|
||||||
"/.within.website/x/cmd/anubis/static/js/main.mjs?cacheBuster=" + anubis.Version)
|
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 99, Col: 84}
|
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 90, Col: 136}
|
||||||
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 106, Col: 84}
|
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 93, Col: 136}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var10))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var10))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ_7745c5c3_Err
|
return templ_7745c5c3_Err
|
||||||
}
|
}
|
||||||
- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 14, "\"></script><div id=\"progress\" role=\"progressbar\" aria-labelledby=\"status\"><div class=\"bar-inner\"></div></div><details><summary>Why am I seeing this?</summary><p>You are seeing this because the administrator of this website has set up <a href=\"https://github.com/TecharoHQ/anubis\">Anubis</a> to protect the server against the scourge of <a href=\"https://thelibre.news/foss-infrastructure-is-under-attack-by-ai-companies/\">AI companies aggressively scraping websites</a>. This can and does cause downtime for the websites, which makes their resources inaccessible for everyone.</p><p>Anubis is a compromise. Anubis uses a <a href=\"https://anubis.techaro.lol/docs/design/why-proof-of-work\">Proof-of-Work</a> scheme in the vein of <a href=\"https://en.wikipedia.org/wiki/Hashcash\">Hashcash</a>, 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.</p><p>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.</p><p>Please note that Anubis requires the use of modern JavaScript features that plugins like <a href=\"https://jshelter.org/\">JShelter</a> will disable. Please disable JShelter or other such plugins for this domain.</p></details><noscript><p>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.</p></noscript><div id=\"testarea\"></div></div>")
|
- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 14, "\"></script><div id=\"progress\" role=\"progressbar\" aria-labelledby=\"status\"><div class=\"bar-inner\"></div></div><details><summary>Why am I seeing this?</summary><p>You are seeing this because the administrator of this website has set up <a href=\"https://github.com/TecharoHQ/anubis\">Anubis</a> to protect the server against the scourge of <a href=\"https://thelibre.news/foss-infrastructure-is-under-attack-by-ai-companies/\">AI companies aggressively scraping websites</a>. This can and does cause downtime for the websites, which makes their resources inaccessible for everyone.</p><p>Anubis is a compromise. Anubis uses a <a href=\"https://anubis.techaro.lol/docs/design/why-proof-of-work\">Proof-of-Work</a> scheme in the vein of <a href=\"https://en.wikipedia.org/wiki/Hashcash\">Hashcash</a>, 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.</p><p>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.</p><p>Please note that Anubis requires the use of modern JavaScript features that plugins like <a href=\"https://jshelter.org/\">JShelter</a> will disable. Please disable JShelter or other such plugins for this domain.</p></details><noscript><p>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.</p></noscript><div id=\"testarea\"></div></div>")
|
||||||
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 19, "\"></script><div id=\"progress\" role=\"progressbar\" aria-labelledby=\"status\"><div class=\"bar-inner\"></div></div><details><summary>Why am I seeing this?</summary><p>You are seeing this because the administrator of this website has set up <a href=\"https://github.com/TecharoHQ/anubis\">Anubis</a> to protect the server against the scourge of <a href=\"https://thelibre.news/foss-infrastructure-is-under-attack-by-ai-companies/\">AI companies aggressively scraping websites</a>. This can and does cause downtime for the websites, which makes their resources inaccessible for everyone.</p><p>Anubis is a compromise. Anubis uses a <a href=\"https://anubis.techaro.lol/docs/design/why-proof-of-work\">Proof-of-Work</a> scheme in the vein of <a href=\"https://en.wikipedia.org/wiki/Hashcash\">Hashcash</a>, 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.</p><p>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.</p><p>Please note that Anubis requires the use of modern JavaScript features that plugins like <a href=\"https://jshelter.org/\">JShelter</a> will disable. Please disable JShelter or other such plugins for this domain.</p></details><noscript><p>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.</p></noscript><div id=\"testarea\"></div></div>")
|
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 16, "\"></script><div id=\"progress\" role=\"progressbar\" aria-labelledby=\"status\"><div class=\"bar-inner\"></div></div><details><summary>Why am I seeing this?</summary><p>You are seeing this because the administrator of this website has set up <a href=\"https://github.com/TecharoHQ/anubis\">Anubis</a> to protect the server against the scourge of <a href=\"https://thelibre.news/foss-infrastructure-is-under-attack-by-ai-companies/\">AI companies aggressively scraping websites</a>. This can and does cause downtime for the websites, which makes their resources inaccessible for everyone.</p><p>Anubis is a compromise. Anubis uses a <a href=\"https://anubis.techaro.lol/docs/design/why-proof-of-work\">Proof-of-Work</a> scheme in the vein of <a href=\"https://en.wikipedia.org/wiki/Hashcash\">Hashcash</a>, 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.</p><p>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.</p><p>Please note that Anubis requires the use of modern JavaScript features that plugins like <a href=\"https://jshelter.org/\">JShelter</a> will disable. Please disable JShelter or other such plugins for this domain.</p></details><noscript><p>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.</p></noscript><div id=\"testarea\"></div></div>")
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ_7745c5c3_Err
|
return templ_7745c5c3_Err
|
||||||
}
|
}
|
||||||
@@ -231,38 +261,48 @@ func errorPage(message string, mail string) templ.Component {
|
@@ -232,38 +246,48 @@ func errorPage(message string, mail string) templ.Component {
|
||||||
templ_7745c5c3_Var11 = templ.NopComponent
|
templ_7745c5c3_Var11 = templ.NopComponent
|
||||||
}
|
}
|
||||||
ctx = templ.ClearChildren(ctx)
|
ctx = templ.ClearChildren(ctx)
|
||||||
- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 15, "<div class=\"centered-div\"><img id=\"image\" alt=\"Sad Anubis\" style=\"width:100%;max-width:256px;\" src=\"")
|
- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 15, "<div class=\"centered-div\"><img id=\"image\" alt=\"Sad Anubis\" style=\"width:100%;max-width:256px;\" src=\"")
|
||||||
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 20, "<div class=\"centered-div\">")
|
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 17, "<div class=\"centered-div\">")
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ_7745c5c3_Err
|
return templ_7745c5c3_Err
|
||||||
}
|
}
|
||||||
- var templ_7745c5c3_Var12 string
|
- 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)
|
- templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinStringErrs(anubis.BasePrefix + "/.within.website/x/cmd/anubis/static/img/reject.webp?cacheBuster=" + anubis.Version)
|
||||||
- if templ_7745c5c3_Err != nil {
|
- if templ_7745c5c3_Err != nil {
|
||||||
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 139, Col: 102}
|
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 140, Col: 181}
|
||||||
- }
|
- }
|
||||||
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var12))
|
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var12))
|
||||||
- if templ_7745c5c3_Err != nil {
|
- if templ_7745c5c3_Err != nil {
|
||||||
- return templ_7745c5c3_Err
|
- return templ_7745c5c3_Err
|
||||||
+ if anubis.EnableMascot {
|
+ if anubis.EnableMascot {
|
||||||
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 21, "<img id=\"image\" alt=\"Sad Anubis\" style=\"width:100%;max-width:256px;\" src=\"")
|
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 18, "<img id=\"image\" alt=\"Sad Anubis\" style=\"width:100%;max-width:256px;\" src=\"")
|
||||||
+ if templ_7745c5c3_Err != nil {
|
+ if templ_7745c5c3_Err != nil {
|
||||||
+ return templ_7745c5c3_Err
|
+ return templ_7745c5c3_Err
|
||||||
+ }
|
+ }
|
||||||
+ var templ_7745c5c3_Var12 string
|
+ 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)
|
+ templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinStringErrs(anubis.BasePrefix + "/.within.website/x/cmd/anubis/static/img/reject.webp?cacheBuster=" + anubis.Version)
|
||||||
+ if templ_7745c5c3_Err != nil {
|
+ if templ_7745c5c3_Err != nil {
|
||||||
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 147, Col: 102}
|
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 144, Col: 181}
|
||||||
+ }
|
+ }
|
||||||
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var12))
|
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var12))
|
||||||
+ if templ_7745c5c3_Err != nil {
|
+ if templ_7745c5c3_Err != nil {
|
||||||
+ return templ_7745c5c3_Err
|
+ return templ_7745c5c3_Err
|
||||||
+ }
|
+ }
|
||||||
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 22, "\">")
|
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 19, "\">")
|
||||||
+ if templ_7745c5c3_Err != nil {
|
+ if templ_7745c5c3_Err != nil {
|
||||||
+ return templ_7745c5c3_Err
|
+ return templ_7745c5c3_Err
|
||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 16, "\"><p>")
|
- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 16, "\"><p>")
|
||||||
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 23, "<p>")
|
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 20, "<p>")
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ_7745c5c3_Err
|
return templ_7745c5c3_Err
|
||||||
}
|
}
|
||||||
var templ_7745c5c3_Var13 string
|
var templ_7745c5c3_Var13 string
|
||||||
templ_7745c5c3_Var13, templ_7745c5c3_Err = templ.JoinStringErrs(message)
|
templ_7745c5c3_Var13, templ_7745c5c3_Err = templ.JoinStringErrs(message)
|
||||||
if templ_7745c5c3_Err != nil {
|
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: 141, Col: 14}
|
||||||
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 150, Col: 16}
|
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 146, Col: 14}
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var13))
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var13))
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ_7745c5c3_Err
|
return templ_7745c5c3_Err
|
||||||
}
|
}
|
||||||
- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 17, ".</p><button onClick=\"window.location.reload();\">Try again</button> ")
|
- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 17, ".</p><button onClick=\"window.location.reload();\">Try again</button> ")
|
||||||
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 24, ".</p><button onClick=\"window.location.reload();\">Try again</button> ")
|
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 21, ".</p><button onClick=\"window.location.reload();\">Try again</button> ")
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ_7745c5c3_Err
|
return templ_7745c5c3_Err
|
||||||
}
|
}
|
||||||
if mail != "" {
|
if mail != "" {
|
||||||
- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 18, "<p><a href=\"/\">Go home</a> or if you believe you should not be blocked, please contact the webmaster at <a href=\"")
|
- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 18, "<p><a href=\"/\">Go home</a> or if you believe you should not be blocked, please contact the webmaster at <a href=\"")
|
||||||
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 25, "<p><a href=\"/\">Go home</a> or if you believe you should not be blocked, please contact the webmaster at <a href=\"")
|
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 22, "<p><a href=\"/\">Go home</a> or if you believe you should not be blocked, please contact the webmaster at <a href=\"")
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ_7745c5c3_Err
|
return templ_7745c5c3_Err
|
||||||
}
|
}
|
||||||
@@ -271,30 +311,30 @@ func errorPage(message string, mail string) templ.Component {
|
@@ -272,30 +296,30 @@ func errorPage(message string, mail string) templ.Component {
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ_7745c5c3_Err
|
return templ_7745c5c3_Err
|
||||||
}
|
}
|
||||||
- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 19, "\">")
|
- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 19, "\">")
|
||||||
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 26, "\">")
|
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 23, "\">")
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ_7745c5c3_Err
|
return templ_7745c5c3_Err
|
||||||
}
|
}
|
||||||
var templ_7745c5c3_Var15 string
|
var templ_7745c5c3_Var15 string
|
||||||
templ_7745c5c3_Var15, templ_7745c5c3_Err = templ.JoinStringErrs(mail)
|
templ_7745c5c3_Var15, templ_7745c5c3_Err = templ.JoinStringErrs(mail)
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
- 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: 147, Col: 11}
|
||||||
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 154, Col: 9}
|
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 152, Col: 11}
|
||||||
}
|
}
|
||||||
_, 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 {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ_7745c5c3_Err
|
return templ_7745c5c3_Err
|
||||||
}
|
}
|
||||||
- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 20, "</a></p>")
|
- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 20, "</a></p>")
|
||||||
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 27, "</a></p>")
|
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 24, "</a></p>")
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ_7745c5c3_Err
|
return templ_7745c5c3_Err
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 21, "<p><a href=\"/\">Go home</a></p>")
|
- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 21, "<p><a href=\"/\">Go home</a></p>")
|
||||||
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 28, "<p><a href=\"/\">Go home</a></p>")
|
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 25, "<p><a href=\"/\">Go home</a></p>")
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ_7745c5c3_Err
|
return templ_7745c5c3_Err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 22, "</div>")
|
- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 22, "</div>")
|
||||||
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 29, "</div>")
|
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 26, "</div>")
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ_7745c5c3_Err
|
return templ_7745c5c3_Err
|
||||||
}
|
}
|
||||||
@@ -323,21 +363,31 @@ func bench() templ.Component {
|
@@ -324,21 +348,31 @@ func StaticHappy() templ.Component {
|
||||||
templ_7745c5c3_Var16 = templ.NopComponent
|
templ_7745c5c3_Var16 = templ.NopComponent
|
||||||
}
|
}
|
||||||
ctx = templ.ClearChildren(ctx)
|
ctx = templ.ClearChildren(ctx)
|
||||||
- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 23, "<div style=\"height:20rem;display:flex\"><table style=\"margin-top:1rem;display:grid;grid-template:auto 1fr/auto auto;gap:0 0.5rem\"><thead style=\"border-bottom:1px solid black;padding:0.25rem 0;display:grid;grid-template:1fr/subgrid;grid-column:1/-1\"><tr id=\"table-header\" style=\"display:contents\"><th style=\"width:4.5rem\">Time</th><th style=\"width:4rem\">Iters</th></tr><tr id=\"table-header-compare\" style=\"display:none\"><th style=\"width:4.5rem\">Time A</th><th style=\"width:4rem\">Iters A</th><th style=\"width:4.5rem\">Time B</th><th style=\"width:4rem\">Iters B</th></tr></thead> <tbody id=\"results\" 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\"></tbody></table><div class=\"centered-div\"><img id=\"image\" style=\"width:100%;max-width:256px;\" src=\"")
|
- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 23, "<div class=\"centered-div\"><img style=\"display:none;\" style=\"width:100%;max-width:256px;\" src=\"")
|
||||||
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 30, "<div style=\"height:20rem;display:flex\"><table style=\"margin-top:1rem;display:grid;grid-template:auto 1fr/auto auto;gap:0 0.5rem\"><thead style=\"border-bottom:1px solid black;padding:0.25rem 0;display:grid;grid-template:1fr/subgrid;grid-column:1/-1\"><tr id=\"table-header\" style=\"display:contents\"><th style=\"width:4.5rem\">Time</th><th style=\"width:4rem\">Iters</th></tr><tr id=\"table-header-compare\" style=\"display:none\"><th style=\"width:4.5rem\">Time A</th><th style=\"width:4rem\">Iters A</th><th style=\"width:4.5rem\">Time B</th><th style=\"width:4rem\">Iters B</th></tr></thead> <tbody id=\"results\" 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\"></tbody></table><div class=\"centered-div\">")
|
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 27, "<div class=\"centered-div\">")
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ_7745c5c3_Err
|
return templ_7745c5c3_Err
|
||||||
}
|
}
|
||||||
- var templ_7745c5c3_Var17 string
|
- var templ_7745c5c3_Var17 string
|
||||||
- templ_7745c5c3_Var17, templ_7745c5c3_Err = templ.JoinStringErrs("/.within.website/x/cmd/anubis/static/img/pensive.webp?cacheBuster=" +
|
- templ_7745c5c3_Var17, templ_7745c5c3_Err = templ.JoinStringErrs("/.within.website/x/cmd/anubis/static/img/happy.webp?cacheBuster=" +
|
||||||
- anubis.Version)
|
- anubis.Version)
|
||||||
- if templ_7745c5c3_Err != nil {
|
- if templ_7745c5c3_Err != nil {
|
||||||
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 176, Col: 22}
|
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 162, Col: 18}
|
||||||
- }
|
- }
|
||||||
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var17))
|
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var17))
|
||||||
- if templ_7745c5c3_Err != nil {
|
- if templ_7745c5c3_Err != nil {
|
||||||
- return templ_7745c5c3_Err
|
- return templ_7745c5c3_Err
|
||||||
+ if anubis.EnableMascot {
|
+ if anubis.EnableMascot {
|
||||||
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 31, "<img id=\"image\" style=\"width:100%;max-width:256px;\" src=\"")
|
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 28, "<img style=\"display:none;\" style=\"width:100%;max-width:256px;\" src=\"")
|
||||||
+ if templ_7745c5c3_Err != nil {
|
+ if templ_7745c5c3_Err != nil {
|
||||||
+ return templ_7745c5c3_Err
|
+ return templ_7745c5c3_Err
|
||||||
+ }
|
+ }
|
||||||
+ var templ_7745c5c3_Var17 string
|
+ var templ_7745c5c3_Var17 string
|
||||||
+ templ_7745c5c3_Var17, templ_7745c5c3_Err = templ.JoinStringErrs("/.within.website/x/cmd/anubis/static/img/pensive.webp?cacheBuster=" +
|
+ templ_7745c5c3_Var17, templ_7745c5c3_Err = templ.JoinStringErrs("/.within.website/x/cmd/anubis/static/img/happy.webp?cacheBuster=" +
|
||||||
+ anubis.Version)
|
+ anubis.Version)
|
||||||
+ if templ_7745c5c3_Err != nil {
|
+ if templ_7745c5c3_Err != nil {
|
||||||
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 186, Col: 22}
|
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 168, Col: 18}
|
||||||
+ }
|
+ }
|
||||||
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var17))
|
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var17))
|
||||||
+ if templ_7745c5c3_Err != nil {
|
+ if templ_7745c5c3_Err != nil {
|
||||||
+ return templ_7745c5c3_Err
|
+ return templ_7745c5c3_Err
|
||||||
+ }
|
+ }
|
||||||
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 32, "\">")
|
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 29, "\">")
|
||||||
+ if templ_7745c5c3_Err != nil {
|
+ if templ_7745c5c3_Err != nil {
|
||||||
+ return templ_7745c5c3_Err
|
+ return templ_7745c5c3_Err
|
||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 24, "\"><p id=\"status\" style=\"max-width:256px\">Loading...</p><script async type=\"module\" src=\"")
|
- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 24, "\"><p>This is just a check endpoint for your reverse proxy to use.</p></div>")
|
||||||
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 33, "<p id=\"status\" style=\"max-width:256px\">Loading...</p><script async type=\"module\" src=\"")
|
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 30, "<p>This is just a check endpoint for your reverse proxy to use.</p></div>")
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ_7745c5c3_Err
|
return templ_7745c5c3_Err
|
||||||
}
|
}
|
||||||
@@ -345,13 +395,13 @@ func bench() templ.Component {
|
@@ -367,33 +401,43 @@ func bench() templ.Component {
|
||||||
templ_7745c5c3_Var18, templ_7745c5c3_Err = templ.JoinStringErrs(
|
templ_7745c5c3_Var18 = templ.NopComponent
|
||||||
"/.within.website/x/cmd/anubis/static/js/bench.mjs?cacheBuster=" + anubis.Version)
|
|
||||||
if templ_7745c5c3_Err != nil {
|
|
||||||
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 180, Col: 89}
|
|
||||||
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 191, Col: 89}
|
|
||||||
}
|
}
|
||||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var18))
|
ctx = templ.ClearChildren(ctx)
|
||||||
|
- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 25, "<div style=\"height:20rem;display:flex\"><table style=\"margin-top:1rem;display:grid;grid-template:auto 1fr/auto auto;gap:0 0.5rem\"><thead style=\"border-bottom:1px solid black;padding:0.25rem 0;display:grid;grid-template:1fr/subgrid;grid-column:1/-1\"><tr id=\"table-header\" style=\"display:contents\"><th style=\"width:4.5rem\">Time</th><th style=\"width:4rem\">Iters</th></tr><tr id=\"table-header-compare\" style=\"display:none\"><th style=\"width:4.5rem\">Time A</th><th style=\"width:4rem\">Iters A</th><th style=\"width:4.5rem\">Time B</th><th style=\"width:4rem\">Iters B</th></tr></thead> <tbody id=\"results\" 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\"></tbody></table><div class=\"centered-div\"><img id=\"image\" style=\"width:100%;max-width:256px;\" src=\"")
|
||||||
|
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 31, "<div style=\"height:20rem;display:flex\"><table style=\"margin-top:1rem;display:grid;grid-template:auto 1fr/auto auto;gap:0 0.5rem\"><thead style=\"border-bottom:1px solid black;padding:0.25rem 0;display:grid;grid-template:1fr/subgrid;grid-column:1/-1\"><tr id=\"table-header\" style=\"display:contents\"><th style=\"width:4.5rem\">Time</th><th style=\"width:4rem\">Iters</th></tr><tr id=\"table-header-compare\" style=\"display:none\"><th style=\"width:4.5rem\">Time A</th><th style=\"width:4rem\">Iters A</th><th style=\"width:4.5rem\">Time B</th><th style=\"width:4rem\">Iters B</th></tr></thead> <tbody id=\"results\" 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\"></tbody></table><div class=\"centered-div\">")
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ_7745c5c3_Err
|
return templ_7745c5c3_Err
|
||||||
}
|
}
|
||||||
- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 25, "\"></script><div id=\"sparkline\"></div><noscript><p>Running the benchmark tool requires JavaScript to be enabled.</p></noscript></div></div><form id=\"controls\" style=\"position:fixed;top:0.5rem;right:0.5rem\"><div style=\"display:flex;justify-content:end\"><label for=\"difficulty-input\" style=\"margin-right:0.5rem\">Difficulty:</label> <input id=\"difficulty-input\" type=\"number\" name=\"difficulty\" style=\"width:3rem\"></div><div style=\"margin-top:0.25rem;display:flex;justify-content:end\"><label for=\"algorithm-select\" style=\"margin-right:0.5rem\">Algorithm:</label> <select id=\"algorithm-select\" name=\"algorithm\"></select></div><div style=\"margin-top:0.25rem;display:flex;justify-content:end\"><label for=\"compare-select\" style=\"margin-right:0.5rem\">Compare:</label> <select id=\"compare-select\" name=\"compare\"><option value=\"NONE\">-</option></select></div></form>")
|
- var templ_7745c5c3_Var19 string
|
||||||
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 34, "\"></script><div id=\"sparkline\"></div><noscript><p>Running the benchmark tool requires JavaScript to be enabled.</p></noscript></div></div><form id=\"controls\" style=\"position:fixed;top:0.5rem;right:0.5rem\"><div style=\"display:flex;justify-content:end\"><label for=\"difficulty-input\" style=\"margin-right:0.5rem\">Difficulty:</label> <input id=\"difficulty-input\" type=\"number\" name=\"difficulty\" style=\"width:3rem\"></div><div style=\"margin-top:0.25rem;display:flex;justify-content:end\"><label for=\"algorithm-select\" style=\"margin-right:0.5rem\">Algorithm:</label> <select id=\"algorithm-select\" name=\"algorithm\"></select></div><div style=\"margin-top:0.25rem;display:flex;justify-content:end\"><label for=\"compare-select\" style=\"margin-right:0.5rem\">Compare:</label> <select id=\"compare-select\" name=\"compare\"><option value=\"NONE\">-</option></select></div></form>")
|
- templ_7745c5c3_Var19, templ_7745c5c3_Err = templ.JoinStringErrs(anubis.BasePrefix + "/.within.website/x/cmd/anubis/static/img/pensive.webp?cacheBuster=" + anubis.Version)
|
||||||
|
- if templ_7745c5c3_Err != nil {
|
||||||
|
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 191, Col: 166}
|
||||||
|
- }
|
||||||
|
- _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var19))
|
||||||
|
- if templ_7745c5c3_Err != nil {
|
||||||
|
- return templ_7745c5c3_Err
|
||||||
|
+ if anubis.EnableMascot {
|
||||||
|
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 32, "<img id=\"image\" style=\"width:100%;max-width:256px;\" src=\"")
|
||||||
|
+ if templ_7745c5c3_Err != nil {
|
||||||
|
+ return templ_7745c5c3_Err
|
||||||
|
+ }
|
||||||
|
+ var templ_7745c5c3_Var19 string
|
||||||
|
+ templ_7745c5c3_Var19, templ_7745c5c3_Err = templ.JoinStringErrs(anubis.BasePrefix + "/.within.website/x/cmd/anubis/static/img/pensive.webp?cacheBuster=" + anubis.Version)
|
||||||
|
+ if templ_7745c5c3_Err != nil {
|
||||||
|
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 199, Col: 166}
|
||||||
|
+ }
|
||||||
|
+ _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var19))
|
||||||
|
+ if templ_7745c5c3_Err != nil {
|
||||||
|
+ return templ_7745c5c3_Err
|
||||||
|
+ }
|
||||||
|
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 33, "\">")
|
||||||
|
+ if templ_7745c5c3_Err != nil {
|
||||||
|
+ return templ_7745c5c3_Err
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 26, "\"><p id=\"status\" style=\"max-width:256px\">Loading...</p><script async type=\"module\" src=\"")
|
||||||
|
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 34, "<p id=\"status\" style=\"max-width:256px\">Loading...</p><script async type=\"module\" src=\"")
|
||||||
|
if templ_7745c5c3_Err != nil {
|
||||||
|
return templ_7745c5c3_Err
|
||||||
|
}
|
||||||
|
var templ_7745c5c3_Var20 string
|
||||||
|
templ_7745c5c3_Var20, templ_7745c5c3_Err = templ.JoinStringErrs(anubis.BasePrefix + "/.within.website/x/cmd/anubis/static/js/bench.mjs?cacheBuster=" + anubis.Version)
|
||||||
|
if templ_7745c5c3_Err != nil {
|
||||||
|
- return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 193, Col: 138}
|
||||||
|
+ return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 202, Col: 138}
|
||||||
|
}
|
||||||
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var20))
|
||||||
|
if templ_7745c5c3_Err != nil {
|
||||||
|
return templ_7745c5c3_Err
|
||||||
|
}
|
||||||
|
- templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 27, "\"></script><div id=\"sparkline\"></div><noscript><p>Running the benchmark tool requires JavaScript to be enabled.</p></noscript></div></div><form id=\"controls\" style=\"position:fixed;top:0.5rem;right:0.5rem\"><div style=\"display:flex;justify-content:end\"><label for=\"difficulty-input\" style=\"margin-right:0.5rem\">Difficulty:</label> <input id=\"difficulty-input\" type=\"number\" name=\"difficulty\" style=\"width:3rem\"></div><div style=\"margin-top:0.25rem;display:flex;justify-content:end\"><label for=\"algorithm-select\" style=\"margin-right:0.5rem\">Algorithm:</label> <select id=\"algorithm-select\" name=\"algorithm\"></select></div><div style=\"margin-top:0.25rem;display:flex;justify-content:end\"><label for=\"compare-select\" style=\"margin-right:0.5rem\">Compare:</label> <select id=\"compare-select\" name=\"compare\"><option value=\"NONE\">-</option></select></div></form>")
|
||||||
|
+ templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 35, "\"></script><div id=\"sparkline\"></div><noscript><p>Running the benchmark tool requires JavaScript to be enabled.</p></noscript></div></div><form id=\"controls\" style=\"position:fixed;top:0.5rem;right:0.5rem\"><div style=\"display:flex;justify-content:end\"><label for=\"difficulty-input\" style=\"margin-right:0.5rem\">Difficulty:</label> <input id=\"difficulty-input\" type=\"number\" name=\"difficulty\" style=\"width:3rem\"></div><div style=\"margin-top:0.25rem;display:flex;justify-content:end\"><label for=\"algorithm-select\" style=\"margin-right:0.5rem\">Algorithm:</label> <select id=\"algorithm-select\" name=\"algorithm\"></select></div><div style=\"margin-top:0.25rem;display:flex;justify-content:end\"><label for=\"compare-select\" style=\"margin-right:0.5rem\">Compare:</label> <select id=\"compare-select\" name=\"compare\"><option value=\"NONE\">-</option></select></div></form>")
|
||||||
if templ_7745c5c3_Err != nil {
|
if templ_7745c5c3_Err != nil {
|
||||||
return templ_7745c5c3_Err
|
return templ_7745c5c3_Err
|
||||||
}
|
}
|
||||||
diff --git a/web/js/main.mjs b/web/js/main.mjs
|
diff --git a/web/js/main.mjs b/web/js/main.mjs
|
||||||
index 9bb6031..7203bfd 100644
|
index c50ed2b..b0474c8 100644
|
||||||
--- a/web/js/main.mjs
|
--- a/web/js/main.mjs
|
||||||
+++ b/web/js/main.mjs
|
+++ b/web/js/main.mjs
|
||||||
@@ -81,6 +81,7 @@ function showContinueBar(hash, nonce, t0, t1) {
|
@@ -82,6 +82,7 @@ function showContinueBar(hash, nonce, t0, t1) {
|
||||||
const title = document.getElementById('title');
|
|
||||||
const progress = document.getElementById('progress');
|
const progress = document.getElementById('progress');
|
||||||
const anubisVersion = JSON.parse(document.getElementById('anubis_version').textContent);
|
const anubisVersion = JSON.parse(document.getElementById('anubis_version').textContent);
|
||||||
|
const basePrefix = JSON.parse(document.getElementById('anubis_base_prefix').textContent);
|
||||||
+ const enableMascot = JSON.parse(document.getElementById('enable_mascot').textContent);
|
+ const enableMascot = JSON.parse(document.getElementById('enable_mascot').textContent);
|
||||||
const details = document.querySelector('details');
|
const details = document.querySelector('details');
|
||||||
let userReadDetails = false;
|
let userReadDetails = false;
|
||||||
|
|
||||||
@@ -95,7 +96,7 @@ function showContinueBar(hash, nonce, t0, t1) {
|
@@ -96,7 +97,7 @@ function showContinueBar(hash, nonce, t0, t1) {
|
||||||
const ohNoes = ({ titleMsg, statusMsg, imageSrc }) => {
|
const ohNoes = ({ titleMsg, statusMsg, imageSrc }) => {
|
||||||
title.innerHTML = titleMsg;
|
title.innerHTML = titleMsg;
|
||||||
status.innerHTML = statusMsg;
|
status.innerHTML = statusMsg;
|
||||||
|
@ -421,50 +415,50 @@ index 9bb6031..7203bfd 100644
|
||||||
progress.style.display = "none";
|
progress.style.display = "none";
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -103,7 +104,7 @@ function showContinueBar(hash, nonce, t0, t1) {
|
@@ -104,7 +105,7 @@ function showContinueBar(hash, nonce, t0, t1) {
|
||||||
ohNoes({
|
ohNoes({
|
||||||
titleMsg: "Your context is not secure!",
|
titleMsg: "Your context is not secure!",
|
||||||
statusMsg: `Try connecting over HTTPS or let the admin know to set up HTTPS. For more information, see <a href="https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts#when_is_a_context_considered_secure">MDN</a>.`,
|
statusMsg: `Try connecting over HTTPS or let the admin know to set up HTTPS. For more information, see <a href="https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts#when_is_a_context_considered_secure">MDN</a>.`,
|
||||||
- imageSrc: imageURL("reject", anubisVersion),
|
- imageSrc: imageURL("reject", anubisVersion, basePrefix),
|
||||||
+ ...(enableMascot && { imageSrc: imageURL("reject", anubisVersion) }),
|
+ ...(enableMascot && { imageSrc: imageURL("reject", anubisVersion, basePrefix) }),
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -128,7 +129,7 @@ function showContinueBar(hash, nonce, t0, t1) {
|
@@ -129,7 +130,7 @@ function showContinueBar(hash, nonce, t0, t1) {
|
||||||
ohNoes({
|
ohNoes({
|
||||||
titleMsg: `Missing feature ${name}`,
|
titleMsg: `Missing feature ${name}`,
|
||||||
statusMsg: msg,
|
statusMsg: msg,
|
||||||
- imageSrc: imageURL("reject", anubisVersion),
|
- imageSrc: imageURL("reject", anubisVersion, basePrefix),
|
||||||
+ ...(enableMascot && { imageSrc: imageURL("reject", anubisVersion) }),
|
+ ...(enableMascot && { imageSrc: imageURL("reject", anubisVersion, basePrefix) }),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -140,7 +141,7 @@ function showContinueBar(hash, nonce, t0, t1) {
|
@@ -141,7 +142,7 @@ function showContinueBar(hash, nonce, t0, t1) {
|
||||||
ohNoes({
|
ohNoes({
|
||||||
titleMsg: "Challenge error!",
|
titleMsg: "Challenge error!",
|
||||||
statusMsg: `Failed to resolve check algorithm. You may want to reload the page.`,
|
statusMsg: `Failed to resolve check algorithm. You may want to reload the page.`,
|
||||||
- imageSrc: imageURL("reject", anubisVersion),
|
- imageSrc: imageURL("reject", anubisVersion, basePrefix),
|
||||||
+ ...(enableMascot && { imageSrc: imageURL("reject", anubisVersion) }),
|
+ ...(enableMascot && { imageSrc: imageURL("reject", anubisVersion, basePrefix) }),
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -198,7 +199,9 @@ function showContinueBar(hash, nonce, t0, t1) {
|
@@ -199,7 +200,9 @@ function showContinueBar(hash, nonce, t0, t1) {
|
||||||
|
|
||||||
title.innerHTML = "Success!";
|
title.innerHTML = "Success!";
|
||||||
status.innerHTML = `Done! Took ${t1 - t0}ms, ${nonce} iterations`;
|
status.innerHTML = `Done! Took ${t1 - t0}ms, ${nonce} iterations`;
|
||||||
- image.src = imageURL("happy", anubisVersion);
|
- image.src = imageURL("happy", anubisVersion, basePrefix);
|
||||||
+ if (enableMascot) {
|
+ if (enableMascot) {
|
||||||
+ image.src = imageURL("happy", anubisVersion);
|
+ image.src = imageURL("happy", anubisVersion, basePrefix);
|
||||||
+ }
|
+ }
|
||||||
progress.style.display = "none";
|
progress.style.display = "none";
|
||||||
|
|
||||||
if (userReadDetails) {
|
if (userReadDetails) {
|
||||||
@@ -253,7 +256,7 @@ function showContinueBar(hash, nonce, t0, t1) {
|
@@ -254,7 +257,7 @@ function showContinueBar(hash, nonce, t0, t1) {
|
||||||
ohNoes({
|
ohNoes({
|
||||||
titleMsg: "Calculation error!",
|
titleMsg: "Calculation error!",
|
||||||
statusMsg: `Failed to calculate challenge: ${err.message}`,
|
statusMsg: `Failed to calculate challenge: ${err.message}`,
|
||||||
- imageSrc: imageURL("reject", anubisVersion),
|
- imageSrc: imageURL("reject", anubisVersion, basePrefix),
|
||||||
+ ...(enableMascot && { imageSrc: imageURL("reject", anubisVersion) })
|
+ ...(enableMascot && { imageSrc: imageURL("reject", anubisVersion, basePrefix) })
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
|
|
|
@ -1,39 +0,0 @@
|
||||||
From 1555f2c81ee223d1e923050841bd8ba4bfe6e11c Mon Sep 17 00:00:00 2001
|
|
||||||
From: Fijxu <fijxu@nadeko.net>
|
|
||||||
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 <a href="https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts#when_is_a_context_considered_secure">MDN</a>.`,
|
|
||||||
- ...(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 <a href="https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts#when_is_a_context_considered_secure">MDN</a>.`,
|
|
||||||
+ // ...(enableMascot && { imageSrc: imageURL("reject", anubisVersion) }),
|
|
||||||
+ // });
|
|
||||||
+ // return;
|
|
||||||
+ // }
|
|
||||||
|
|
||||||
// const testarea = document.getElementById('testarea');
|
|
||||||
|
|
||||||
--
|
|
||||||
2.49.0
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue