mirror of
https://github.com/TecharoHQ/anubis.git
synced 2026-02-07 12:29:44 -06:00
Merge branch 'main' into Xe/proof-of-react
Signed-off-by: Xe Iaso <xe.iaso@techaro.lol>
This commit is contained in:
13
.github/actions/spelling/expect.txt
vendored
13
.github/actions/spelling/expect.txt
vendored
@@ -1,5 +1,6 @@
|
||||
acs
|
||||
Aibrew
|
||||
alibaba
|
||||
alrest
|
||||
amazonbot
|
||||
anthro
|
||||
@@ -17,6 +18,7 @@ badregexes
|
||||
bbolt
|
||||
bdba
|
||||
berr
|
||||
bezier
|
||||
bingbot
|
||||
Bitcoin
|
||||
bitrate
|
||||
@@ -81,6 +83,7 @@ dracula
|
||||
dronebl
|
||||
droneblresponse
|
||||
dropin
|
||||
dsilence
|
||||
duckduckbot
|
||||
eerror
|
||||
ellenjoe
|
||||
@@ -114,6 +117,7 @@ geoip
|
||||
geoipchecker
|
||||
gha
|
||||
GHSA
|
||||
Ghz
|
||||
gipc
|
||||
gitea
|
||||
godotenv
|
||||
@@ -127,6 +131,7 @@ goyaml
|
||||
GPG
|
||||
GPT
|
||||
gptbot
|
||||
Graphene
|
||||
grpcprom
|
||||
grw
|
||||
Hashcash
|
||||
@@ -136,11 +141,13 @@ healthcheck
|
||||
healthz
|
||||
hec
|
||||
hmc
|
||||
homelab
|
||||
hostable
|
||||
htmlc
|
||||
htmx
|
||||
httpdebug
|
||||
Huawei
|
||||
huawei
|
||||
hypertext
|
||||
iaskspider
|
||||
iaso
|
||||
@@ -229,6 +236,7 @@ pki
|
||||
podkova
|
||||
podman
|
||||
poststart
|
||||
poxied
|
||||
prebaked
|
||||
privkey
|
||||
promauto
|
||||
@@ -256,6 +264,7 @@ runlevels
|
||||
RUnlock
|
||||
runtimedir
|
||||
runtimedirectory
|
||||
Ryzen
|
||||
sas
|
||||
sasl
|
||||
searchbot
|
||||
@@ -270,6 +279,7 @@ shirou
|
||||
Sidetrade
|
||||
simprint
|
||||
sitemap
|
||||
Slackware
|
||||
sls
|
||||
sni
|
||||
Spambot
|
||||
@@ -302,6 +312,7 @@ Tik
|
||||
Timpibot
|
||||
TLog
|
||||
traefik
|
||||
trunc
|
||||
uberspace
|
||||
Unbreak
|
||||
unbreakdocker
|
||||
@@ -330,6 +341,7 @@ wordpress
|
||||
Workaround
|
||||
workdir
|
||||
wpbot
|
||||
XCircle
|
||||
Xeact
|
||||
xeiaso
|
||||
xeserv
|
||||
@@ -339,6 +351,7 @@ xff
|
||||
XForwarded
|
||||
XNG
|
||||
XOB
|
||||
XOriginal
|
||||
XReal
|
||||
yae
|
||||
YAMLTo
|
||||
|
||||
13
SECURITY.md
Normal file
13
SECURITY.md
Normal file
@@ -0,0 +1,13 @@
|
||||
# Security Policy
|
||||
|
||||
Techaro follows the [Semver 2.0 scheme](https://semver.org/).
|
||||
|
||||
## Supported Versions
|
||||
|
||||
Techaro strives to support the two most recent minor versions of Anubis. Patches to those versions will be published as patch releases.
|
||||
|
||||
## Reporting a Vulnerability
|
||||
|
||||
Email security@techaro.lol with details on the vulnerability and reproduction steps. You will get a response as soon as possible.
|
||||
|
||||
Please take care to send your email as a mixed plaintext and HTML message. Messages with GPG signatures or that are plaintext only may be blocked by the spam filter.
|
||||
@@ -23,6 +23,9 @@ const CookieDefaultExpirationTime = 7 * 24 * time.Hour
|
||||
// BasePrefix is a global prefix for all Anubis endpoints. Can be emptied to remove the prefix entirely.
|
||||
var BasePrefix = ""
|
||||
|
||||
// PublicUrl is the externally accessible URL for this Anubis instance.
|
||||
var PublicUrl = ""
|
||||
|
||||
// StaticPath is the location where all static Anubis assets are located.
|
||||
const StaticPath = "/.within.website/x/cmd/anubis/"
|
||||
|
||||
|
||||
@@ -69,6 +69,7 @@ var (
|
||||
targetSNI = flag.String("target-sni", "", "if set, the value of the TLS handshake hostname when forwarding requests to the target")
|
||||
targetHost = flag.String("target-host", "", "if set, the value of the Host header when forwarding requests to the target")
|
||||
targetInsecureSkipVerify = flag.Bool("target-insecure-skip-verify", false, "if true, skips TLS validation for the backend")
|
||||
targetDisableKeepAlive = flag.Bool("target-disable-keepalive", false, "if true, disables HTTP keep-alive for the backend")
|
||||
healthcheck = flag.Bool("healthcheck", false, "run a health check against Anubis")
|
||||
useRemoteAddress = flag.Bool("use-remote-address", false, "read the client's IP address from the network request, useful for debugging and running Anubis on bare metal")
|
||||
debugBenchmarkJS = flag.Bool("debug-benchmark-js", false, "respond to every request with a challenge for benchmarking hashrate")
|
||||
@@ -188,7 +189,7 @@ func setupListener(network string, address string) (net.Listener, string) {
|
||||
return listener, formattedAddress
|
||||
}
|
||||
|
||||
func makeReverseProxy(target string, targetSNI string, targetHost string, insecureSkipVerify bool) (http.Handler, error) {
|
||||
func makeReverseProxy(target string, targetSNI string, targetHost string, insecureSkipVerify bool, targetDisableKeepAlive bool) (http.Handler, error) {
|
||||
targetUri, err := url.Parse(target)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to parse target URL: %w", err)
|
||||
@@ -196,6 +197,10 @@ func makeReverseProxy(target string, targetSNI string, targetHost string, insecu
|
||||
|
||||
transport := http.DefaultTransport.(*http.Transport).Clone()
|
||||
|
||||
if targetDisableKeepAlive {
|
||||
transport.DisableKeepAlives = true
|
||||
}
|
||||
|
||||
// https://github.com/oauth2-proxy/oauth2-proxy/blob/4e2100a2879ef06aea1411790327019c1a09217c/pkg/upstream/http.go#L124
|
||||
if targetUri.Scheme == "unix" {
|
||||
// clean path up so we don't use the socket path in proxied requests
|
||||
@@ -281,7 +286,7 @@ func main() {
|
||||
// when using anubis via Systemd and environment variables, then it is not possible to set targe to an empty string but only to space
|
||||
if strings.TrimSpace(*target) != "" {
|
||||
var err error
|
||||
rp, err = makeReverseProxy(*target, *targetSNI, *targetHost, *targetInsecureSkipVerify)
|
||||
rp, err = makeReverseProxy(*target, *targetSNI, *targetHost, *targetInsecureSkipVerify, *targetDisableKeepAlive)
|
||||
if err != nil {
|
||||
log.Fatalf("can't make reverse proxy: %v", err)
|
||||
}
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
|
||||
bots:
|
||||
# Pathological bots to deny
|
||||
- # This correlates to data/bots/deny-pathological.yaml in the source tree
|
||||
# https://github.com/TecharoHQ/anubis/blob/main/data/bots/deny-pathological.yaml
|
||||
- # This correlates to data/bots/_deny-pathological.yaml in the source tree
|
||||
# https://github.com/TecharoHQ/anubis/blob/main/data/bots/_deny-pathological.yaml
|
||||
import: (data)/bots/_deny-pathological.yaml
|
||||
- import: (data)/bots/aggressive-brazilian-scrapers.yaml
|
||||
|
||||
|
||||
@@ -2,3 +2,5 @@
|
||||
- import: (data)/bots/headless-browsers.yaml
|
||||
- import: (data)/bots/us-ai-scraper.yaml
|
||||
- import: (data)/bots/custom-async-http-client.yaml
|
||||
- import: (data)/crawlers/alibaba-cloud.yaml
|
||||
- import: (data)/crawlers/huawei-cloud.yaml
|
||||
|
||||
881
data/crawlers/alibaba-cloud.yaml
Normal file
881
data/crawlers/alibaba-cloud.yaml
Normal file
@@ -0,0 +1,881 @@
|
||||
- name: alibaba-cloud
|
||||
action: DENY
|
||||
# Updated 2025-08-20 from IP addresses for AS45102
|
||||
remote_addresses:
|
||||
- 103.81.186.0/23
|
||||
- 110.76.21.0/24
|
||||
- 110.76.23.0/24
|
||||
- 116.251.64.0/18
|
||||
- 139.95.0.0/23
|
||||
- 139.95.10.0/23
|
||||
- 139.95.12.0/23
|
||||
- 139.95.14.0/23
|
||||
- 139.95.16.0/23
|
||||
- 139.95.18.0/23
|
||||
- 139.95.2.0/23
|
||||
- 139.95.4.0/23
|
||||
- 139.95.6.0/23
|
||||
- 139.95.64.0/24
|
||||
- 139.95.8.0/23
|
||||
- 14.1.112.0/22
|
||||
- 14.1.115.0/24
|
||||
- 140.205.1.0/24
|
||||
- 140.205.122.0/24
|
||||
- 147.139.0.0/17
|
||||
- 147.139.0.0/18
|
||||
- 147.139.128.0/17
|
||||
- 147.139.128.0/18
|
||||
- 147.139.155.0/24
|
||||
- 147.139.192.0/18
|
||||
- 147.139.64.0/18
|
||||
- 149.129.0.0/20
|
||||
- 149.129.0.0/21
|
||||
- 149.129.16.0/23
|
||||
- 149.129.192.0/18
|
||||
- 149.129.192.0/19
|
||||
- 149.129.224.0/19
|
||||
- 149.129.32.0/19
|
||||
- 149.129.64.0/18
|
||||
- 149.129.64.0/19
|
||||
- 149.129.8.0/21
|
||||
- 149.129.96.0/19
|
||||
- 156.227.20.0/24
|
||||
- 156.236.12.0/24
|
||||
- 156.236.17.0/24
|
||||
- 156.240.76.0/23
|
||||
- 156.245.1.0/24
|
||||
- 161.117.0.0/16
|
||||
- 161.117.0.0/17
|
||||
- 161.117.126.0/24
|
||||
- 161.117.127.0/24
|
||||
- 161.117.128.0/17
|
||||
- 161.117.128.0/24
|
||||
- 161.117.129.0/24
|
||||
- 161.117.138.0/24
|
||||
- 161.117.143.0/24
|
||||
- 170.33.104.0/24
|
||||
- 170.33.105.0/24
|
||||
- 170.33.106.0/24
|
||||
- 170.33.107.0/24
|
||||
- 170.33.136.0/24
|
||||
- 170.33.137.0/24
|
||||
- 170.33.138.0/24
|
||||
- 170.33.20.0/24
|
||||
- 170.33.21.0/24
|
||||
- 170.33.22.0/24
|
||||
- 170.33.23.0/24
|
||||
- 170.33.24.0/24
|
||||
- 170.33.29.0/24
|
||||
- 170.33.30.0/24
|
||||
- 170.33.31.0/24
|
||||
- 170.33.32.0/24
|
||||
- 170.33.33.0/24
|
||||
- 170.33.34.0/24
|
||||
- 170.33.35.0/24
|
||||
- 170.33.64.0/24
|
||||
- 170.33.65.0/24
|
||||
- 170.33.66.0/24
|
||||
- 170.33.68.0/24
|
||||
- 170.33.69.0/24
|
||||
- 170.33.72.0/24
|
||||
- 170.33.73.0/24
|
||||
- 170.33.76.0/24
|
||||
- 170.33.77.0/24
|
||||
- 170.33.78.0/24
|
||||
- 170.33.79.0/24
|
||||
- 170.33.80.0/24
|
||||
- 170.33.81.0/24
|
||||
- 170.33.82.0/24
|
||||
- 170.33.83.0/24
|
||||
- 170.33.84.0/24
|
||||
- 170.33.85.0/24
|
||||
- 170.33.86.0/24
|
||||
- 170.33.88.0/24
|
||||
- 170.33.90.0/24
|
||||
- 170.33.92.0/24
|
||||
- 170.33.93.0/24
|
||||
- 185.78.106.0/23
|
||||
- 198.11.128.0/18
|
||||
- 198.11.137.0/24
|
||||
- 198.11.184.0/21
|
||||
- 202.144.199.0/24
|
||||
- 203.107.64.0/24
|
||||
- 203.107.65.0/24
|
||||
- 203.107.66.0/24
|
||||
- 203.107.67.0/24
|
||||
- 203.107.68.0/24
|
||||
- 205.204.102.0/23
|
||||
- 205.204.111.0/24
|
||||
- 205.204.117.0/24
|
||||
- 205.204.125.0/24
|
||||
- 205.204.96.0/19
|
||||
- 223.5.5.0/24
|
||||
- 223.6.6.0/24
|
||||
- 2400:3200::/48
|
||||
- 2400:3200:baba::/48
|
||||
- 2400:b200:4100::/48
|
||||
- 2400:b200:4101::/48
|
||||
- 2400:b200:4102::/48
|
||||
- 2400:b200:4103::/48
|
||||
- 2401:8680:4100::/48
|
||||
- 2401:b180:4100::/48
|
||||
- 2404:2280:1000::/36
|
||||
- 2404:2280:1000::/37
|
||||
- 2404:2280:1800::/37
|
||||
- 2404:2280:2000::/36
|
||||
- 2404:2280:2000::/37
|
||||
- 2404:2280:2800::/37
|
||||
- 2404:2280:3000::/36
|
||||
- 2404:2280:3000::/37
|
||||
- 2404:2280:3800::/37
|
||||
- 2404:2280:4000::/36
|
||||
- 2404:2280:4000::/37
|
||||
- 2404:2280:4800::/37
|
||||
- 2408:4000:1000::/48
|
||||
- 2408:4009:500::/48
|
||||
- 240b:4000::/32
|
||||
- 240b:4000::/33
|
||||
- 240b:4000:8000::/33
|
||||
- 240b:4000:fffe::/48
|
||||
- 240b:4001::/32
|
||||
- 240b:4001::/33
|
||||
- 240b:4001:8000::/33
|
||||
- 240b:4002::/32
|
||||
- 240b:4002::/33
|
||||
- 240b:4002:8000::/33
|
||||
- 240b:4004::/32
|
||||
- 240b:4004::/33
|
||||
- 240b:4004:8000::/33
|
||||
- 240b:4005::/32
|
||||
- 240b:4005::/33
|
||||
- 240b:4005:8000::/33
|
||||
- 240b:4006::/48
|
||||
- 240b:4006:1000::/44
|
||||
- 240b:4006:1000::/45
|
||||
- 240b:4006:1000::/47
|
||||
- 240b:4006:1002::/47
|
||||
- 240b:4006:1008::/45
|
||||
- 240b:4006:1010::/44
|
||||
- 240b:4006:1010::/45
|
||||
- 240b:4006:1018::/45
|
||||
- 240b:4006:1020::/44
|
||||
- 240b:4006:1020::/45
|
||||
- 240b:4006:1028::/45
|
||||
- 240b:4007::/32
|
||||
- 240b:4007::/33
|
||||
- 240b:4007:8000::/33
|
||||
- 240b:4009::/32
|
||||
- 240b:4009::/33
|
||||
- 240b:4009:8000::/33
|
||||
- 240b:400b::/32
|
||||
- 240b:400b::/33
|
||||
- 240b:400b:8000::/33
|
||||
- 240b:400c::/32
|
||||
- 240b:400c::/33
|
||||
- 240b:400c::/40
|
||||
- 240b:400c::/41
|
||||
- 240b:400c:100::/40
|
||||
- 240b:400c:100::/41
|
||||
- 240b:400c:180::/41
|
||||
- 240b:400c:80::/41
|
||||
- 240b:400c:8000::/33
|
||||
- 240b:400c:f00::/48
|
||||
- 240b:400c:f01::/48
|
||||
- 240b:400c:ffff::/48
|
||||
- 240b:400d::/32
|
||||
- 240b:400d::/33
|
||||
- 240b:400d:8000::/33
|
||||
- 240b:400e::/32
|
||||
- 240b:400e::/33
|
||||
- 240b:400e:8000::/33
|
||||
- 240b:400f::/32
|
||||
- 240b:400f::/33
|
||||
- 240b:400f:8000::/33
|
||||
- 240b:4011::/32
|
||||
- 240b:4011::/33
|
||||
- 240b:4011:8000::/33
|
||||
- 240b:4012::/48
|
||||
- 240b:4013::/32
|
||||
- 240b:4013::/33
|
||||
- 240b:4013:8000::/33
|
||||
- 240b:4014::/32
|
||||
- 240b:4014::/33
|
||||
- 240b:4014:8000::/33
|
||||
- 43.100.0.0/15
|
||||
- 43.100.0.0/16
|
||||
- 43.101.0.0/16
|
||||
- 43.102.0.0/20
|
||||
- 43.102.112.0/20
|
||||
- 43.102.16.0/20
|
||||
- 43.102.32.0/20
|
||||
- 43.102.48.0/20
|
||||
- 43.102.64.0/20
|
||||
- 43.102.80.0/20
|
||||
- 43.102.96.0/20
|
||||
- 43.103.0.0/17
|
||||
- 43.103.0.0/18
|
||||
- 43.103.64.0/18
|
||||
- 43.104.0.0/15
|
||||
- 43.104.0.0/16
|
||||
- 43.105.0.0/16
|
||||
- 43.108.0.0/17
|
||||
- 43.108.0.0/18
|
||||
- 43.108.64.0/18
|
||||
- 43.91.0.0/16
|
||||
- 43.91.0.0/17
|
||||
- 43.91.128.0/17
|
||||
- 43.96.10.0/24
|
||||
- 43.96.100.0/24
|
||||
- 43.96.101.0/24
|
||||
- 43.96.102.0/24
|
||||
- 43.96.104.0/24
|
||||
- 43.96.11.0/24
|
||||
- 43.96.20.0/24
|
||||
- 43.96.21.0/24
|
||||
- 43.96.23.0/24
|
||||
- 43.96.24.0/24
|
||||
- 43.96.25.0/24
|
||||
- 43.96.3.0/24
|
||||
- 43.96.32.0/24
|
||||
- 43.96.33.0/24
|
||||
- 43.96.34.0/24
|
||||
- 43.96.35.0/24
|
||||
- 43.96.4.0/24
|
||||
- 43.96.40.0/24
|
||||
- 43.96.5.0/24
|
||||
- 43.96.52.0/24
|
||||
- 43.96.6.0/24
|
||||
- 43.96.66.0/24
|
||||
- 43.96.67.0/24
|
||||
- 43.96.68.0/24
|
||||
- 43.96.69.0/24
|
||||
- 43.96.7.0/24
|
||||
- 43.96.70.0/24
|
||||
- 43.96.71.0/24
|
||||
- 43.96.72.0/24
|
||||
- 43.96.73.0/24
|
||||
- 43.96.74.0/24
|
||||
- 43.96.75.0/24
|
||||
- 43.96.8.0/24
|
||||
- 43.96.80.0/24
|
||||
- 43.96.81.0/24
|
||||
- 43.96.84.0/24
|
||||
- 43.96.85.0/24
|
||||
- 43.96.86.0/24
|
||||
- 43.96.88.0/24
|
||||
- 43.96.9.0/24
|
||||
- 43.96.96.0/24
|
||||
- 43.98.0.0/16
|
||||
- 43.98.0.0/17
|
||||
- 43.98.128.0/17
|
||||
- 43.99.0.0/16
|
||||
- 43.99.0.0/17
|
||||
- 43.99.128.0/17
|
||||
- 45.199.179.0/24
|
||||
- 47.235.0.0/22
|
||||
- 47.235.0.0/23
|
||||
- 47.235.1.0/24
|
||||
- 47.235.10.0/23
|
||||
- 47.235.10.0/24
|
||||
- 47.235.11.0/24
|
||||
- 47.235.12.0/23
|
||||
- 47.235.12.0/24
|
||||
- 47.235.13.0/24
|
||||
- 47.235.16.0/23
|
||||
- 47.235.16.0/24
|
||||
- 47.235.18.0/23
|
||||
- 47.235.18.0/24
|
||||
- 47.235.19.0/24
|
||||
- 47.235.2.0/23
|
||||
- 47.235.20.0/24
|
||||
- 47.235.21.0/24
|
||||
- 47.235.22.0/24
|
||||
- 47.235.23.0/24
|
||||
- 47.235.24.0/22
|
||||
- 47.235.24.0/23
|
||||
- 47.235.26.0/23
|
||||
- 47.235.28.0/23
|
||||
- 47.235.28.0/24
|
||||
- 47.235.29.0/24
|
||||
- 47.235.30.0/24
|
||||
- 47.235.31.0/24
|
||||
- 47.235.4.0/24
|
||||
- 47.235.5.0/24
|
||||
- 47.235.6.0/23
|
||||
- 47.235.6.0/24
|
||||
- 47.235.7.0/24
|
||||
- 47.235.8.0/24
|
||||
- 47.235.9.0/24
|
||||
- 47.236.0.0/15
|
||||
- 47.236.0.0/16
|
||||
- 47.237.0.0/16
|
||||
- 47.237.32.0/20
|
||||
- 47.237.34.0/24
|
||||
- 47.238.0.0/15
|
||||
- 47.238.0.0/16
|
||||
- 47.239.0.0/16
|
||||
- 47.240.0.0/16
|
||||
- 47.240.0.0/17
|
||||
- 47.240.128.0/17
|
||||
- 47.241.0.0/16
|
||||
- 47.241.0.0/17
|
||||
- 47.241.128.0/17
|
||||
- 47.242.0.0/15
|
||||
- 47.242.0.0/16
|
||||
- 47.243.0.0/16
|
||||
- 47.244.0.0/16
|
||||
- 47.244.0.0/17
|
||||
- 47.244.128.0/17
|
||||
- 47.244.73.0/24
|
||||
- 47.245.0.0/18
|
||||
- 47.245.0.0/19
|
||||
- 47.245.128.0/17
|
||||
- 47.245.128.0/18
|
||||
- 47.245.192.0/18
|
||||
- 47.245.32.0/19
|
||||
- 47.245.64.0/18
|
||||
- 47.245.64.0/19
|
||||
- 47.245.96.0/19
|
||||
- 47.246.100.0/22
|
||||
- 47.246.104.0/21
|
||||
- 47.246.104.0/22
|
||||
- 47.246.108.0/22
|
||||
- 47.246.120.0/24
|
||||
- 47.246.122.0/24
|
||||
- 47.246.123.0/24
|
||||
- 47.246.124.0/24
|
||||
- 47.246.125.0/24
|
||||
- 47.246.128.0/22
|
||||
- 47.246.128.0/23
|
||||
- 47.246.130.0/23
|
||||
- 47.246.132.0/22
|
||||
- 47.246.132.0/23
|
||||
- 47.246.134.0/23
|
||||
- 47.246.136.0/21
|
||||
- 47.246.136.0/22
|
||||
- 47.246.140.0/22
|
||||
- 47.246.144.0/23
|
||||
- 47.246.144.0/24
|
||||
- 47.246.145.0/24
|
||||
- 47.246.146.0/23
|
||||
- 47.246.146.0/24
|
||||
- 47.246.147.0/24
|
||||
- 47.246.150.0/23
|
||||
- 47.246.150.0/24
|
||||
- 47.246.151.0/24
|
||||
- 47.246.152.0/23
|
||||
- 47.246.152.0/24
|
||||
- 47.246.153.0/24
|
||||
- 47.246.154.0/24
|
||||
- 47.246.155.0/24
|
||||
- 47.246.156.0/22
|
||||
- 47.246.156.0/23
|
||||
- 47.246.158.0/23
|
||||
- 47.246.160.0/20
|
||||
- 47.246.160.0/21
|
||||
- 47.246.168.0/21
|
||||
- 47.246.176.0/20
|
||||
- 47.246.176.0/21
|
||||
- 47.246.184.0/21
|
||||
- 47.246.192.0/22
|
||||
- 47.246.192.0/23
|
||||
- 47.246.194.0/23
|
||||
- 47.246.196.0/22
|
||||
- 47.246.196.0/23
|
||||
- 47.246.198.0/23
|
||||
- 47.246.32.0/22
|
||||
- 47.246.66.0/24
|
||||
- 47.246.67.0/24
|
||||
- 47.246.68.0/23
|
||||
- 47.246.68.0/24
|
||||
- 47.246.69.0/24
|
||||
- 47.246.72.0/21
|
||||
- 47.246.72.0/22
|
||||
- 47.246.76.0/22
|
||||
- 47.246.80.0/24
|
||||
- 47.246.82.0/23
|
||||
- 47.246.82.0/24
|
||||
- 47.246.83.0/24
|
||||
- 47.246.84.0/22
|
||||
- 47.246.84.0/23
|
||||
- 47.246.86.0/23
|
||||
- 47.246.88.0/22
|
||||
- 47.246.88.0/23
|
||||
- 47.246.90.0/23
|
||||
- 47.246.92.0/23
|
||||
- 47.246.92.0/24
|
||||
- 47.246.93.0/24
|
||||
- 47.246.96.0/21
|
||||
- 47.246.96.0/22
|
||||
- 47.250.0.0/17
|
||||
- 47.250.0.0/18
|
||||
- 47.250.128.0/17
|
||||
- 47.250.128.0/18
|
||||
- 47.250.192.0/18
|
||||
- 47.250.64.0/18
|
||||
- 47.250.99.0/24
|
||||
- 47.251.0.0/16
|
||||
- 47.251.0.0/17
|
||||
- 47.251.128.0/17
|
||||
- 47.251.224.0/22
|
||||
- 47.252.0.0/17
|
||||
- 47.252.0.0/18
|
||||
- 47.252.128.0/17
|
||||
- 47.252.128.0/18
|
||||
- 47.252.192.0/18
|
||||
- 47.252.64.0/18
|
||||
- 47.252.67.0/24
|
||||
- 47.253.0.0/16
|
||||
- 47.253.0.0/17
|
||||
- 47.253.128.0/17
|
||||
- 47.254.0.0/17
|
||||
- 47.254.0.0/18
|
||||
- 47.254.113.0/24
|
||||
- 47.254.128.0/18
|
||||
- 47.254.128.0/19
|
||||
- 47.254.160.0/19
|
||||
- 47.254.192.0/18
|
||||
- 47.254.192.0/19
|
||||
- 47.254.224.0/19
|
||||
- 47.254.64.0/18
|
||||
- 47.52.0.0/16
|
||||
- 47.52.0.0/17
|
||||
- 47.52.128.0/17
|
||||
- 47.56.0.0/15
|
||||
- 47.56.0.0/16
|
||||
- 47.57.0.0/16
|
||||
- 47.74.0.0/18
|
||||
- 47.74.0.0/19
|
||||
- 47.74.0.0/21
|
||||
- 47.74.128.0/17
|
||||
- 47.74.128.0/18
|
||||
- 47.74.192.0/18
|
||||
- 47.74.32.0/19
|
||||
- 47.74.64.0/18
|
||||
- 47.74.64.0/19
|
||||
- 47.74.96.0/19
|
||||
- 47.75.0.0/16
|
||||
- 47.75.0.0/17
|
||||
- 47.75.128.0/17
|
||||
- 47.76.0.0/16
|
||||
- 47.76.0.0/17
|
||||
- 47.76.128.0/17
|
||||
- 47.77.0.0/22
|
||||
- 47.77.0.0/23
|
||||
- 47.77.104.0/21
|
||||
- 47.77.12.0/22
|
||||
- 47.77.128.0/17
|
||||
- 47.77.128.0/18
|
||||
- 47.77.128.0/21
|
||||
- 47.77.136.0/21
|
||||
- 47.77.144.0/21
|
||||
- 47.77.152.0/21
|
||||
- 47.77.16.0/21
|
||||
- 47.77.16.0/22
|
||||
- 47.77.192.0/18
|
||||
- 47.77.2.0/23
|
||||
- 47.77.20.0/22
|
||||
- 47.77.24.0/22
|
||||
- 47.77.24.0/23
|
||||
- 47.77.26.0/23
|
||||
- 47.77.32.0/19
|
||||
- 47.77.32.0/20
|
||||
- 47.77.4.0/22
|
||||
- 47.77.4.0/23
|
||||
- 47.77.48.0/20
|
||||
- 47.77.6.0/23
|
||||
- 47.77.64.0/19
|
||||
- 47.77.64.0/20
|
||||
- 47.77.8.0/21
|
||||
- 47.77.8.0/22
|
||||
- 47.77.80.0/20
|
||||
- 47.77.96.0/20
|
||||
- 47.77.96.0/21
|
||||
- 47.78.0.0/17
|
||||
- 47.78.128.0/17
|
||||
- 47.79.0.0/20
|
||||
- 47.79.0.0/21
|
||||
- 47.79.104.0/21
|
||||
- 47.79.112.0/20
|
||||
- 47.79.128.0/19
|
||||
- 47.79.128.0/20
|
||||
- 47.79.144.0/20
|
||||
- 47.79.16.0/20
|
||||
- 47.79.16.0/21
|
||||
- 47.79.192.0/18
|
||||
- 47.79.192.0/19
|
||||
- 47.79.224.0/19
|
||||
- 47.79.24.0/21
|
||||
- 47.79.32.0/20
|
||||
- 47.79.32.0/21
|
||||
- 47.79.40.0/21
|
||||
- 47.79.48.0/20
|
||||
- 47.79.48.0/21
|
||||
- 47.79.52.0/23
|
||||
- 47.79.54.0/23
|
||||
- 47.79.56.0/21
|
||||
- 47.79.56.0/23
|
||||
- 47.79.58.0/23
|
||||
- 47.79.60.0/23
|
||||
- 47.79.62.0/23
|
||||
- 47.79.64.0/20
|
||||
- 47.79.64.0/21
|
||||
- 47.79.72.0/21
|
||||
- 47.79.8.0/21
|
||||
- 47.79.80.0/20
|
||||
- 47.79.80.0/21
|
||||
- 47.79.83.0/24
|
||||
- 47.79.88.0/21
|
||||
- 47.79.96.0/19
|
||||
- 47.79.96.0/20
|
||||
- 47.80.0.0/18
|
||||
- 47.80.0.0/19
|
||||
- 47.80.128.0/17
|
||||
- 47.80.128.0/18
|
||||
- 47.80.192.0/18
|
||||
- 47.80.32.0/19
|
||||
- 47.80.64.0/18
|
||||
- 47.80.64.0/19
|
||||
- 47.80.96.0/19
|
||||
- 47.81.0.0/18
|
||||
- 47.81.0.0/19
|
||||
- 47.81.128.0/17
|
||||
- 47.81.128.0/18
|
||||
- 47.81.192.0/18
|
||||
- 47.81.32.0/19
|
||||
- 47.81.64.0/18
|
||||
- 47.81.64.0/19
|
||||
- 47.81.96.0/19
|
||||
- 47.82.0.0/18
|
||||
- 47.82.0.0/19
|
||||
- 47.82.10.0/23
|
||||
- 47.82.12.0/23
|
||||
- 47.82.128.0/17
|
||||
- 47.82.128.0/18
|
||||
- 47.82.14.0/23
|
||||
- 47.82.192.0/18
|
||||
- 47.82.32.0/19
|
||||
- 47.82.32.0/21
|
||||
- 47.82.40.0/21
|
||||
- 47.82.48.0/21
|
||||
- 47.82.56.0/21
|
||||
- 47.82.64.0/18
|
||||
- 47.82.64.0/19
|
||||
- 47.82.8.0/23
|
||||
- 47.82.96.0/19
|
||||
- 47.83.0.0/16
|
||||
- 47.83.0.0/17
|
||||
- 47.83.128.0/17
|
||||
- 47.83.32.0/21
|
||||
- 47.83.40.0/21
|
||||
- 47.83.48.0/21
|
||||
- 47.83.56.0/21
|
||||
- 47.84.0.0/16
|
||||
- 47.84.0.0/17
|
||||
- 47.84.128.0/17
|
||||
- 47.84.144.0/21
|
||||
- 47.84.152.0/21
|
||||
- 47.84.160.0/21
|
||||
- 47.84.168.0/21
|
||||
- 47.85.0.0/16
|
||||
- 47.85.0.0/17
|
||||
- 47.85.112.0/22
|
||||
- 47.85.112.0/23
|
||||
- 47.85.114.0/23
|
||||
- 47.85.128.0/17
|
||||
- 47.86.0.0/16
|
||||
- 47.86.0.0/17
|
||||
- 47.86.128.0/17
|
||||
- 47.87.0.0/18
|
||||
- 47.87.0.0/19
|
||||
- 47.87.128.0/18
|
||||
- 47.87.128.0/19
|
||||
- 47.87.160.0/19
|
||||
- 47.87.192.0/22
|
||||
- 47.87.192.0/23
|
||||
- 47.87.194.0/23
|
||||
- 47.87.196.0/22
|
||||
- 47.87.196.0/23
|
||||
- 47.87.198.0/23
|
||||
- 47.87.200.0/22
|
||||
- 47.87.200.0/23
|
||||
- 47.87.202.0/23
|
||||
- 47.87.204.0/22
|
||||
- 47.87.204.0/23
|
||||
- 47.87.206.0/23
|
||||
- 47.87.208.0/22
|
||||
- 47.87.208.0/23
|
||||
- 47.87.210.0/23
|
||||
- 47.87.212.0/22
|
||||
- 47.87.212.0/23
|
||||
- 47.87.214.0/23
|
||||
- 47.87.216.0/22
|
||||
- 47.87.216.0/23
|
||||
- 47.87.218.0/23
|
||||
- 47.87.220.0/22
|
||||
- 47.87.220.0/23
|
||||
- 47.87.222.0/23
|
||||
- 47.87.224.0/22
|
||||
- 47.87.224.0/23
|
||||
- 47.87.226.0/23
|
||||
- 47.87.228.0/22
|
||||
- 47.87.228.0/23
|
||||
- 47.87.230.0/23
|
||||
- 47.87.232.0/22
|
||||
- 47.87.232.0/23
|
||||
- 47.87.234.0/23
|
||||
- 47.87.236.0/22
|
||||
- 47.87.236.0/23
|
||||
- 47.87.238.0/23
|
||||
- 47.87.240.0/22
|
||||
- 47.87.240.0/23
|
||||
- 47.87.242.0/23
|
||||
- 47.87.32.0/19
|
||||
- 47.87.64.0/18
|
||||
- 47.87.64.0/19
|
||||
- 47.87.96.0/19
|
||||
- 47.88.0.0/17
|
||||
- 47.88.0.0/18
|
||||
- 47.88.109.0/24
|
||||
- 47.88.128.0/17
|
||||
- 47.88.128.0/18
|
||||
- 47.88.135.0/24
|
||||
- 47.88.192.0/18
|
||||
- 47.88.41.0/24
|
||||
- 47.88.42.0/24
|
||||
- 47.88.43.0/24
|
||||
- 47.88.64.0/18
|
||||
- 47.89.0.0/18
|
||||
- 47.89.0.0/19
|
||||
- 47.89.100.0/24
|
||||
- 47.89.101.0/24
|
||||
- 47.89.102.0/24
|
||||
- 47.89.103.0/24
|
||||
- 47.89.104.0/21
|
||||
- 47.89.104.0/22
|
||||
- 47.89.108.0/22
|
||||
- 47.89.122.0/24
|
||||
- 47.89.123.0/24
|
||||
- 47.89.124.0/23
|
||||
- 47.89.124.0/24
|
||||
- 47.89.125.0/24
|
||||
- 47.89.128.0/18
|
||||
- 47.89.128.0/19
|
||||
- 47.89.160.0/19
|
||||
- 47.89.192.0/18
|
||||
- 47.89.192.0/19
|
||||
- 47.89.221.0/24
|
||||
- 47.89.224.0/19
|
||||
- 47.89.32.0/19
|
||||
- 47.89.72.0/22
|
||||
- 47.89.72.0/23
|
||||
- 47.89.74.0/23
|
||||
- 47.89.76.0/22
|
||||
- 47.89.76.0/23
|
||||
- 47.89.78.0/23
|
||||
- 47.89.80.0/23
|
||||
- 47.89.82.0/23
|
||||
- 47.89.84.0/24
|
||||
- 47.89.88.0/22
|
||||
- 47.89.88.0/23
|
||||
- 47.89.90.0/23
|
||||
- 47.89.92.0/22
|
||||
- 47.89.92.0/23
|
||||
- 47.89.94.0/23
|
||||
- 47.89.96.0/24
|
||||
- 47.89.97.0/24
|
||||
- 47.89.98.0/23
|
||||
- 47.89.99.0/24
|
||||
- 47.90.0.0/17
|
||||
- 47.90.0.0/18
|
||||
- 47.90.128.0/17
|
||||
- 47.90.128.0/18
|
||||
- 47.90.172.0/24
|
||||
- 47.90.173.0/24
|
||||
- 47.90.174.0/24
|
||||
- 47.90.175.0/24
|
||||
- 47.90.192.0/18
|
||||
- 47.90.64.0/18
|
||||
- 47.91.0.0/19
|
||||
- 47.91.0.0/20
|
||||
- 47.91.112.0/20
|
||||
- 47.91.128.0/17
|
||||
- 47.91.128.0/18
|
||||
- 47.91.16.0/20
|
||||
- 47.91.192.0/18
|
||||
- 47.91.32.0/19
|
||||
- 47.91.32.0/20
|
||||
- 47.91.48.0/20
|
||||
- 47.91.64.0/19
|
||||
- 47.91.64.0/20
|
||||
- 47.91.80.0/20
|
||||
- 47.91.96.0/19
|
||||
- 47.91.96.0/20
|
||||
- 5.181.224.0/23
|
||||
- 59.82.136.0/23
|
||||
- 8.208.0.0/16
|
||||
- 8.208.0.0/17
|
||||
- 8.208.0.0/18
|
||||
- 8.208.0.0/19
|
||||
- 8.208.128.0/17
|
||||
- 8.208.141.0/24
|
||||
- 8.208.32.0/19
|
||||
- 8.209.0.0/19
|
||||
- 8.209.0.0/20
|
||||
- 8.209.128.0/18
|
||||
- 8.209.128.0/19
|
||||
- 8.209.16.0/20
|
||||
- 8.209.160.0/19
|
||||
- 8.209.192.0/18
|
||||
- 8.209.192.0/19
|
||||
- 8.209.224.0/19
|
||||
- 8.209.36.0/23
|
||||
- 8.209.36.0/24
|
||||
- 8.209.37.0/24
|
||||
- 8.209.38.0/23
|
||||
- 8.209.38.0/24
|
||||
- 8.209.39.0/24
|
||||
- 8.209.40.0/22
|
||||
- 8.209.40.0/23
|
||||
- 8.209.42.0/23
|
||||
- 8.209.44.0/22
|
||||
- 8.209.44.0/23
|
||||
- 8.209.46.0/23
|
||||
- 8.209.48.0/20
|
||||
- 8.209.48.0/21
|
||||
- 8.209.56.0/21
|
||||
- 8.209.64.0/18
|
||||
- 8.209.64.0/19
|
||||
- 8.209.96.0/19
|
||||
- 8.210.0.0/16
|
||||
- 8.210.0.0/17
|
||||
- 8.210.128.0/17
|
||||
- 8.210.240.0/24
|
||||
- 8.211.0.0/17
|
||||
- 8.211.0.0/18
|
||||
- 8.211.104.0/21
|
||||
- 8.211.128.0/18
|
||||
- 8.211.128.0/19
|
||||
- 8.211.160.0/19
|
||||
- 8.211.192.0/18
|
||||
- 8.211.192.0/19
|
||||
- 8.211.224.0/19
|
||||
- 8.211.226.0/24
|
||||
- 8.211.64.0/18
|
||||
- 8.211.80.0/21
|
||||
- 8.211.88.0/21
|
||||
- 8.211.96.0/21
|
||||
- 8.212.0.0/17
|
||||
- 8.212.0.0/18
|
||||
- 8.212.128.0/18
|
||||
- 8.212.128.0/19
|
||||
- 8.212.160.0/19
|
||||
- 8.212.192.0/18
|
||||
- 8.212.192.0/19
|
||||
- 8.212.224.0/19
|
||||
- 8.212.64.0/18
|
||||
- 8.213.0.0/17
|
||||
- 8.213.0.0/18
|
||||
- 8.213.128.0/19
|
||||
- 8.213.128.0/20
|
||||
- 8.213.144.0/20
|
||||
- 8.213.160.0/21
|
||||
- 8.213.160.0/22
|
||||
- 8.213.164.0/22
|
||||
- 8.213.176.0/20
|
||||
- 8.213.176.0/21
|
||||
- 8.213.184.0/21
|
||||
- 8.213.192.0/18
|
||||
- 8.213.192.0/19
|
||||
- 8.213.224.0/19
|
||||
- 8.213.251.0/24
|
||||
- 8.213.252.0/24
|
||||
- 8.213.253.0/24
|
||||
- 8.213.64.0/18
|
||||
- 8.214.0.0/16
|
||||
- 8.214.0.0/17
|
||||
- 8.214.128.0/17
|
||||
- 8.215.0.0/16
|
||||
- 8.215.0.0/17
|
||||
- 8.215.128.0/17
|
||||
- 8.215.160.0/24
|
||||
- 8.215.162.0/23
|
||||
- 8.215.168.0/24
|
||||
- 8.215.169.0/24
|
||||
- 8.216.0.0/17
|
||||
- 8.216.0.0/18
|
||||
- 8.216.128.0/17
|
||||
- 8.216.128.0/18
|
||||
- 8.216.148.0/24
|
||||
- 8.216.192.0/18
|
||||
- 8.216.64.0/18
|
||||
- 8.216.69.0/24
|
||||
- 8.216.74.0/24
|
||||
- 8.217.0.0/16
|
||||
- 8.217.0.0/17
|
||||
- 8.217.128.0/17
|
||||
- 8.218.0.0/16
|
||||
- 8.218.0.0/17
|
||||
- 8.218.128.0/17
|
||||
- 8.219.0.0/16
|
||||
- 8.219.0.0/17
|
||||
- 8.219.128.0/17
|
||||
- 8.219.40.0/21
|
||||
- 8.220.116.0/24
|
||||
- 8.220.128.0/18
|
||||
- 8.220.128.0/19
|
||||
- 8.220.147.0/24
|
||||
- 8.220.160.0/19
|
||||
- 8.220.192.0/18
|
||||
- 8.220.192.0/19
|
||||
- 8.220.224.0/19
|
||||
- 8.220.229.0/24
|
||||
- 8.220.64.0/18
|
||||
- 8.220.64.0/19
|
||||
- 8.220.96.0/19
|
||||
- 8.221.0.0/17
|
||||
- 8.221.0.0/18
|
||||
- 8.221.0.0/21
|
||||
- 8.221.128.0/17
|
||||
- 8.221.128.0/18
|
||||
- 8.221.184.0/22
|
||||
- 8.221.188.0/22
|
||||
- 8.221.192.0/18
|
||||
- 8.221.192.0/21
|
||||
- 8.221.200.0/21
|
||||
- 8.221.208.0/21
|
||||
- 8.221.216.0/21
|
||||
- 8.221.48.0/21
|
||||
- 8.221.56.0/21
|
||||
- 8.221.64.0/18
|
||||
- 8.221.8.0/21
|
||||
- 8.222.0.0/20
|
||||
- 8.222.0.0/21
|
||||
- 8.222.112.0/20
|
||||
- 8.222.128.0/17
|
||||
- 8.222.128.0/18
|
||||
- 8.222.16.0/20
|
||||
- 8.222.16.0/21
|
||||
- 8.222.192.0/18
|
||||
- 8.222.24.0/21
|
||||
- 8.222.32.0/20
|
||||
- 8.222.32.0/21
|
||||
- 8.222.40.0/21
|
||||
- 8.222.48.0/20
|
||||
- 8.222.48.0/21
|
||||
- 8.222.56.0/21
|
||||
- 8.222.64.0/20
|
||||
- 8.222.64.0/21
|
||||
- 8.222.72.0/21
|
||||
- 8.222.8.0/21
|
||||
- 8.222.80.0/20
|
||||
- 8.222.80.0/21
|
||||
- 8.222.88.0/21
|
||||
- 8.222.96.0/19
|
||||
- 8.222.96.0/20
|
||||
- 8.223.0.0/17
|
||||
- 8.223.0.0/18
|
||||
- 8.223.128.0/17
|
||||
- 8.223.128.0/18
|
||||
- 8.223.192.0/18
|
||||
- 8.223.64.0/18
|
||||
617
data/crawlers/huawei-cloud.yaml
Normal file
617
data/crawlers/huawei-cloud.yaml
Normal file
@@ -0,0 +1,617 @@
|
||||
- name: huawei-cloud
|
||||
action: DENY
|
||||
# Updated 2025-08-20 from IP addresses for AS136907
|
||||
remote_addresses:
|
||||
- 1.178.32.0/20
|
||||
- 1.178.48.0/20
|
||||
- 101.44.0.0/20
|
||||
- 101.44.144.0/20
|
||||
- 101.44.16.0/20
|
||||
- 101.44.160.0/20
|
||||
- 101.44.173.0/24
|
||||
- 101.44.176.0/20
|
||||
- 101.44.192.0/20
|
||||
- 101.44.208.0/22
|
||||
- 101.44.212.0/22
|
||||
- 101.44.216.0/22
|
||||
- 101.44.220.0/22
|
||||
- 101.44.224.0/22
|
||||
- 101.44.228.0/22
|
||||
- 101.44.232.0/22
|
||||
- 101.44.236.0/22
|
||||
- 101.44.240.0/22
|
||||
- 101.44.244.0/22
|
||||
- 101.44.248.0/22
|
||||
- 101.44.252.0/24
|
||||
- 101.44.253.0/24
|
||||
- 101.44.254.0/24
|
||||
- 101.44.255.0/24
|
||||
- 101.44.32.0/20
|
||||
- 101.44.48.0/20
|
||||
- 101.44.64.0/20
|
||||
- 101.44.80.0/20
|
||||
- 101.44.96.0/20
|
||||
- 101.46.0.0/20
|
||||
- 101.46.128.0/21
|
||||
- 101.46.136.0/21
|
||||
- 101.46.144.0/21
|
||||
- 101.46.152.0/21
|
||||
- 101.46.160.0/21
|
||||
- 101.46.168.0/21
|
||||
- 101.46.176.0/21
|
||||
- 101.46.184.0/21
|
||||
- 101.46.192.0/21
|
||||
- 101.46.200.0/21
|
||||
- 101.46.208.0/21
|
||||
- 101.46.216.0/21
|
||||
- 101.46.224.0/22
|
||||
- 101.46.232.0/22
|
||||
- 101.46.236.0/22
|
||||
- 101.46.240.0/22
|
||||
- 101.46.244.0/22
|
||||
- 101.46.248.0/22
|
||||
- 101.46.252.0/24
|
||||
- 101.46.253.0/24
|
||||
- 101.46.254.0/24
|
||||
- 101.46.255.0/24
|
||||
- 101.46.32.0/20
|
||||
- 101.46.48.0/20
|
||||
- 101.46.64.0/20
|
||||
- 101.46.80.0/20
|
||||
- 103.198.203.0/24
|
||||
- 103.215.0.0/24
|
||||
- 103.215.1.0/24
|
||||
- 103.215.3.0/24
|
||||
- 103.240.156.0/22
|
||||
- 103.240.157.0/24
|
||||
- 103.255.60.0/22
|
||||
- 103.255.60.0/24
|
||||
- 103.255.61.0/24
|
||||
- 103.255.62.0/24
|
||||
- 103.255.63.0/24
|
||||
- 103.40.100.0/23
|
||||
- 103.84.110.0/24
|
||||
- 110.238.100.0/22
|
||||
- 110.238.104.0/21
|
||||
- 110.238.112.0/21
|
||||
- 110.238.120.0/22
|
||||
- 110.238.124.0/22
|
||||
- 110.238.64.0/21
|
||||
- 110.238.72.0/21
|
||||
- 110.238.80.0/20
|
||||
- 110.238.96.0/24
|
||||
- 110.238.98.0/24
|
||||
- 110.238.99.0/24
|
||||
- 110.239.127.0/24
|
||||
- 110.239.184.0/22
|
||||
- 110.239.188.0/23
|
||||
- 110.239.190.0/23
|
||||
- 110.239.64.0/19
|
||||
- 110.239.96.0/19
|
||||
- 110.41.208.0/24
|
||||
- 110.41.209.0/24
|
||||
- 110.41.210.0/24
|
||||
- 111.119.192.0/20
|
||||
- 111.119.208.0/20
|
||||
- 111.119.224.0/20
|
||||
- 111.119.240.0/20
|
||||
- 111.91.0.0/20
|
||||
- 111.91.112.0/20
|
||||
- 111.91.16.0/20
|
||||
- 111.91.32.0/20
|
||||
- 111.91.48.0/20
|
||||
- 111.91.64.0/20
|
||||
- 111.91.80.0/20
|
||||
- 111.91.96.0/20
|
||||
- 114.119.128.0/19
|
||||
- 114.119.160.0/21
|
||||
- 114.119.168.0/24
|
||||
- 114.119.169.0/24
|
||||
- 114.119.170.0/24
|
||||
- 114.119.171.0/24
|
||||
- 114.119.172.0/22
|
||||
- 114.119.176.0/20
|
||||
- 115.30.32.0/20
|
||||
- 115.30.48.0/20
|
||||
- 119.12.160.0/20
|
||||
- 119.13.112.0/20
|
||||
- 119.13.160.0/24
|
||||
- 119.13.161.0/24
|
||||
- 119.13.162.0/23
|
||||
- 119.13.163.0/24
|
||||
- 119.13.164.0/22
|
||||
- 119.13.168.0/21
|
||||
- 119.13.168.0/24
|
||||
- 119.13.169.0/24
|
||||
- 119.13.170.0/24
|
||||
- 119.13.172.0/24
|
||||
- 119.13.173.0/24
|
||||
- 119.13.32.0/22
|
||||
- 119.13.36.0/22
|
||||
- 119.13.64.0/24
|
||||
- 119.13.65.0/24
|
||||
- 119.13.66.0/23
|
||||
- 119.13.68.0/22
|
||||
- 119.13.72.0/22
|
||||
- 119.13.76.0/22
|
||||
- 119.13.80.0/21
|
||||
- 119.13.88.0/22
|
||||
- 119.13.92.0/22
|
||||
- 119.13.96.0/20
|
||||
- 119.8.0.0/21
|
||||
- 119.8.128.0/24
|
||||
- 119.8.129.0/24
|
||||
- 119.8.130.0/23
|
||||
- 119.8.132.0/22
|
||||
- 119.8.136.0/21
|
||||
- 119.8.144.0/20
|
||||
- 119.8.160.0/19
|
||||
- 119.8.18.0/24
|
||||
- 119.8.192.0/20
|
||||
- 119.8.192.0/21
|
||||
- 119.8.200.0/21
|
||||
- 119.8.208.0/20
|
||||
- 119.8.21.0/24
|
||||
- 119.8.22.0/24
|
||||
- 119.8.224.0/24
|
||||
- 119.8.227.0/24
|
||||
- 119.8.228.0/22
|
||||
- 119.8.23.0/24
|
||||
- 119.8.232.0/21
|
||||
- 119.8.24.0/21
|
||||
- 119.8.240.0/23
|
||||
- 119.8.242.0/23
|
||||
- 119.8.244.0/24
|
||||
- 119.8.245.0/24
|
||||
- 119.8.246.0/24
|
||||
- 119.8.247.0/24
|
||||
- 119.8.248.0/24
|
||||
- 119.8.249.0/24
|
||||
- 119.8.250.0/24
|
||||
- 119.8.253.0/24
|
||||
- 119.8.254.0/23
|
||||
- 119.8.32.0/19
|
||||
- 119.8.4.0/24
|
||||
- 119.8.64.0/22
|
||||
- 119.8.68.0/24
|
||||
- 119.8.69.0/24
|
||||
- 119.8.70.0/24
|
||||
- 119.8.71.0/24
|
||||
- 119.8.72.0/21
|
||||
- 119.8.8.0/21
|
||||
- 119.8.80.0/20
|
||||
- 119.8.96.0/19
|
||||
- 121.91.152.0/21
|
||||
- 121.91.168.0/21
|
||||
- 121.91.200.0/21
|
||||
- 121.91.200.0/24
|
||||
- 121.91.201.0/24
|
||||
- 121.91.204.0/24
|
||||
- 121.91.205.0/24
|
||||
- 122.8.128.0/20
|
||||
- 122.8.144.0/20
|
||||
- 122.8.160.0/20
|
||||
- 122.8.176.0/21
|
||||
- 122.8.184.0/22
|
||||
- 122.8.188.0/22
|
||||
- 124.243.128.0/18
|
||||
- 124.243.156.0/24
|
||||
- 124.243.157.0/24
|
||||
- 124.243.158.0/24
|
||||
- 124.243.159.0/24
|
||||
- 124.71.248.0/24
|
||||
- 124.71.249.0/24
|
||||
- 124.71.250.0/24
|
||||
- 124.71.252.0/24
|
||||
- 124.71.253.0/24
|
||||
- 124.81.0.0/20
|
||||
- 124.81.112.0/20
|
||||
- 124.81.128.0/20
|
||||
- 124.81.144.0/20
|
||||
- 124.81.16.0/20
|
||||
- 124.81.160.0/20
|
||||
- 124.81.176.0/20
|
||||
- 124.81.192.0/20
|
||||
- 124.81.208.0/20
|
||||
- 124.81.224.0/20
|
||||
- 124.81.240.0/20
|
||||
- 124.81.32.0/20
|
||||
- 124.81.48.0/20
|
||||
- 124.81.64.0/20
|
||||
- 124.81.80.0/20
|
||||
- 124.81.96.0/20
|
||||
- 139.9.98.0/24
|
||||
- 139.9.99.0/24
|
||||
- 14.137.132.0/22
|
||||
- 14.137.136.0/22
|
||||
- 14.137.140.0/22
|
||||
- 14.137.152.0/24
|
||||
- 14.137.153.0/24
|
||||
- 14.137.154.0/24
|
||||
- 14.137.155.0/24
|
||||
- 14.137.156.0/24
|
||||
- 14.137.157.0/24
|
||||
- 14.137.161.0/24
|
||||
- 14.137.163.0/24
|
||||
- 14.137.169.0/24
|
||||
- 14.137.170.0/23
|
||||
- 14.137.172.0/22
|
||||
- 146.174.128.0/20
|
||||
- 146.174.144.0/20
|
||||
- 146.174.160.0/20
|
||||
- 146.174.176.0/20
|
||||
- 148.145.160.0/20
|
||||
- 148.145.192.0/20
|
||||
- 148.145.208.0/20
|
||||
- 148.145.224.0/23
|
||||
- 148.145.234.0/23
|
||||
- 148.145.236.0/23
|
||||
- 148.145.238.0/23
|
||||
- 149.232.128.0/20
|
||||
- 149.232.144.0/20
|
||||
- 150.40.128.0/20
|
||||
- 150.40.144.0/20
|
||||
- 150.40.160.0/20
|
||||
- 150.40.176.0/20
|
||||
- 150.40.182.0/24
|
||||
- 150.40.192.0/20
|
||||
- 150.40.208.0/20
|
||||
- 150.40.224.0/20
|
||||
- 150.40.240.0/20
|
||||
- 154.220.192.0/19
|
||||
- 154.81.16.0/20
|
||||
- 154.83.0.0/23
|
||||
- 154.86.32.0/20
|
||||
- 154.86.48.0/20
|
||||
- 154.93.100.0/23
|
||||
- 154.93.104.0/23
|
||||
- 156.227.22.0/23
|
||||
- 156.230.32.0/21
|
||||
- 156.230.40.0/21
|
||||
- 156.230.64.0/18
|
||||
- 156.232.16.0/20
|
||||
- 156.240.128.0/18
|
||||
- 156.249.32.0/20
|
||||
- 156.253.16.0/20
|
||||
- 157.254.211.0/24
|
||||
- 157.254.212.0/24
|
||||
- 159.138.0.0/20
|
||||
- 159.138.112.0/21
|
||||
- 159.138.114.0/24
|
||||
- 159.138.120.0/22
|
||||
- 159.138.124.0/24
|
||||
- 159.138.125.0/24
|
||||
- 159.138.126.0/23
|
||||
- 159.138.128.0/20
|
||||
- 159.138.144.0/20
|
||||
- 159.138.152.0/21
|
||||
- 159.138.16.0/22
|
||||
- 159.138.160.0/20
|
||||
- 159.138.176.0/23
|
||||
- 159.138.178.0/24
|
||||
- 159.138.179.0/24
|
||||
- 159.138.180.0/24
|
||||
- 159.138.181.0/24
|
||||
- 159.138.182.0/23
|
||||
- 159.138.188.0/23
|
||||
- 159.138.190.0/23
|
||||
- 159.138.192.0/20
|
||||
- 159.138.20.0/22
|
||||
- 159.138.208.0/21
|
||||
- 159.138.216.0/22
|
||||
- 159.138.220.0/23
|
||||
- 159.138.224.0/20
|
||||
- 159.138.24.0/21
|
||||
- 159.138.240.0/20
|
||||
- 159.138.32.0/20
|
||||
- 159.138.48.0/20
|
||||
- 159.138.64.0/21
|
||||
- 159.138.67.0/24
|
||||
- 159.138.76.0/24
|
||||
- 159.138.77.0/24
|
||||
- 159.138.78.0/24
|
||||
- 159.138.79.0/24
|
||||
- 159.138.80.0/20
|
||||
- 159.138.96.0/20
|
||||
- 166.108.192.0/20
|
||||
- 166.108.208.0/20
|
||||
- 166.108.224.0/20
|
||||
- 166.108.240.0/20
|
||||
- 176.52.128.0/20
|
||||
- 176.52.144.0/20
|
||||
- 180.87.192.0/20
|
||||
- 180.87.208.0/20
|
||||
- 180.87.224.0/20
|
||||
- 180.87.240.0/20
|
||||
- 182.160.0.0/20
|
||||
- 182.160.16.0/24
|
||||
- 182.160.17.0/24
|
||||
- 182.160.18.0/23
|
||||
- 182.160.20.0/22
|
||||
- 182.160.20.0/24
|
||||
- 182.160.24.0/21
|
||||
- 182.160.36.0/22
|
||||
- 182.160.49.0/24
|
||||
- 182.160.52.0/22
|
||||
- 182.160.56.0/21
|
||||
- 182.160.56.0/24
|
||||
- 182.160.57.0/24
|
||||
- 182.160.58.0/24
|
||||
- 182.160.59.0/24
|
||||
- 182.160.60.0/24
|
||||
- 182.160.61.0/24
|
||||
- 182.160.62.0/24
|
||||
- 183.87.112.0/20
|
||||
- 183.87.128.0/20
|
||||
- 183.87.144.0/20
|
||||
- 183.87.32.0/20
|
||||
- 183.87.48.0/20
|
||||
- 183.87.64.0/20
|
||||
- 183.87.80.0/20
|
||||
- 183.87.96.0/20
|
||||
- 188.119.192.0/20
|
||||
- 188.119.208.0/20
|
||||
- 188.119.224.0/20
|
||||
- 188.119.240.0/20
|
||||
- 188.239.0.0/20
|
||||
- 188.239.16.0/20
|
||||
- 188.239.32.0/20
|
||||
- 188.239.48.0/20
|
||||
- 189.1.192.0/20
|
||||
- 189.1.208.0/20
|
||||
- 189.1.224.0/20
|
||||
- 189.1.240.0/20
|
||||
- 189.28.112.0/20
|
||||
- 189.28.96.0/20
|
||||
- 190.92.192.0/19
|
||||
- 190.92.224.0/19
|
||||
- 190.92.248.0/24
|
||||
- 190.92.252.0/24
|
||||
- 190.92.253.0/24
|
||||
- 190.92.254.0/24
|
||||
- 201.77.32.0/20
|
||||
- 202.170.88.0/21
|
||||
- 202.76.128.0/20
|
||||
- 202.76.144.0/20
|
||||
- 202.76.160.0/20
|
||||
- 202.76.176.0/20
|
||||
- 203.123.80.0/20
|
||||
- 203.167.20.0/23
|
||||
- 203.167.22.0/24
|
||||
- 212.34.192.0/20
|
||||
- 212.34.208.0/20
|
||||
- 213.250.128.0/20
|
||||
- 213.250.144.0/20
|
||||
- 213.250.160.0/20
|
||||
- 213.250.176.0/21
|
||||
- 213.250.184.0/21
|
||||
- 219.83.0.0/20
|
||||
- 219.83.112.0/22
|
||||
- 219.83.116.0/23
|
||||
- 219.83.118.0/23
|
||||
- 219.83.121.0/24
|
||||
- 219.83.122.0/24
|
||||
- 219.83.123.0/24
|
||||
- 219.83.124.0/24
|
||||
- 219.83.16.0/20
|
||||
- 219.83.32.0/20
|
||||
- 219.83.76.0/23
|
||||
- 2404:a140:43::/48
|
||||
- 2405:f080::/39
|
||||
- 2405:f080:1::/48
|
||||
- 2405:f080:1000::/39
|
||||
- 2405:f080:1200::/39
|
||||
- 2405:f080:1400::/48
|
||||
- 2405:f080:1401::/48
|
||||
- 2405:f080:1402::/48
|
||||
- 2405:f080:1403::/48
|
||||
- 2405:f080:1500::/40
|
||||
- 2405:f080:1600::/48
|
||||
- 2405:f080:1602::/48
|
||||
- 2405:f080:1603::/48
|
||||
- 2405:f080:1800::/39
|
||||
- 2405:f080:1800::/44
|
||||
- 2405:f080:1810::/48
|
||||
- 2405:f080:1811::/48
|
||||
- 2405:f080:1812::/48
|
||||
- 2405:f080:1813::/48
|
||||
- 2405:f080:1814::/48
|
||||
- 2405:f080:1815::/48
|
||||
- 2405:f080:1900::/40
|
||||
- 2405:f080:1e02::/47
|
||||
- 2405:f080:1e04::/47
|
||||
- 2405:f080:1e06::/47
|
||||
- 2405:f080:1e1e::/47
|
||||
- 2405:f080:1e20::/47
|
||||
- 2405:f080:200::/48
|
||||
- 2405:f080:2000::/39
|
||||
- 2405:f080:201::/48
|
||||
- 2405:f080:202::/48
|
||||
- 2405:f080:2040::/48
|
||||
- 2405:f080:2200::/39
|
||||
- 2405:f080:2280::/48
|
||||
- 2405:f080:2281::/48
|
||||
- 2405:f080:2282::/48
|
||||
- 2405:f080:2283::/48
|
||||
- 2405:f080:2284::/48
|
||||
- 2405:f080:2285::/48
|
||||
- 2405:f080:2286::/48
|
||||
- 2405:f080:2287::/48
|
||||
- 2405:f080:2288::/48
|
||||
- 2405:f080:2289::/48
|
||||
- 2405:f080:228a::/48
|
||||
- 2405:f080:228b::/48
|
||||
- 2405:f080:228c::/48
|
||||
- 2405:f080:228d::/48
|
||||
- 2405:f080:228e::/48
|
||||
- 2405:f080:228f::/48
|
||||
- 2405:f080:2400::/39
|
||||
- 2405:f080:2600::/39
|
||||
- 2405:f080:2800::/48
|
||||
- 2405:f080:2a00::/48
|
||||
- 2405:f080:2e00::/47
|
||||
- 2405:f080:3000::/38
|
||||
- 2405:f080:3000::/40
|
||||
- 2405:f080:3100::/40
|
||||
- 2405:f080:3200::/48
|
||||
- 2405:f080:3201::/48
|
||||
- 2405:f080:3202::/48
|
||||
- 2405:f080:3203::/48
|
||||
- 2405:f080:3204::/48
|
||||
- 2405:f080:3205::/48
|
||||
- 2405:f080:3400::/38
|
||||
- 2405:f080:3400::/40
|
||||
- 2405:f080:3500::/40
|
||||
- 2405:f080:3600::/48
|
||||
- 2405:f080:3601::/48
|
||||
- 2405:f080:3602::/48
|
||||
- 2405:f080:3603::/48
|
||||
- 2405:f080:3604::/48
|
||||
- 2405:f080:3605::/48
|
||||
- 2405:f080:400::/39
|
||||
- 2405:f080:4000::/40
|
||||
- 2405:f080:4100::/48
|
||||
- 2405:f080:4102::/48
|
||||
- 2405:f080:4103::/48
|
||||
- 2405:f080:4104::/48
|
||||
- 2405:f080:4200::/40
|
||||
- 2405:f080:4300::/40
|
||||
- 2405:f080:600::/48
|
||||
- 2405:f080:800::/40
|
||||
- 2405:f080:810::/44
|
||||
- 2405:f080:a00::/39
|
||||
- 2405:f080:a11::/48
|
||||
- 2405:f080:e02::/48
|
||||
- 2405:f080:e03::/48
|
||||
- 2405:f080:e04::/47
|
||||
- 2405:f080:e05::/48
|
||||
- 2405:f080:e06::/48
|
||||
- 2405:f080:e07::/48
|
||||
- 2405:f080:e0e::/47
|
||||
- 2405:f080:e10::/47
|
||||
- 2405:f080:edff::/48
|
||||
- 27.106.0.0/20
|
||||
- 27.106.112.0/20
|
||||
- 27.106.16.0/20
|
||||
- 27.106.32.0/20
|
||||
- 27.106.48.0/20
|
||||
- 27.106.64.0/20
|
||||
- 27.106.80.0/20
|
||||
- 27.106.96.0/20
|
||||
- 27.255.0.0/23
|
||||
- 27.255.10.0/23
|
||||
- 27.255.12.0/23
|
||||
- 27.255.14.0/23
|
||||
- 27.255.16.0/23
|
||||
- 27.255.18.0/23
|
||||
- 27.255.2.0/23
|
||||
- 27.255.20.0/23
|
||||
- 27.255.22.0/23
|
||||
- 27.255.26.0/23
|
||||
- 27.255.28.0/23
|
||||
- 27.255.30.0/23
|
||||
- 27.255.32.0/23
|
||||
- 27.255.34.0/23
|
||||
- 27.255.36.0/23
|
||||
- 27.255.38.0/23
|
||||
- 27.255.4.0/23
|
||||
- 27.255.40.0/23
|
||||
- 27.255.42.0/23
|
||||
- 27.255.44.0/23
|
||||
- 27.255.46.0/23
|
||||
- 27.255.48.0/23
|
||||
- 27.255.50.0/23
|
||||
- 27.255.52.0/23
|
||||
- 27.255.54.0/23
|
||||
- 27.255.58.0/23
|
||||
- 27.255.6.0/23
|
||||
- 27.255.60.0/23
|
||||
- 27.255.62.0/23
|
||||
- 27.255.8.0/23
|
||||
- 42.201.128.0/20
|
||||
- 42.201.144.0/20
|
||||
- 42.201.160.0/20
|
||||
- 42.201.176.0/20
|
||||
- 42.201.192.0/20
|
||||
- 42.201.208.0/20
|
||||
- 42.201.224.0/20
|
||||
- 42.201.240.0/20
|
||||
- 43.225.140.0/22
|
||||
- 43.255.104.0/22
|
||||
- 45.194.104.0/21
|
||||
- 45.199.144.0/22
|
||||
- 45.202.128.0/19
|
||||
- 45.202.160.0/20
|
||||
- 45.202.176.0/21
|
||||
- 45.202.184.0/21
|
||||
- 45.203.40.0/21
|
||||
- 46.250.160.0/20
|
||||
- 46.250.176.0/20
|
||||
- 49.0.192.0/21
|
||||
- 49.0.200.0/21
|
||||
- 49.0.224.0/22
|
||||
- 49.0.228.0/22
|
||||
- 49.0.232.0/21
|
||||
- 49.0.240.0/20
|
||||
- 62.245.0.0/20
|
||||
- 62.245.16.0/20
|
||||
- 80.238.128.0/22
|
||||
- 80.238.132.0/22
|
||||
- 80.238.136.0/22
|
||||
- 80.238.140.0/22
|
||||
- 80.238.144.0/22
|
||||
- 80.238.148.0/22
|
||||
- 80.238.152.0/22
|
||||
- 80.238.156.0/22
|
||||
- 80.238.164.0/22
|
||||
- 80.238.164.0/24
|
||||
- 80.238.165.0/24
|
||||
- 80.238.168.0/22
|
||||
- 80.238.168.0/24
|
||||
- 80.238.169.0/24
|
||||
- 80.238.170.0/24
|
||||
- 80.238.171.0/24
|
||||
- 80.238.172.0/22
|
||||
- 80.238.176.0/22
|
||||
- 80.238.180.0/24
|
||||
- 80.238.181.0/24
|
||||
- 80.238.183.0/24
|
||||
- 80.238.184.0/24
|
||||
- 80.238.185.0/24
|
||||
- 80.238.186.0/24
|
||||
- 80.238.190.0/24
|
||||
- 80.238.192.0/20
|
||||
- 80.238.208.0/20
|
||||
- 80.238.224.0/20
|
||||
- 80.238.240.0/20
|
||||
- 83.101.0.0/21
|
||||
- 83.101.104.0/21
|
||||
- 83.101.16.0/21
|
||||
- 83.101.24.0/21
|
||||
- 83.101.32.0/21
|
||||
- 83.101.48.0/21
|
||||
- 83.101.56.0/23
|
||||
- 83.101.58.0/23
|
||||
- 83.101.64.0/21
|
||||
- 83.101.72.0/21
|
||||
- 83.101.8.0/23
|
||||
- 83.101.80.0/21
|
||||
- 83.101.88.0/24
|
||||
- 83.101.89.0/24
|
||||
- 83.101.96.0/21
|
||||
- 87.119.12.0/24
|
||||
- 89.150.192.0/20
|
||||
- 89.150.208.0/20
|
||||
- 94.244.128.0/20
|
||||
- 94.244.144.0/20
|
||||
- 94.244.160.0/20
|
||||
- 94.244.176.0/20
|
||||
- 94.45.160.0/19
|
||||
- 94.45.160.0/24
|
||||
- 94.45.161.0/24
|
||||
- 94.45.163.0/24
|
||||
- 94.74.112.0/21
|
||||
- 94.74.120.0/21
|
||||
- 94.74.64.0/20
|
||||
- 94.74.80.0/20
|
||||
- 94.74.96.0/20
|
||||
214
docs/blog/2025-08-28-cpu-core-odd/ProofOfWorkDiagram/index.jsx
Normal file
214
docs/blog/2025-08-28-cpu-core-odd/ProofOfWorkDiagram/index.jsx
Normal file
@@ -0,0 +1,214 @@
|
||||
import React, { useState, useEffect, useMemo } from 'react';
|
||||
import styles from './styles.module.css';
|
||||
|
||||
// A helper function to perform SHA-256 hashing.
|
||||
// It takes a string, encodes it, hashes it, and returns a hex string.
|
||||
async function sha256(message) {
|
||||
try {
|
||||
const msgBuffer = new TextEncoder().encode(message);
|
||||
const hashBuffer = await crypto.subtle.digest('SHA-256', msgBuffer);
|
||||
const hashArray = Array.from(new Uint8Array(hashBuffer));
|
||||
const hashHex = hashArray.map(b => b.toString(16).padStart(2, '0')).join('');
|
||||
return hashHex;
|
||||
} catch (error) {
|
||||
console.error("Hashing failed:", error);
|
||||
return "Error hashing data";
|
||||
}
|
||||
}
|
||||
|
||||
// Generates a random hex string of a given byte length
|
||||
const generateRandomHex = (bytes = 16) => {
|
||||
const buffer = new Uint8Array(bytes);
|
||||
crypto.getRandomValues(buffer);
|
||||
return Array.from(buffer)
|
||||
.map(byte => byte.toString(16).padStart(2, '0'))
|
||||
.join('');
|
||||
};
|
||||
|
||||
|
||||
// Icon components for better visual feedback
|
||||
const CheckIcon = () => (
|
||||
<svg xmlns="http://www.w3.org/2000/svg" className={styles.iconGreen} fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z" />
|
||||
</svg>
|
||||
);
|
||||
|
||||
const XCircleIcon = () => (
|
||||
<svg xmlns="http://www.w3.org/2000/svg" className={styles.iconRed} fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z" />
|
||||
</svg>
|
||||
);
|
||||
|
||||
// Main Application Component
|
||||
export default function App() {
|
||||
// State for the challenge, initialized with a random 16-byte hex string.
|
||||
const [challenge, setChallenge] = useState(() => generateRandomHex(16));
|
||||
// State for the nonce, which is the variable we can change
|
||||
const [nonce, setNonce] = useState(0);
|
||||
// State to store the resulting hash
|
||||
const [hash, setHash] = useState('');
|
||||
// A flag to indicate if the current hash is the "winning" one
|
||||
const [isMining, setIsMining] = useState(false);
|
||||
const [isFound, setIsFound] = useState(false);
|
||||
|
||||
// The mining difficulty, i.e., the required number of leading zeros
|
||||
const difficulty = "00";
|
||||
|
||||
// Memoize the combined data to avoid recalculating on every render
|
||||
const combinedData = useMemo(() => `${challenge}${nonce}`, [challenge, nonce]);
|
||||
|
||||
// This effect hook recalculates the hash whenever the combinedData changes.
|
||||
useEffect(() => {
|
||||
let isMounted = true;
|
||||
const calculateHash = async () => {
|
||||
const calculatedHash = await sha256(combinedData);
|
||||
if (isMounted) {
|
||||
setHash(calculatedHash);
|
||||
setIsFound(calculatedHash.startsWith(difficulty));
|
||||
}
|
||||
};
|
||||
calculateHash();
|
||||
return () => { isMounted = false; };
|
||||
}, [combinedData, difficulty]);
|
||||
|
||||
// This effect handles the automatic mining process
|
||||
useEffect(() => {
|
||||
if (!isMining) return;
|
||||
|
||||
let miningNonce = nonce;
|
||||
let continueMining = true;
|
||||
|
||||
const mine = async () => {
|
||||
while (continueMining) {
|
||||
const currentData = `${challenge}${miningNonce}`;
|
||||
const currentHash = await sha256(currentData);
|
||||
|
||||
if (currentHash.startsWith(difficulty)) {
|
||||
setNonce(miningNonce);
|
||||
setIsMining(false);
|
||||
break;
|
||||
}
|
||||
|
||||
miningNonce++;
|
||||
// Update the UI periodically to avoid freezing the browser
|
||||
if (miningNonce % 100 === 0) {
|
||||
setNonce(miningNonce);
|
||||
await new Promise(resolve => setTimeout(resolve, 0)); // Yield to the browser
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
mine();
|
||||
|
||||
return () => {
|
||||
continueMining = false;
|
||||
}
|
||||
}, [isMining, challenge, nonce, difficulty]);
|
||||
|
||||
|
||||
const handleMineClick = () => {
|
||||
setIsMining(true);
|
||||
}
|
||||
|
||||
const handleStopClick = () => {
|
||||
setIsMining(false);
|
||||
}
|
||||
|
||||
const handleResetClick = () => {
|
||||
setIsMining(false);
|
||||
setNonce(0);
|
||||
}
|
||||
|
||||
const handleNewChallengeClick = () => {
|
||||
setIsMining(false);
|
||||
setChallenge(generateRandomHex(16));
|
||||
setNonce(0);
|
||||
}
|
||||
|
||||
// Helper to render the hash with colored leading characters
|
||||
const renderHash = () => {
|
||||
if (!hash) return <span>...</span>;
|
||||
const prefix = hash.substring(0, difficulty.length);
|
||||
const suffix = hash.substring(difficulty.length);
|
||||
const prefixColor = isFound ? styles.hashPrefixGreen : styles.hashPrefixRed;
|
||||
return (
|
||||
<>
|
||||
<span className={`${prefixColor} ${styles.hashPrefix}`}>{prefix}</span>
|
||||
<span className={styles.hashSuffix}>{suffix}</span>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
return (
|
||||
<div className={styles.container}>
|
||||
<div className={styles.innerContainer}>
|
||||
<div className={styles.grid}>
|
||||
{/* Challenge Block */}
|
||||
<div className={styles.block}>
|
||||
<h2 className={styles.blockTitle}>1. Challenge</h2>
|
||||
<p className={styles.challengeText}>{challenge}</p>
|
||||
</div>
|
||||
|
||||
{/* Nonce Control Block */}
|
||||
<div className={styles.block}>
|
||||
<h2 className={styles.blockTitle}>2. Nonce</h2>
|
||||
<div className={styles.nonceControls}>
|
||||
<button onClick={() => setNonce(n => n - 1)} disabled={isMining} className={styles.nonceButton}>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" className={styles.iconSmall} fill="none" viewBox="0 0 24 24" stroke="currentColor"><path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M20 12H4" /></svg>
|
||||
</button>
|
||||
<span className={styles.nonceValue}>{nonce}</span>
|
||||
<button onClick={() => setNonce(n => n + 1)} disabled={isMining} className={styles.nonceButton}>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" className={styles.iconSmall} fill="none" viewBox="0 0 24 24" stroke="currentColor"><path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M12 4v16m8-8H4" /></svg>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Combined Data Block */}
|
||||
<div className={styles.block}>
|
||||
<h2 className={styles.blockTitle}>3. Combined Data</h2>
|
||||
<p className={styles.combinedDataText}>{combinedData}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Arrow pointing down */}
|
||||
<div className={styles.arrowContainer}>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" className={styles.iconGray} fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M19 14l-7 7m0 0l-7-7m7 7V3" />
|
||||
</svg>
|
||||
</div>
|
||||
|
||||
{/* Hash Output Block */}
|
||||
<div className={`${styles.hashContainer} ${isFound ? styles.hashContainerSuccess : styles.hashContainerError}`}>
|
||||
<div className={styles.hashContent}>
|
||||
<div className={styles.hashText}>
|
||||
<h2 className={styles.blockTitle}>4. Resulting Hash (SHA-256)</h2>
|
||||
<p className={styles.hashValue}>{renderHash()}</p>
|
||||
</div>
|
||||
<div className={styles.hashIcon}>
|
||||
{isFound ? <CheckIcon /> : <XCircleIcon />}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Mining Controls */}
|
||||
<div className={styles.buttonContainer}>
|
||||
{!isMining ? (
|
||||
<button onClick={handleMineClick} className={`${styles.button} ${styles.buttonCyan}`}>
|
||||
Auto-Mine
|
||||
</button>
|
||||
) : (
|
||||
<button onClick={handleStopClick} className={`${styles.button} ${styles.buttonYellow}`}>
|
||||
Stop Mining
|
||||
</button>
|
||||
)}
|
||||
<button onClick={handleNewChallengeClick} className={`${styles.button} ${styles.buttonIndigo}`}>
|
||||
New Challenge
|
||||
</button>
|
||||
<button onClick={handleResetClick} className={`${styles.button} ${styles.buttonGray}`}>
|
||||
Reset Nonce
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,317 @@
|
||||
/* Main container styles */
|
||||
.container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: white;
|
||||
font-family: ui-sans-serif, system-ui, sans-serif;
|
||||
margin-top: 2rem;
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
|
||||
.innerContainer {
|
||||
width: 100%;
|
||||
max-width: 56rem;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
/* Header styles */
|
||||
.header {
|
||||
text-align: center;
|
||||
margin-bottom: 2.5rem;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 2.25rem;
|
||||
font-weight: 700;
|
||||
color: rgb(34 211 238);
|
||||
}
|
||||
|
||||
.subtitle {
|
||||
font-size: 1.125rem;
|
||||
color: rgb(156 163 175);
|
||||
margin-top: 0.5rem;
|
||||
}
|
||||
|
||||
/* Grid layout styles */
|
||||
.grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
gap: 1rem;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* Block styles */
|
||||
.block {
|
||||
background-color: rgb(31 41 55);
|
||||
padding: 1.5rem;
|
||||
border-radius: 0.5rem;
|
||||
box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.blockTitle {
|
||||
font-size: 1.125rem;
|
||||
font-weight: 600;
|
||||
color: rgb(34 211 238);
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.challengeText {
|
||||
font-size: 0.875rem;
|
||||
color: rgb(209 213 219);
|
||||
word-break: break-all;
|
||||
font-family: ui-monospace, SFMono-Regular, monospace;
|
||||
}
|
||||
|
||||
.combinedDataText {
|
||||
font-size: 0.875rem;
|
||||
color: rgb(156 163 175);
|
||||
word-break: break-all;
|
||||
font-family: ui-monospace, SFMono-Regular, monospace;
|
||||
}
|
||||
|
||||
/* Nonce control styles */
|
||||
.nonceControls {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
.nonceButton {
|
||||
background-color: rgb(55 65 81);
|
||||
border-radius: 9999px;
|
||||
padding: 0.5rem;
|
||||
transition: background-color 200ms;
|
||||
}
|
||||
|
||||
.nonceButton:hover:not(:disabled) {
|
||||
background-color: rgb(34 211 238);
|
||||
}
|
||||
|
||||
.nonceButton:disabled {
|
||||
opacity: 0.5;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
.nonceValue {
|
||||
font-size: 1.5rem;
|
||||
font-family: ui-monospace, SFMono-Regular, monospace;
|
||||
width: 6rem;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* Icon styles */
|
||||
.icon {
|
||||
height: 2rem;
|
||||
width: 2rem;
|
||||
}
|
||||
|
||||
.iconGreen {
|
||||
height: 2rem;
|
||||
width: 2rem;
|
||||
color: rgb(74 222 128);
|
||||
}
|
||||
|
||||
.iconRed {
|
||||
height: 2rem;
|
||||
width: 2rem;
|
||||
color: rgb(248 113 113);
|
||||
}
|
||||
|
||||
.iconSmall {
|
||||
height: 1.5rem;
|
||||
width: 1.5rem;
|
||||
}
|
||||
|
||||
.iconGray {
|
||||
height: 2.5rem;
|
||||
width: 2.5rem;
|
||||
color: rgb(75 85 99);
|
||||
animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
|
||||
}
|
||||
|
||||
/* Arrow animation */
|
||||
@keyframes pulse {
|
||||
0%,
|
||||
100% {
|
||||
opacity: 1;
|
||||
}
|
||||
50% {
|
||||
opacity: 0.5;
|
||||
}
|
||||
}
|
||||
|
||||
.arrowContainer {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
margin: 1.5rem 0;
|
||||
}
|
||||
|
||||
/* Hash output styles */
|
||||
.hashContainer {
|
||||
padding: 1.5rem;
|
||||
border-radius: 0.5rem;
|
||||
box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
|
||||
transition: all 300ms;
|
||||
border: 2px solid;
|
||||
}
|
||||
|
||||
.hashContainerSuccess {
|
||||
background-color: rgb(20 83 45 / 0.5);
|
||||
border-color: rgb(74 222 128);
|
||||
}
|
||||
|
||||
.hashContainerError {
|
||||
background-color: rgb(127 29 29 / 0.5);
|
||||
border-color: rgb(248 113 113);
|
||||
}
|
||||
|
||||
.hashContent {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.hashText {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.hashTextLg {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.hashValue {
|
||||
font-size: 0.875rem;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.hashValueLg {
|
||||
font-size: 1rem;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.hashIcon {
|
||||
margin-top: 1rem;
|
||||
}
|
||||
|
||||
.hashIconLg {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
/* Hash highlighting */
|
||||
.hashPrefix {
|
||||
font-family: ui-monospace, SFMono-Regular, monospace;
|
||||
}
|
||||
|
||||
.hashPrefixGreen {
|
||||
color: rgb(74 222 128);
|
||||
}
|
||||
|
||||
.hashPrefixRed {
|
||||
color: rgb(248 113 113);
|
||||
}
|
||||
|
||||
.hashSuffix {
|
||||
font-family: ui-monospace, SFMono-Regular, monospace;
|
||||
color: rgb(156 163 175);
|
||||
}
|
||||
|
||||
/* Button styles */
|
||||
.buttonContainer {
|
||||
margin-top: 2rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
.button {
|
||||
font-weight: 700;
|
||||
padding: 0.75rem 1.5rem;
|
||||
border-radius: 0.5rem;
|
||||
transition: transform 150ms;
|
||||
}
|
||||
|
||||
.button:hover {
|
||||
transform: scale(1.05);
|
||||
}
|
||||
|
||||
.buttonCyan {
|
||||
background-color: rgb(8 145 178);
|
||||
color: white;
|
||||
}
|
||||
|
||||
.buttonCyan:hover {
|
||||
background-color: rgb(6 182 212);
|
||||
}
|
||||
|
||||
.buttonYellow {
|
||||
background-color: rgb(202 138 4);
|
||||
color: white;
|
||||
}
|
||||
|
||||
.buttonYellow:hover {
|
||||
background-color: rgb(245 158 11);
|
||||
}
|
||||
|
||||
.buttonIndigo {
|
||||
background-color: rgb(79 70 229);
|
||||
color: white;
|
||||
}
|
||||
|
||||
.buttonIndigo:hover {
|
||||
background-color: rgb(99 102 241);
|
||||
}
|
||||
|
||||
.buttonGray {
|
||||
background-color: rgb(55 65 81);
|
||||
color: white;
|
||||
}
|
||||
|
||||
.buttonGray:hover {
|
||||
background-color: rgb(75 85 99);
|
||||
}
|
||||
|
||||
/* Responsive styles */
|
||||
@media (min-width: 768px) {
|
||||
.title {
|
||||
font-size: 3rem;
|
||||
}
|
||||
|
||||
.grid {
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
.hashContent {
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.hashText {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.hashValue {
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
.hashIcon {
|
||||
margin-top: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 767px) {
|
||||
.grid {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1rem;
|
||||
}
|
||||
}
|
||||
129
docs/blog/2025-08-28-cpu-core-odd/index.mdx
Normal file
129
docs/blog/2025-08-28-cpu-core-odd/index.mdx
Normal file
@@ -0,0 +1,129 @@
|
||||
---
|
||||
slug: 2025/cpu-core-odd
|
||||
title: Sometimes CPU cores are odd
|
||||
description: "TL;DR: all the assumptions you have about processor design are wrong and if you are unlucky you will never run into problems that users do through sheer chance."
|
||||
authors: [xe]
|
||||
tags:
|
||||
- bugfix
|
||||
- implementation
|
||||
image: parc-dsilence.webp
|
||||
---
|
||||
|
||||
import ProofOfWorkDiagram from "./ProofOfWorkDiagram";
|
||||
|
||||

|
||||
|
||||
One of the biggest lessons that I've learned in my career is that all software has bugs, and the more complicated your software gets the more complicated your bugs get. A lot of the time those bugs will be fairly obvious and easy to spot, validate, and replicate. Sometimes, the process of fixing it will uncover your core assumptions about how things work in ways that will leave you feeling like you just got trolled.
|
||||
|
||||
Today I'm going to talk about a single line fix that prevents people on a large number of devices from having weird irreproducible issues with Anubis rejecting people when it frankly shouldn't. Stick around, it's gonna be a wild ride.
|
||||
|
||||
{/* truncate */}
|
||||
|
||||
## How this happened
|
||||
|
||||
Anubis is a web application firewall that tries to make sure that the client is a browser. It uses a few [challenge methods](/docs/admin/configuration/challenges/) to do this determination, but the main method is the [proof of work](/docs/admin/configuration/challenges/proof-of-work/) challenge which makes clients grind away at cryptographic checksums in order to rate limit clients from connecting too eagerly.
|
||||
|
||||
:::note
|
||||
|
||||
In retrospect implementing the proof of work challenge may have been a mistake and it's likely to be supplanted by things like [Proof of React](https://github.com/TecharoHQ/anubis/pull/1038) or other methods that have yet to be developed. Your patience and polite behaviour in the bug tracker is appreciated.
|
||||
|
||||
:::
|
||||
|
||||
In order to make sure the proof of work challenge screen _goes away as fast as possible_, the [worker code](https://github.com/TecharoHQ/anubis/tree/main/web/js/worker) is optimized within an inch of its digital life. One of the main ways that this code is optimized is with how it's run. Over the last 10-20 years, the main way that CPUs have gotten fast is via increasing multicore performance. Anubis tries to make sure that it can use as many cores as possible in order to take advantage of your device's CPU as much as it can.
|
||||
|
||||
This strategy sometimes has some issues though, for one Firefox seems to get _much slower_ if you have Anubis try to absolutely saturate all of the cores on the system. It also has a fairly high overhead between JavaScript JIT code and [WebCrypto](https://developer.mozilla.org/en-US/docs/Web/API/Web_Crypto_API). I did some testing and found out that Firefox's point of diminishing returns was about half of the CPU cores.
|
||||
|
||||
## Another "invalid response" bug
|
||||
|
||||
One of the complaints I've been getting from users and administrators using Anubis is that they've been running into issues where users get randomly rejected with an error message only saying "invalid response". This happens when the challenge validating process fails. This issue has been blocking the release of the next version of Anubis.
|
||||
|
||||
In order to demonstrate this better, I've made a little interactive diagram for the proof of work process:
|
||||
|
||||
<ProofOfWorkDiagram />
|
||||
|
||||
I've fixed a lot of the easy bugs in Anubis by this point. A lot of what's left is the hard bugs, but also specifically the kinds of hard bugs that involve weird hardware configurations. In order to try and catch these issues before software hits prod, I test Anubis against a bunch of hardware I have locally. Any issues I find and fix before software ships are issues that you don't hit in production.
|
||||
|
||||
Let's consider [the line of code](https://github.com/TecharoHQ/anubis/blob/main/web/js/algorithms/fast.mjs) that was causing this issue:
|
||||
|
||||
```js
|
||||
threads = Math.max(navigator.hardwareConcurrency / 2, 1),
|
||||
```
|
||||
|
||||
This is intended to make your browser spawn a proof of work worker for _half_ of your available CPU cores. If you only have one CPU core, you should only have one worker. Each thread is given this number of threads and uses that to increment the nonce so that each thread doesn't try to find a solution that another worker has already performed.
|
||||
|
||||
One of the subtle problems here is that all of the parts of this assume that the thread ID and nonce are integers without a decimal portion. Famously, [all JavaScript numbers are IEEE 754 floating point numbers](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number). Surely there wouldn't be a case where the thread count could be a _decimal_ number, right?
|
||||
|
||||
Here's all the devices I use to test Anubis _and their core counts_:
|
||||
|
||||
| Device Name | Core Count |
|
||||
| :--------------------------- | :--------- |
|
||||
| MacBook Pro M3 Max | 16 |
|
||||
| MacBook Pro M4 Max | 16 |
|
||||
| AMD Ryzen 9 7950x3D | 32 |
|
||||
| Google Pixel 9a (GrapheneOS) | 8 |
|
||||
| iPhone 15 Pro Max | 6 |
|
||||
| iPad Pro (M1) | 8 |
|
||||
| iPad mini | 6 |
|
||||
| Steam Deck | 8 |
|
||||
| Core i5 10600 (homelab) | 12 |
|
||||
| ROG Ally | 16 |
|
||||
|
||||
Notice something? All of those devices have an _even_ number of cores. Some devices such as the [Pixel 8 Pro](https://www.gsmarena.com/google_pixel_8_pro-12545.php) have an _odd_ number of cores. So what happens with that line of code as the JavaScript engine evaluates it?
|
||||
|
||||
Let's replace the [`navigator.hardwareConcurrency`](https://developer.mozilla.org/en-US/docs/Web/API/Navigator/hardwareConcurrency) with the Pixel 8 Pro's 9 cores:
|
||||
|
||||
```js
|
||||
threads = Math.max(9 / 2, 1),
|
||||
```
|
||||
|
||||
Then divide it by two:
|
||||
|
||||
```js
|
||||
threads = Math.max(4.5, 1),
|
||||
```
|
||||
|
||||
Oops, that's not ideal. However `4.5` is bigger than `1`, so [`Math.max`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/max) returns that:
|
||||
|
||||
```js
|
||||
threads = 4.5,
|
||||
```
|
||||
|
||||
This means that each time the proof of work equation is calculated, there is a 50% chance that a valid solution would include a nonce with a decimal portion in it. If the client finds a solution with such a nonce, then it would think the client was successful and submit the solution to the server, but the server only expects whole numbers back so it rejects that as an invalid response.
|
||||
|
||||
I keep telling more junior people that when you have the weirdest, most inconsistent bugs in software that it's going to boil down to the dumbest possible thing you can possibly imagine. People don't believe me, then they encounter bugs like this. Then they suddenly believe me.
|
||||
|
||||
Here is the fix:
|
||||
|
||||
```js
|
||||
threads = Math.trunc(Math.max(navigator.hardwareConcurrency / 2, 1)),
|
||||
```
|
||||
|
||||
This uses [`Math.trunc`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/trunc) to truncate away the decimal portion so that the Pixel 8 Pro has `4` workers instead of `4.5` workers.
|
||||
|
||||
## Today I learned this was possible
|
||||
|
||||
This was a total "today I learned" moment. I didn't actually think that hardware vendors shipped processors with an odd number of cores, however if you look at the core geometry of the Pixel 8 Pro, it has _three_ tiers of processor cores:
|
||||
|
||||
| Core type | Core model | Number |
|
||||
| :----------------- | :------------------- | :----- |
|
||||
| High performance | 3 Ghz Cortex X3 | 1 |
|
||||
| Medium performance | 2.45 Ghz Cortex A715 | 4 |
|
||||
| High efficiency | 2.15 Cortex A510 | 4 |
|
||||
| Total | | 9 |
|
||||
|
||||
I guess every assumption that developers have about CPU design is probably wrong.
|
||||
|
||||
This probably isn't helped by the fact that for most of my career, the core count in phones has been largely irrelevant and most of the desktop / laptop CPUs I've had (where core count does matter) uses [simultaneous multithreading](https://en.wikipedia.org/wiki/Simultaneous_multithreading) to "multiply" the core count by two.
|
||||
|
||||
The client side fix is a bit of an "emergency stop" button to try and mitigate the badness as early as possible. In general I'm quite aware of the terrible UX involved with this flow failing and I'm still noodling through ways to make that UX better and easier for users / administrators to debug.
|
||||
|
||||
I'm looking into the following:
|
||||
|
||||
1. This could have been prevented on the server side by doing less strict input validation in compliance with [Postel's Law](https://en.wikipedia.org/wiki/Robustness_principle). I feel nervous about making such a security-sensitive endpoint _more liberal_ with the inputs it can accept, but it may be fine? I need to consult with a security expert.
|
||||
2. Showing an encrypted error message on the "invalid response" page so that the user and administrator can work together to fix or report the issue. I remember Google doing this at least once, but I can't recall where I've seen it in the past. Either way, this is probably the most robust method even though it would require developing some additional tooling. I think it would be worth it.
|
||||
|
||||
I'm likely going to go with the second option. I will need to figure out a good flow for this. It's likely going to involve [age](https://github.com/FiloSottile/age). I'll say more about this when I have more to say.
|
||||
|
||||
In the meantime though, looks like I need to expense a used Pixel 8 Pro to add to the testing jungle for Anubis. If anyone has a deal out there, please let me know!
|
||||
|
||||
Thank you to the people that have been polite and helpful when trying to root cause and fix this issue.
|
||||
BIN
docs/blog/2025-08-28-cpu-core-odd/parc-dsilence.webp
Normal file
BIN
docs/blog/2025-08-28-cpu-core-odd/parc-dsilence.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 18 KiB |
@@ -7,13 +7,16 @@ sidebar_position: 999
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).https://bsky.app/profile/xeiaso.net/post/3lxkqbd25hk22
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
<!-- This changes the project to: -->
|
||||
|
||||
- Add a "proof of React" challenge to prove that the client is able to run a simple JSX app.
|
||||
- Added possibility to disable HTTP keep-alive to support backends not properly
|
||||
handling it
|
||||
- Added a missing link to the Caddy installation environment in the installation documentation.
|
||||
- Downstream consumers can change the default [log/slog#Logger](https://pkg.go.dev/log/slog#Logger) instance that Anubis uses by setting `opts.Logger` to your slog instance of choice ([#864](https://github.com/TecharoHQ/anubis/issues/864)).
|
||||
- The [Thoth client](https://anubis.techaro.lol/docs/admin/thoth) is now public in the repo instead of being an internal package.
|
||||
- [Custom-AsyncHttpClient](https://github.com/AsyncHttpClient/async-http-client)'s default User-Agent has an increased weight by default ([#852](https://github.com/TecharoHQ/anubis/issues/852)).
|
||||
@@ -31,6 +34,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
- The hard dependency on WebCrypto has been removed, allowing a proof of work challenge to work over plain (unencrypted) HTTP.
|
||||
- Firefox for Android support has been fixed by embedding the challenge ID into the pass-challenge route. This also fixes some inconsistent issues with other mobile browsers.
|
||||
- The Anubis version number is put in the footer of every page.
|
||||
- Prevent the proof of work nonce from being a decimal value by using Math.trunc to coerce it back to an integer if it happens ([#1043](https://github.com/TecharoHQ/anubis/issues/1043)).
|
||||
- The legacy JSON based policy file example has been removed and all documentation for how to write a policy file in JSON has been deleted. JSON based policy files will still work, but YAML is the superior option for Anubis configuration.
|
||||
- A standard library HTTP server log message about HTTP pipelining not working has been filtered out of Anubis' logs. There is no action that can be taken about it.
|
||||
- The default `favicon` pattern in `data/common/keep-internet-working.yaml` has been updated to permit requests for png/gif/jpg/svg files as well as ico.
|
||||
@@ -39,12 +43,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
- Add optional restrictions for JWT based on the value of a header ([#697](https://github.com/TecharoHQ/anubis/pull/697))
|
||||
- The word "hack" has been removed from the translation strings for Anubis due to incidents involving people misunderstanding that word and sending particularly horrible things to the project lead over email.
|
||||
- Bump AI-robots.txt to version 1.39
|
||||
- Add a default block rule for Huawei Cloud.
|
||||
- Add a default block rule for Alibaba Cloud.
|
||||
- Add X-Request-URI support so that Subrequest Authentication has path support.
|
||||
- Add better logging when using Subrequest Authentication.
|
||||
- Two of Slackware's community git repository servers are now poxied by Anubis.
|
||||
- Added support to use Traefik forwardAuth middleware.
|
||||
|
||||
### Security-relevant changes
|
||||
|
||||
#### Fix potential double-spend for challenges
|
||||
|
||||
Anubis operates by issuing a challenge and having the client present a solution for that challenge. Challenges are identified by a unique UUID, which is tored in the database.
|
||||
Anubis operates by issuing a challenge and having the client present a solution for that challenge. Challenges are identified by a unique UUID, which is stored in the database.
|
||||
|
||||
The problem is that a challenge could potentially be used twice by a dedicated attacker making a targeted attack against Anubis. Challenge records did not have a "spent" or "used" field. In total, a dedicated attacker could solve a challenge once and reuse that solution across multiple sessions in order to mint additional tokens.
|
||||
|
||||
@@ -282,7 +292,6 @@ And some cleanups/refactors were added:
|
||||
- Bump AI-robots.txt to version 1.37
|
||||
- Make progress bar styling more compatible (UXP, etc)
|
||||
- Add `--strip-base-prefix` flag/envvar to strip the base prefix from request paths when forwarding to target servers
|
||||
- Added support to use Traefik forwardAuth middleware
|
||||
- Fix an off-by-one in the default threshold config
|
||||
- Add functionality for HS512 JWT algorithm
|
||||
- Add support for dynamic cookie domains with the `--cookie-dynamic-domain`/`COOKIE_DYNAMIC_DOMAIN` flag/envvar
|
||||
|
||||
25
docs/docs/admin/caveats-xff.mdx
Normal file
25
docs/docs/admin/caveats-xff.mdx
Normal file
@@ -0,0 +1,25 @@
|
||||
# Client IP Headers
|
||||
|
||||
Currently Anubis will always flatten the `X-Forwarded-For` when it contains multiple IP addresses. From right to left, the first IP address that is not in one of the following categories will be set as `X-Forwarded-For` in the request passed to the upstream.
|
||||
|
||||
- Private (`XFF_STRIP_PRIVATE`, enabled by default)
|
||||
- CGNAT (always stripped)
|
||||
- Link-local Unicast (always stripped)
|
||||
|
||||
```
|
||||
Incoming: X-Forwarded-For: 1.2.3.4, 5.6.7.8, 10.0.0.1
|
||||
Upstream: X-Forwarded-For: 5.6.7.8
|
||||
```
|
||||
|
||||
This behavior will cause problems if the proxy in front of Anubis is from a public IP, such as Cloudflare, because Anubis will use the Cloudflare IP instead of your client's real IP. You will likely see all requests from your browser being blocked and/or an infinite challenge loop.
|
||||
|
||||
```
|
||||
Incoming: X-Forwarded-For: REAL_CLIENT_IP, CF_IP
|
||||
Upstream: X-Forwarded-For: CF_IP
|
||||
```
|
||||
|
||||
As a workaround, you should configure your web server to parse an alternative source (such as `CF-Connecting-IP`), or pre-process the incoming `X-Forwarded-For` with your web server to ensure it only contains the real client IP address, then pass it to Anubis as `X-Forwarded-For`.
|
||||
|
||||
The `X-Real-IP` header will be automatically inferred from `X-Forwarded-For` if not set, setting it explicitly is not necessary as long as `X-Forwarded-For` contains only the real client IP. However setting it explicitly can eliminate spoofed values if your web server doesn't set this.
|
||||
|
||||
See [Cloudflare](environments/cloudflare.mdx) for an example configuration.
|
||||
26
docs/docs/admin/environments/cloudflare.mdx
Normal file
26
docs/docs/admin/environments/cloudflare.mdx
Normal file
@@ -0,0 +1,26 @@
|
||||
# Cloudflare
|
||||
|
||||
If you are using Cloudflare, you should configure your server to use `CF-Connecting-IP` as the source of the real client IP, and pass that address to Anubis as `X-Forwarded-For`. Read [Client IP Headers](../caveats-xff.mdx) for details.
|
||||
|
||||
Example configuration with Caddy:
|
||||
|
||||
```Caddyfile
|
||||
{
|
||||
servers {
|
||||
# Cloudflare IP ranges from https://www.cloudflare.com/en-gb/ips/
|
||||
trusted_proxies static 173.245.48.0/20 103.21.244.0/22 103.22.200.0/22 103.31.4.0/22 141.101.64.0/18 108.162.192.0/18 190.93.240.0/20 188.114.96.0/20 197.234.240.0/22 198.41.128.0/17 162.158.0.0/15 104.16.0.0/13 104.24.0.0/14 172.64.0.0/13 131.0.72.0/22 2400:cb00::/32 2606:4700::/32 2803:f800::/32 2405:b500::/32 2405:8100::/32 2a06:98c0::/29 2c0f:f248::/32
|
||||
# Use CF-Connecting-IP to determine the client IP instead of XFF
|
||||
# https://caddyserver.com/docs/caddyfile/options#client-ip-headers
|
||||
client_ip_headers CF-Connecting-IP
|
||||
}
|
||||
}
|
||||
|
||||
example.com {
|
||||
reverse_proxy http://anubis:3000 {
|
||||
# Pass the client IP read from CF-Connecting-IP
|
||||
header_up X-Forwarded-For {client_ip}
|
||||
header_up X-Real-IP {client_ip}
|
||||
header_up X-Http-Version {http.request.proto}
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -129,6 +129,8 @@ server {
|
||||
listen unix:/run/nginx/nginx.sock;
|
||||
|
||||
server_name mimi.techaro.lol;
|
||||
|
||||
port_in_redirect off;
|
||||
root "/srv/http/mimi.techaro.lol";
|
||||
index index.html;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Wordpress
|
||||
# WordPress
|
||||
|
||||
Wordpress is the most popular blog engine on the planet.
|
||||
WordPress is the most popular blog engine on the planet.
|
||||
|
||||
## Using a multi-site setup with Anubis
|
||||
|
||||
@@ -27,7 +27,7 @@ flowchart LR
|
||||
US --> |whatever you're doing| B
|
||||
```
|
||||
|
||||
Wordpress may not realize that the underlying connection is being done over HTTPS. This could lead to a redirect loop in the `/wp-admin/` routes. In order to fix this, add the following to your `wp-config.php` file:
|
||||
WordPress may not realize that the underlying connection is being done over HTTPS. This could lead to a redirect loop in the `/wp-admin/` routes. In order to fix this, add the following to your `wp-config.php` file:
|
||||
|
||||
```php
|
||||
if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https') {
|
||||
@@ -36,4 +36,4 @@ if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROT
|
||||
}
|
||||
```
|
||||
|
||||
This will make Wordpress think that your connection is over HTTPS instead of plain HTTP.
|
||||
This will make WordPress think that your connection is over HTTPS instead of plain HTTP.
|
||||
|
||||
@@ -178,6 +178,7 @@ Alternatively here is a key generated by your browser:
|
||||
To get Anubis filtering your traffic, you need to make sure it's added to your HTTP load balancer or platform configuration. See the [environments category](/docs/category/environments) for detailed information on individual environments.
|
||||
|
||||
- [Apache](./environments/apache.mdx)
|
||||
- [Caddy](./environments/caddy.mdx)
|
||||
- [Docker compose](./environments/docker-compose.mdx)
|
||||
- [Kubernetes](./environments/kubernetes.mdx)
|
||||
- [Nginx](./environments/nginx.mdx)
|
||||
|
||||
@@ -54,7 +54,7 @@ bots:
|
||||
action: CHALLENGE
|
||||
```
|
||||
|
||||
This allows requests to [`/.well-known`](https://en.wikipedia.org/wiki/Well-known_URI), `/favicon.ico`, `/robots.txt`, and challenges any request that has the word `Mozilla` in its User-Agent string. The [default policy file](https://github.com/TecharoHQ/anubis/blob/main/data/botPolicies.json) is a bit more cohesive, but this should be more than enough for most users.
|
||||
This allows requests to [`/.well-known`](https://en.wikipedia.org/wiki/Well-known_URI), `/favicon.ico`, `/robots.txt`, and challenges any request that has the word `Mozilla` in its User-Agent string. The [default policy file](https://github.com/TecharoHQ/anubis/blob/main/data/botPolicies.yaml) is a bit more cohesive, but this should be more than enough for most users.
|
||||
|
||||
If no rules match the request, it is allowed through. For more details on this default behavior and its implications, see [Default allow behavior](./default-allow-behavior.mdx).
|
||||
|
||||
|
||||
@@ -118,3 +118,8 @@ This page contains a non-exhaustive list with all websites using Anubis.
|
||||
- https://hacklab.to/
|
||||
- https://knowledge.hacklab.to/
|
||||
</details>
|
||||
- <details>
|
||||
<summary>Slackware</summary>
|
||||
- https://git.slackware.nl/
|
||||
- https://git.liveslak.org/
|
||||
</details>
|
||||
|
||||
@@ -27,8 +27,13 @@ func InitSlog(level string) {
|
||||
}
|
||||
|
||||
func GetRequestLogger(base *slog.Logger, r *http.Request) *slog.Logger {
|
||||
host := r.Host
|
||||
if host == "" {
|
||||
host = r.Header.Get("X-Forwarded-Host")
|
||||
}
|
||||
|
||||
return base.With(
|
||||
"host", r.Host,
|
||||
"host", host,
|
||||
"method", r.Method,
|
||||
"path", r.URL.Path,
|
||||
"user_agent", r.UserAgent(),
|
||||
|
||||
@@ -3,6 +3,8 @@ package internal
|
||||
import (
|
||||
"bytes"
|
||||
"log"
|
||||
"log/slog"
|
||||
"net/http"
|
||||
"strings"
|
||||
"testing"
|
||||
)
|
||||
@@ -44,3 +46,37 @@ func TestErrorLogFilter(t *testing.T) {
|
||||
}
|
||||
buf.Reset()
|
||||
}
|
||||
|
||||
func TestGetRequestLogger(t *testing.T) {
|
||||
// Test case 1: Normal request with Host header
|
||||
req1, _ := http.NewRequest("GET", "http://example.com/test", nil)
|
||||
req1.Host = "example.com"
|
||||
|
||||
logger := slog.Default()
|
||||
reqLogger := GetRequestLogger(logger, req1)
|
||||
|
||||
// We can't easily test the actual log output without setting up a test handler,
|
||||
// but we can verify the function doesn't panic and returns a logger
|
||||
if reqLogger == nil {
|
||||
t.Error("GetRequestLogger returned nil")
|
||||
}
|
||||
|
||||
// Test case 2: Subrequest auth mode with X-Forwarded-Host
|
||||
req2, _ := http.NewRequest("GET", "http://test.com/auth", nil)
|
||||
req2.Host = ""
|
||||
req2.Header.Set("X-Forwarded-Host", "original-site.com")
|
||||
|
||||
reqLogger2 := GetRequestLogger(logger, req2)
|
||||
if reqLogger2 == nil {
|
||||
t.Error("GetRequestLogger returned nil for X-Forwarded-Host case")
|
||||
}
|
||||
|
||||
// Test case 3: No host information available
|
||||
req3, _ := http.NewRequest("GET", "http://test.com/nohost", nil)
|
||||
req3.Host = ""
|
||||
|
||||
reqLogger3 := GetRequestLogger(logger, req3)
|
||||
if reqLogger3 == nil {
|
||||
t.Error("GetRequestLogger returned nil for no host case")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -436,6 +436,7 @@ func (s *Server) PassChallenge(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
if (len(urlParsed.Host) > 0 && len(s.opts.RedirectDomains) != 0 && !slices.Contains(s.opts.RedirectDomains, urlParsed.Host)) || urlParsed.Host != r.URL.Host {
|
||||
lg.Debug("domain not allowed", "domain", urlParsed.Host)
|
||||
s.respondWithError(w, r, localizer.T("redirect_domain_not_allowed"))
|
||||
return
|
||||
}
|
||||
|
||||
@@ -106,6 +106,7 @@ func New(opts Options) (*Server, error) {
|
||||
}
|
||||
|
||||
anubis.BasePrefix = opts.BasePrefix
|
||||
anubis.PublicUrl = opts.PublicUrl
|
||||
|
||||
result := &Server{
|
||||
next: opts.Next,
|
||||
|
||||
10
lib/http.go
10
lib/http.go
@@ -212,12 +212,16 @@ func (s *Server) constructRedirectURL(r *http.Request) (string, error) {
|
||||
host := r.Header.Get("X-Forwarded-Host")
|
||||
uri := r.Header.Get("X-Forwarded-Uri")
|
||||
|
||||
localizer := localization.GetLocalizer(r)
|
||||
|
||||
if proto == "" || host == "" || uri == "" {
|
||||
return "", errors.New("missing required X-Forwarded-* headers")
|
||||
return "", errors.New(localizer.T("missing_required_forwarded_headers"))
|
||||
}
|
||||
// Check if host is allowed in RedirectDomains
|
||||
if len(s.opts.RedirectDomains) > 0 && !slices.Contains(s.opts.RedirectDomains, host) {
|
||||
return "", errors.New("redirect domain not allowed")
|
||||
lg := internal.GetRequestLogger(s.logger, r)
|
||||
lg.Debug("domain not allowed", "domain", host)
|
||||
return "", errors.New(localizer.T("redirect_domain_not_allowed"))
|
||||
}
|
||||
|
||||
redir := proto + "://" + host + uri
|
||||
@@ -290,6 +294,8 @@ func (s *Server) ServeHTTPNext(w http.ResponseWriter, r *http.Request) {
|
||||
hostMismatch := r.URL.Host != "" && urlParsed.Host != r.URL.Host
|
||||
|
||||
if hostNotAllowed || hostMismatch {
|
||||
lg := internal.GetRequestLogger(s.logger, r)
|
||||
lg.Debug("domain not allowed", "domain", urlParsed.Host)
|
||||
s.respondWithStatus(w, r, localizer.T("redirect_domain_not_allowed"), http.StatusBadRequest)
|
||||
return
|
||||
}
|
||||
|
||||
@@ -61,5 +61,6 @@
|
||||
"js_iterations": "iterací",
|
||||
"js_finished_reading": "Čtení dokončeno, pokračovat →",
|
||||
"js_calculation_error": "Chyba výpočtu!",
|
||||
"js_calculation_error_msg": "Nepodařilo se vypočítat výzvu:"
|
||||
"js_calculation_error_msg": "Nepodařilo se vypočítat výzvu:",
|
||||
"missing_required_forwarded_headers": "Chybějící požadované hlavičky X-Forwarded-*"
|
||||
}
|
||||
@@ -61,5 +61,6 @@
|
||||
"js_finished_reading": "Fertig gelesen, weiter zur Seite →",
|
||||
"js_calculation_error": "Berechnung fehlgeschlagen!",
|
||||
"js_calculation_error_msg": "Fehler bei der Berechnung der Prüfung:",
|
||||
"missing_required_forwarded_headers": "Fehlende erforderliche X-Forwarded-* Header",
|
||||
"simplified_explanation": "Dies ist eine Maßnahme gegen Bots und bösartige Anfragen, ähnlich einem CAPTCHA. Anstatt jedoch selbst arbeiten zu müssen, erhält Ihr Browser eine Berechnungsaufgabe, die er lösen muss, um sicherzustellen, dass es sich um einen gültigen Client handelt. Dieses Konzept wird als <a href=\"https://en.wikipedia.org/wiki/Proof_of_work\">Proof of Work</a> bezeichnet. Die Aufgabe wird in wenigen Sekunden berechnet und Sie erhalten Zugriff auf die Website. Vielen Dank für Ihr Verständnis und Ihre Geduld."
|
||||
}
|
||||
@@ -36,6 +36,7 @@
|
||||
"invalid_redirect": "Invalid redirect",
|
||||
"redirect_not_parseable": "Redirect URL not parseable",
|
||||
"redirect_domain_not_allowed": "Redirect domain not allowed",
|
||||
"missing_required_forwarded_headers": "Missing required X-Forwarded-* headers",
|
||||
"failed_to_sign_jwt": "failed to sign JWT",
|
||||
"invalid_invocation": "Invalid invocation of MakeChallenge",
|
||||
"client_error_browser": "Client Error: Please ensure your browser is up to date and try again later.",
|
||||
|
||||
@@ -61,5 +61,6 @@
|
||||
"js_finished_reading": "He terminado de leer, continuar →",
|
||||
"js_calculation_error": "¡Error de cálculo!",
|
||||
"js_calculation_error_msg": "Falló al calcular el desafío:",
|
||||
"missing_required_forwarded_headers": "Faltan los encabezados X-Forwarded-* requeridos",
|
||||
"simplified_explanation": "Esta es una medida contra bots y solicitudes maliciosas similar a un CAPTCHA. Sin embargo, en lugar de tener que hacer el trabajo usted mismo, a su navegador se le asigna una tarea de cálculo que debe resolver para garantizar que es un cliente válido. Este concepto se llama <a href=\"https://en.wikipedia.org/wiki/Proof_of_work\">Prueba de trabajo</a>. La tarea se calcula en unos segundos y se le concede acceso al sitio web. Gracias por su comprensión y paciencia."
|
||||
}
|
||||
@@ -61,5 +61,6 @@
|
||||
"js_finished_reading": "Lugesin ära, edasi →",
|
||||
"js_calculation_error": "Arvutamise viga!",
|
||||
"js_calculation_error_msg": "Ei suutnud kontrolli arvutada:",
|
||||
"missing_required_forwarded_headers": "Puuduvad nõutud X-Forwarded-* päised",
|
||||
"simplified_explanation": "See on meede robotite ja pahatahtlike päringute vastu, mis sarnaneb CAPTCHA-le. Kuid selle asemel, et peaksite ise tööd tegema, antakse teie brauserile arvutusülesanne, mille see peab lahendama, et tagada selle kehtivus kliendina. Seda kontseptsiooni nimetatakse <a href=\"https://en.wikipedia.org/wiki/Proof_of_work\">Töötõendiks</a>. Ülesanne arvutatakse mõne sekundiga ja teile antakse juurdepääs veebisaidile. Täname teid mõistva suhtumise ja kannatlikkuse eest."
|
||||
}
|
||||
@@ -61,5 +61,6 @@
|
||||
"js_finished_reading": "Luettu, jatka →",
|
||||
"js_calculation_error": "Laskentavirhe!",
|
||||
"js_calculation_error_msg": "Haasteen laskenta ei onnistunut:",
|
||||
"missing_required_forwarded_headers": "Puuttuvat vaaditut X-Forwarded-* otsikot",
|
||||
"simplified_explanation": "Tämä on toimenpide botteja ja haitallisia pyyntöjä vastaan, joka on samanlainen kuin CAPTCHA. Sen sijaan, että joutuisit tekemään työtä itse, selaimesi saa laskentatehtävän, joka sen on ratkaistava varmistaakseen, että se on kelvollinen asiakas. Tätä käsitettä kutsutaan nimellä <a href=\"https://en.wikipedia.org/wiki/Proof_of_work\">Työtodistus</a>. Tehtävä lasketaan muutamassa sekunnissa ja saat pääsyn verkkosivustolle. Kiitos ymmärryksestäsi ja kärsivällisyydestäsi."
|
||||
}
|
||||
@@ -61,5 +61,6 @@
|
||||
"js_finished_reading": "Tapos na akong magbasa, magpatuloy →",
|
||||
"js_calculation_error": "Error sa pagkalkula!",
|
||||
"js_calculation_error_msg": "Nabigong ikalkula ang hamon:",
|
||||
"missing_required_forwarded_headers": "Nawawala ang kinakailangang X-Forwarded-* na mga header",
|
||||
"simplified_explanation": "Ito ay isang panukala laban sa mga bot at malisyosong mga kahilingan na katulad ng isang CAPTCHA. Gayunpaman, sa halip na ikaw mismo ang gumawa ng trabaho, binibigyan ang iyong browser ng isang gawain sa pagkalkula na kailangan nitong lutasin upang matiyak na ito ay isang wastong kliyente. Ang konseptong ito ay tinatawag na <a href=\"https://en.wikipedia.org/wiki/Proof_of_work\">Proof of Work</a>. Ang gawain ay kinakalkula sa loob ng ilang segundo at binibigyan ka ng access sa website. Salamat sa iyong pag-unawa at pasensya."
|
||||
}
|
||||
|
||||
@@ -61,5 +61,6 @@
|
||||
"js_finished_reading": "J'ai fini de lire, continuer →",
|
||||
"js_calculation_error": "Erreur de calcul !",
|
||||
"js_calculation_error_msg": "Échec du calcul du défi :",
|
||||
"missing_required_forwarded_headers": "En-têtes X-Forwarded-* requis manquants",
|
||||
"simplified_explanation": "Il s'agit d'une mesure contre les robots et les requêtes malveillantes similaire à un CAPTCHA. Cependant, au lieu d'avoir à faire le travail vous-même, votre navigateur se voit confier une tâche de calcul qu'il doit résoudre pour s'assurer qu'il est un client valide. Ce concept s'appelle <a href=\"https://en.wikipedia.org/wiki/Proof_of_work\">Preuve de travail</a>. La tâche est calculée en quelques secondes et vous avez accès au site Web. Merci de votre compréhension et de votre patience."
|
||||
}
|
||||
@@ -61,5 +61,6 @@
|
||||
"js_finished_reading": "Ég hef lokið lestrinum, höldum áfram →",
|
||||
"js_calculation_error": "Reiknivilla!",
|
||||
"js_calculation_error_msg": "Mistókst að reikna áskorun:",
|
||||
"missing_required_forwarded_headers": "Vantar nauðsynleg X-Forwarded-* hausar",
|
||||
"simplified_explanation": "Þetta er ráðstöfun gegn vélmennum og illgjarnum beiðnum svipað og CAPTCHA. Hins vegar, í stað þess að þurfa að vinna sjálfur, fær vafrinn þinn útreikningsverkefni sem hann þarf að leysa til að tryggja að hann sé gildur biðlari. Þetta hugtak er kallað <a href=\"https://en.wikipedia.org/wiki/Proof_of_work\">Sönnun-á-vinnu</a>. Verkefnið er reiknað á nokkrum sekúndum og þú færð aðgang að vefsíðunni. Takk fyrir skilninginn og þolinmæðina."
|
||||
}
|
||||
|
||||
@@ -61,5 +61,6 @@
|
||||
"js_finished_reading": "Ho finito di leggere, continua →",
|
||||
"js_calculation_error": "Errore nel calcolo!",
|
||||
"js_calculation_error_msg": "Impossibile superare il test:",
|
||||
"missing_required_forwarded_headers": "Mancano gli header X-Forwarded-* richiesti",
|
||||
"simplified_explanation": "Questa è una misura contro bot e richieste dannose simile a un CAPTCHA. Tuttavia, invece di dover lavorare tu stesso, al tuo browser viene assegnato un compito di calcolo che deve risolvere per garantire che sia un client valido. Questo concetto è chiamato <a href=\"https://en.wikipedia.org/wiki/Proof_of_work\">Proof of Work</a>. Il compito viene calcolato in pochi secondi e ti viene concesso l'accesso al sito web. Grazie per la tua comprensione e pazienza."
|
||||
}
|
||||
@@ -61,5 +61,6 @@
|
||||
"js_finished_reading": "読み終わりました。続行 →",
|
||||
"js_calculation_error": "計算エラー!",
|
||||
"js_calculation_error_msg": "チャレンジの計算に失敗しました:",
|
||||
"missing_required_forwarded_headers": "必要な X-Forwarded-* ヘッダーがありません",
|
||||
"simplified_explanation": "これは、CAPTCHAと同様の、ボットや悪意のあるリクエストに対する対策です。ただし、自分で作業する代わりに、ブラウザに計算タスクが与えられ、それを解決して有効なクライアントであることを確認する必要があります。この概念は<a href=\"https://en.wikipedia.org/wiki/Proof_of_work\">Proof of Work</a>と呼ばれます。タスクは数秒で計算され、ウェブサイトへのアクセスが許可されます。ご理解とご協力をお願いいたします。"
|
||||
}
|
||||
@@ -61,5 +61,6 @@
|
||||
"js_finished_reading": "Jeg har sluttet å lese, fortsett →",
|
||||
"js_calculation_error": "Beregningsfeil!",
|
||||
"js_calculation_error_msg": "Mislyktes i å beregne utfordring:",
|
||||
"missing_required_forwarded_headers": "Mangler nødvendige X-Forwarded-* header",
|
||||
"simplified_explanation": "Dette er et tiltak mot roboter og ondsinnede forespørsler som ligner på en CAPTCHA. Men i stedet for å måtte gjøre arbeidet selv, får nettleseren din en beregningsoppgave som den må løse for å sikre at den er en gyldig klient. Dette konseptet kalles <a href=\"https://en.wikipedia.org/wiki/Proof_of_work\">Proof of Work</a>. Oppgaven beregnes på noen få sekunder, og du får tilgang til nettstedet. Takk for din forståelse og tålmodighet."
|
||||
}
|
||||
@@ -61,5 +61,6 @@
|
||||
"js_finished_reading": "Ik ben klaar met lezen, ga verder →",
|
||||
"js_calculation_error": "Rekenfout!",
|
||||
"js_calculation_error_msg": "Uitdaging niet berekend:",
|
||||
"missing_required_forwarded_headers": "Ontbrekende vereiste X-Forwarded-* headers",
|
||||
"simplified_explanation": "Dit is een maatregel tegen bots en kwaadwillende verzoeken, vergelijkbaar met een CAPTCHA. In plaats van dat u zelf werk moet verrichten, krijgt uw browser een rekentaak die hij moet oplossen om ervoor te zorgen dat het een geldige client is. Dit concept wordt <a href=\"https://en.wikipedia.org/wiki/Proof_of_work\">Proof of Work</a> genoemd. De taak wordt in een paar seconden berekend en u krijgt toegang tot de website. Bedankt voor uw begrip en geduld."
|
||||
}
|
||||
|
||||
@@ -61,5 +61,6 @@
|
||||
"js_finished_reading": "Eg har slutta å lesa, hald fram →",
|
||||
"js_calculation_error": "Rekningsfeil!",
|
||||
"js_calculation_error_msg": "Mislukkast i å rekne utfordring:",
|
||||
"missing_required_forwarded_headers": "Manglende nødvendige X-Forwarded-* headers",
|
||||
"simplified_explanation": "Dette er eit tiltak mot robotar og vondsinna førespurnader som liknar på ein CAPTCHA. Men i staden for å måtte gjere arbeidet sjølv, får nettlesaren din ei utrekningsoppgåve som han må løyse for å sikre at han er ein gyldig klient. Dette konseptet blir kalla <a href=\"https://en.wikipedia.org/wiki/Proof_of_work\">Arbeidsbevis</a>. Oppgåva blir rekna ut på nokre få sekund, og du får tilgang til nettstaden. Takk for di forståing og tålmod."
|
||||
}
|
||||
@@ -61,5 +61,6 @@
|
||||
"js_finished_reading": "Terminei de ler, continue →",
|
||||
"js_calculation_error": "Erro de cálculo!",
|
||||
"js_calculation_error_msg": "Falha ao calcular a validação:",
|
||||
"missing_required_forwarded_headers": "Faltam os cabeçalhos X-Forwarded-* obrigatórios",
|
||||
"simplified_explanation": "Esta é uma medida contra bots e solicitações maliciosas, semelhante a um CAPTCHA. No entanto, em vez de você mesmo ter que fazer o trabalho, seu navegador recebe uma tarefa de cálculo que ele deve resolver para garantir que seja um cliente válido. Esse conceito é chamado de <a href=\"https://en.wikipedia.org/wiki/Proof_of_work\">Prova de Trabalho</a>. A tarefa é calculada em poucos segundos e você tem acesso ao site. Obrigado pela sua compreensão e paciência."
|
||||
}
|
||||
|
||||
@@ -61,5 +61,6 @@
|
||||
"js_finished_reading": "Я дочитал, продолжить →",
|
||||
"js_calculation_error": "Ошибка расчёта!",
|
||||
"js_calculation_error_msg": "Не удалось рассчитать задачу:",
|
||||
"missing_required_forwarded_headers": "Отсутствуют требуемые заголовки X-Forwarded-*",
|
||||
"simplified_explanation": "Это мера против ботов и вредоносных запросов, аналогичная CAPTCHA. Однако вместо того, чтобы вам приходилось работать самостоятельно, вашему браузеру дается задача вычисления, которую он должен решить, чтобы убедиться, что он является действительным клиентом. Эта концепция называется <a href=\"https://en.wikipedia.org/wiki/Proof_of_work\">Доказательство выполнения работы</a>. Задача рассчитывается за несколько секунд, и вам предоставляется доступ к веб-сайту. Спасибо за понимание и терпение."
|
||||
}
|
||||
@@ -61,5 +61,6 @@
|
||||
"js_finished_reading": "Jag har läst klart, fortsätt →",
|
||||
"js_calculation_error": "Beräkningsfel!",
|
||||
"js_calculation_error_msg": "Misslyckades att kalkylera utmaning:",
|
||||
"missing_required_forwarded_headers": "Saknar nödvändiga X-Forwarded-* headers",
|
||||
"simplified_explanation": "Detta är en åtgärd mot botar och skadliga förfrågningar som liknar en CAPTCHA. Men i stället för att du själv måste göra jobbet får din webbläsare en beräkningsuppgift som den måste lösa för att säkerställa att den är en giltig klient. Detta koncept kallas <a href=\"https://en.wikipedia.org/wiki/Proof_of_work\">Arbetsbevis</a>. Uppgiften beräknas på några sekunder och du beviljas tillgång till webbplatsen. Tack för din förståelse och ditt tålamod."
|
||||
}
|
||||
@@ -61,5 +61,6 @@
|
||||
"js_finished_reading": "Okumayı bitirdim, devam et →",
|
||||
"js_calculation_error": "Hesaplama hatası!",
|
||||
"js_calculation_error_msg": "Zorluk hesaplaması başarısız oldu:",
|
||||
"missing_required_forwarded_headers": "Gerekli X-Forwarded-* başlıkları eksik",
|
||||
"simplified_explanation": "Bu, botlara ve kötü niyetli isteklere karşı CAPTCHA'ya benzer bir önlemdir. Ancak, kendiniz çalışmak yerine, tarayıcınıza geçerli bir istemci olduğundan emin olmak için çözmesi gereken bir hesaplama görevi verilir. Bu kavrama <a href=\"https://en.wikipedia.org/wiki/Proof_of_work\">İş Kanıtı</a> denir. Görev birkaç saniye içinde hesaplanır ve web sitesine erişim hakkı kazanırsınız. Anlayışınız ve sabrınız için teşekkür ederiz."
|
||||
}
|
||||
|
||||
@@ -61,5 +61,6 @@
|
||||
"js_finished_reading": "我读完了,继续 →",
|
||||
"js_calculation_error": "计算错误!",
|
||||
"js_calculation_error_msg": "计算挑战失败:",
|
||||
"missing_required_forwarded_headers": "缺少必要的 X-Forwarded-* 头",
|
||||
"simplified_explanation": "这是一种类似于验证码的措施,用于防止机器人和恶意请求。但是,您无需自己动手,您的浏览器会收到一个计算任务,必须解决该任务以确保它是有效的客户端。这个概念称为<a href=\"https://en.wikipedia.org/wiki/Proof_of_work\">工作量证明</a>。该任务在几秒钟内计算完毕,您将被授予访问网站的权限。感谢您的理解和耐心。"
|
||||
}
|
||||
|
||||
@@ -61,5 +61,6 @@
|
||||
"js_finished_reading": "我讀完了,繼續 →",
|
||||
"js_calculation_error": "計算錯誤!",
|
||||
"js_calculation_error_msg": "計算挑戰失敗:",
|
||||
"missing_required_forwarded_headers": "缺少必要的 X-Forwarded-* 標頭",
|
||||
"simplified_explanation": "這是一種類似於驗證碼的措施,用於防止機器人和惡意請求。但是,您無需自己動手,您的瀏覽器會收到一個計算任務,必須解決該任務以確保它是有效的客戶端。這個概念稱為<a href=\"https://en.wikipedia.org/wiki/Proof_of_work\">工作量證明</a>。該任務在幾秒鐘內計算完畢,您將被授予訪問網站的權限。感謝您的理解和耐心。"
|
||||
}
|
||||
@@ -102,6 +102,13 @@ func NewPathChecker(rexStr string) (checker.Impl, error) {
|
||||
}
|
||||
|
||||
func (pc *PathChecker) Check(r *http.Request) (bool, error) {
|
||||
originalUrl := r.Header.Get("X-Original-URI")
|
||||
if originalUrl != "" {
|
||||
if pc.regexp.MatchString(originalUrl) {
|
||||
return true, nil
|
||||
}
|
||||
}
|
||||
|
||||
if pc.regexp.MatchString(r.URL.Path) {
|
||||
return true, nil
|
||||
}
|
||||
|
||||
@@ -198,3 +198,96 @@ func TestHeaderExistsChecker(t *testing.T) {
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func TestPathChecker_XOriginalURI(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
regex string
|
||||
xOriginalURI string
|
||||
urlPath string
|
||||
headerKey string
|
||||
expectedMatch bool
|
||||
expectError bool
|
||||
}{
|
||||
{
|
||||
name: "X-Original-URI matches regex (with trailing space - current typo)",
|
||||
regex: "^/api/.*",
|
||||
xOriginalURI: "/api/users",
|
||||
urlPath: "/different/path",
|
||||
headerKey: "X-Original-URI",
|
||||
expectedMatch: true,
|
||||
expectError: false,
|
||||
},
|
||||
{
|
||||
name: "X-Original-URI doesn't match, falls back to URL.Path",
|
||||
regex: "^/admin/.*",
|
||||
xOriginalURI: "/api/users",
|
||||
urlPath: "/admin/dashboard",
|
||||
headerKey: "X-Original-URI",
|
||||
expectedMatch: true,
|
||||
expectError: false,
|
||||
},
|
||||
{
|
||||
name: "Neither X-Original-URI nor URL.Path match",
|
||||
regex: "^/admin/.*",
|
||||
xOriginalURI: "/api/users",
|
||||
urlPath: "/public/info",
|
||||
headerKey: "X-Original-URI ",
|
||||
expectedMatch: false,
|
||||
expectError: false,
|
||||
},
|
||||
{
|
||||
name: "Empty X-Original-URI, URL.Path matches",
|
||||
regex: "^/static/.*",
|
||||
xOriginalURI: "",
|
||||
urlPath: "/static/css/style.css",
|
||||
headerKey: "X-Original-URI",
|
||||
expectedMatch: true,
|
||||
expectError: false,
|
||||
},
|
||||
{
|
||||
name: "Complex regex matching X-Original-URI",
|
||||
regex: `^/api/v[0-9]+/(users|posts)/[0-9]+$`,
|
||||
xOriginalURI: "/api/v1/users/123",
|
||||
urlPath: "/different",
|
||||
headerKey: "X-Original-URI",
|
||||
expectedMatch: true,
|
||||
expectError: false,
|
||||
},
|
||||
}
|
||||
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
// Create the PathChecker
|
||||
pc, err := NewPathChecker(tt.regex)
|
||||
if err != nil {
|
||||
if !tt.expectError {
|
||||
t.Fatalf("NewPathChecker() unexpected error: %v", err)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
if tt.expectError {
|
||||
t.Fatal("NewPathChecker() expected error but got none")
|
||||
}
|
||||
|
||||
req, err := http.NewRequest("GET", "http://example.com"+tt.urlPath, nil)
|
||||
if err != nil {
|
||||
t.Fatalf("Failed to create request: %v", err)
|
||||
}
|
||||
|
||||
if tt.xOriginalURI != "" {
|
||||
req.Header.Set(tt.headerKey, tt.xOriginalURI)
|
||||
}
|
||||
|
||||
match, err := pc.Check(req)
|
||||
if err != nil {
|
||||
t.Fatalf("Check() unexpected error: %v", err)
|
||||
}
|
||||
|
||||
if match != tt.expectedMatch {
|
||||
t.Errorf("Check() = %v, want %v", match, tt.expectedMatch)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
254
package-lock.json
generated
254
package-lock.json
generated
@@ -1,21 +1,21 @@
|
||||
{
|
||||
"name": "@techaro/anubis",
|
||||
"version": "1.21.3",
|
||||
"version": "1.22.0-pre1",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@techaro/anubis",
|
||||
"version": "1.21.3",
|
||||
"version": "1.22.0-pre1",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@aws-crypto/sha256-js": "^5.2.0",
|
||||
"preact": "^10.27.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"cssnano": "^7.1.0",
|
||||
"cssnano-preset-advanced": "^7.0.8",
|
||||
"esbuild": "^0.25.8",
|
||||
"cssnano": "^7.1.1",
|
||||
"cssnano-preset-advanced": "^7.0.9",
|
||||
"esbuild": "^0.25.9",
|
||||
"playwright": "^1.52.0",
|
||||
"postcss-cli": "^11.0.1",
|
||||
"postcss-import": "^16.1.1",
|
||||
@@ -62,9 +62,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/aix-ppc64": {
|
||||
"version": "0.25.8",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.8.tgz",
|
||||
"integrity": "sha512-urAvrUedIqEiFR3FYSLTWQgLu5tb+m0qZw0NBEasUeo6wuqatkMDaRT+1uABiGXEu5vqgPd7FGE1BhsAIy9QVA==",
|
||||
"version": "0.25.9",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.9.tgz",
|
||||
"integrity": "sha512-OaGtL73Jck6pBKjNIe24BnFE6agGl+6KxDtTfHhy1HmhthfKouEcOhqpSL64K4/0WCtbKFLOdzD/44cJ4k9opA==",
|
||||
"cpu": [
|
||||
"ppc64"
|
||||
],
|
||||
@@ -79,9 +79,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/android-arm": {
|
||||
"version": "0.25.8",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.8.tgz",
|
||||
"integrity": "sha512-RONsAvGCz5oWyePVnLdZY/HHwA++nxYWIX1atInlaW6SEkwq6XkP3+cb825EUcRs5Vss/lGh/2YxAb5xqc07Uw==",
|
||||
"version": "0.25.9",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.9.tgz",
|
||||
"integrity": "sha512-5WNI1DaMtxQ7t7B6xa572XMXpHAaI/9Hnhk8lcxF4zVN4xstUgTlvuGDorBguKEnZO70qwEcLpfifMLoxiPqHQ==",
|
||||
"cpu": [
|
||||
"arm"
|
||||
],
|
||||
@@ -96,9 +96,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/android-arm64": {
|
||||
"version": "0.25.8",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.8.tgz",
|
||||
"integrity": "sha512-OD3p7LYzWpLhZEyATcTSJ67qB5D+20vbtr6vHlHWSQYhKtzUYrETuWThmzFpZtFsBIxRvhO07+UgVA9m0i/O1w==",
|
||||
"version": "0.25.9",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.9.tgz",
|
||||
"integrity": "sha512-IDrddSmpSv51ftWslJMvl3Q2ZT98fUSL2/rlUXuVqRXHCs5EUF1/f+jbjF5+NG9UffUDMCiTyh8iec7u8RlTLg==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -113,9 +113,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/android-x64": {
|
||||
"version": "0.25.8",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.8.tgz",
|
||||
"integrity": "sha512-yJAVPklM5+4+9dTeKwHOaA+LQkmrKFX96BM0A/2zQrbS6ENCmxc4OVoBs5dPkCCak2roAD+jKCdnmOqKszPkjA==",
|
||||
"version": "0.25.9",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.9.tgz",
|
||||
"integrity": "sha512-I853iMZ1hWZdNllhVZKm34f4wErd4lMyeV7BLzEExGEIZYsOzqDWDf+y082izYUE8gtJnYHdeDpN/6tUdwvfiw==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -130,9 +130,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/darwin-arm64": {
|
||||
"version": "0.25.8",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.8.tgz",
|
||||
"integrity": "sha512-Jw0mxgIaYX6R8ODrdkLLPwBqHTtYHJSmzzd+QeytSugzQ0Vg4c5rDky5VgkoowbZQahCbsv1rT1KW72MPIkevw==",
|
||||
"version": "0.25.9",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.9.tgz",
|
||||
"integrity": "sha512-XIpIDMAjOELi/9PB30vEbVMs3GV1v2zkkPnuyRRURbhqjyzIINwj+nbQATh4H9GxUgH1kFsEyQMxwiLFKUS6Rg==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -147,9 +147,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/darwin-x64": {
|
||||
"version": "0.25.8",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.8.tgz",
|
||||
"integrity": "sha512-Vh2gLxxHnuoQ+GjPNvDSDRpoBCUzY4Pu0kBqMBDlK4fuWbKgGtmDIeEC081xi26PPjn+1tct+Bh8FjyLlw1Zlg==",
|
||||
"version": "0.25.9",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.9.tgz",
|
||||
"integrity": "sha512-jhHfBzjYTA1IQu8VyrjCX4ApJDnH+ez+IYVEoJHeqJm9VhG9Dh2BYaJritkYK3vMaXrf7Ogr/0MQ8/MeIefsPQ==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -164,9 +164,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/freebsd-arm64": {
|
||||
"version": "0.25.8",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.8.tgz",
|
||||
"integrity": "sha512-YPJ7hDQ9DnNe5vxOm6jaie9QsTwcKedPvizTVlqWG9GBSq+BuyWEDazlGaDTC5NGU4QJd666V0yqCBL2oWKPfA==",
|
||||
"version": "0.25.9",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.9.tgz",
|
||||
"integrity": "sha512-z93DmbnY6fX9+KdD4Ue/H6sYs+bhFQJNCPZsi4XWJoYblUqT06MQUdBCpcSfuiN72AbqeBFu5LVQTjfXDE2A6Q==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -181,9 +181,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/freebsd-x64": {
|
||||
"version": "0.25.8",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.8.tgz",
|
||||
"integrity": "sha512-MmaEXxQRdXNFsRN/KcIimLnSJrk2r5H8v+WVafRWz5xdSVmWLoITZQXcgehI2ZE6gioE6HirAEToM/RvFBeuhw==",
|
||||
"version": "0.25.9",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.9.tgz",
|
||||
"integrity": "sha512-mrKX6H/vOyo5v71YfXWJxLVxgy1kyt1MQaD8wZJgJfG4gq4DpQGpgTB74e5yBeQdyMTbgxp0YtNj7NuHN0PoZg==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -198,9 +198,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/linux-arm": {
|
||||
"version": "0.25.8",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.8.tgz",
|
||||
"integrity": "sha512-FuzEP9BixzZohl1kLf76KEVOsxtIBFwCaLupVuk4eFVnOZfU+Wsn+x5Ryam7nILV2pkq2TqQM9EZPsOBuMC+kg==",
|
||||
"version": "0.25.9",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.9.tgz",
|
||||
"integrity": "sha512-HBU2Xv78SMgaydBmdor38lg8YDnFKSARg1Q6AT0/y2ezUAKiZvc211RDFHlEZRFNRVhcMamiToo7bDx3VEOYQw==",
|
||||
"cpu": [
|
||||
"arm"
|
||||
],
|
||||
@@ -215,9 +215,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/linux-arm64": {
|
||||
"version": "0.25.8",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.8.tgz",
|
||||
"integrity": "sha512-WIgg00ARWv/uYLU7lsuDK00d/hHSfES5BzdWAdAig1ioV5kaFNrtK8EqGcUBJhYqotlUByUKz5Qo6u8tt7iD/w==",
|
||||
"version": "0.25.9",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.9.tgz",
|
||||
"integrity": "sha512-BlB7bIcLT3G26urh5Dmse7fiLmLXnRlopw4s8DalgZ8ef79Jj4aUcYbk90g8iCa2467HX8SAIidbL7gsqXHdRw==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -232,9 +232,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/linux-ia32": {
|
||||
"version": "0.25.8",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.8.tgz",
|
||||
"integrity": "sha512-A1D9YzRX1i+1AJZuFFUMP1E9fMaYY+GnSQil9Tlw05utlE86EKTUA7RjwHDkEitmLYiFsRd9HwKBPEftNdBfjg==",
|
||||
"version": "0.25.9",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.9.tgz",
|
||||
"integrity": "sha512-e7S3MOJPZGp2QW6AK6+Ly81rC7oOSerQ+P8L0ta4FhVi+/j/v2yZzx5CqqDaWjtPFfYz21Vi1S0auHrap3Ma3A==",
|
||||
"cpu": [
|
||||
"ia32"
|
||||
],
|
||||
@@ -249,9 +249,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/linux-loong64": {
|
||||
"version": "0.25.8",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.8.tgz",
|
||||
"integrity": "sha512-O7k1J/dwHkY1RMVvglFHl1HzutGEFFZ3kNiDMSOyUrB7WcoHGf96Sh+64nTRT26l3GMbCW01Ekh/ThKM5iI7hQ==",
|
||||
"version": "0.25.9",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.9.tgz",
|
||||
"integrity": "sha512-Sbe10Bnn0oUAB2AalYztvGcK+o6YFFA/9829PhOCUS9vkJElXGdphz0A3DbMdP8gmKkqPmPcMJmJOrI3VYB1JQ==",
|
||||
"cpu": [
|
||||
"loong64"
|
||||
],
|
||||
@@ -266,9 +266,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/linux-mips64el": {
|
||||
"version": "0.25.8",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.8.tgz",
|
||||
"integrity": "sha512-uv+dqfRazte3BzfMp8PAQXmdGHQt2oC/y2ovwpTteqrMx2lwaksiFZ/bdkXJC19ttTvNXBuWH53zy/aTj1FgGw==",
|
||||
"version": "0.25.9",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.9.tgz",
|
||||
"integrity": "sha512-YcM5br0mVyZw2jcQeLIkhWtKPeVfAerES5PvOzaDxVtIyZ2NUBZKNLjC5z3/fUlDgT6w89VsxP2qzNipOaaDyA==",
|
||||
"cpu": [
|
||||
"mips64el"
|
||||
],
|
||||
@@ -283,9 +283,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/linux-ppc64": {
|
||||
"version": "0.25.8",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.8.tgz",
|
||||
"integrity": "sha512-GyG0KcMi1GBavP5JgAkkstMGyMholMDybAf8wF5A70CALlDM2p/f7YFE7H92eDeH/VBtFJA5MT4nRPDGg4JuzQ==",
|
||||
"version": "0.25.9",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.9.tgz",
|
||||
"integrity": "sha512-++0HQvasdo20JytyDpFvQtNrEsAgNG2CY1CLMwGXfFTKGBGQT3bOeLSYE2l1fYdvML5KUuwn9Z8L1EWe2tzs1w==",
|
||||
"cpu": [
|
||||
"ppc64"
|
||||
],
|
||||
@@ -300,9 +300,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/linux-riscv64": {
|
||||
"version": "0.25.8",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.8.tgz",
|
||||
"integrity": "sha512-rAqDYFv3yzMrq7GIcen3XP7TUEG/4LK86LUPMIz6RT8A6pRIDn0sDcvjudVZBiiTcZCY9y2SgYX2lgK3AF+1eg==",
|
||||
"version": "0.25.9",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.9.tgz",
|
||||
"integrity": "sha512-uNIBa279Y3fkjV+2cUjx36xkx7eSjb8IvnL01eXUKXez/CBHNRw5ekCGMPM0BcmqBxBcdgUWuUXmVWwm4CH9kg==",
|
||||
"cpu": [
|
||||
"riscv64"
|
||||
],
|
||||
@@ -317,9 +317,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/linux-s390x": {
|
||||
"version": "0.25.8",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.8.tgz",
|
||||
"integrity": "sha512-Xutvh6VjlbcHpsIIbwY8GVRbwoviWT19tFhgdA7DlenLGC/mbc3lBoVb7jxj9Z+eyGqvcnSyIltYUrkKzWqSvg==",
|
||||
"version": "0.25.9",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.9.tgz",
|
||||
"integrity": "sha512-Mfiphvp3MjC/lctb+7D287Xw1DGzqJPb/J2aHHcHxflUo+8tmN/6d4k6I2yFR7BVo5/g7x2Monq4+Yew0EHRIA==",
|
||||
"cpu": [
|
||||
"s390x"
|
||||
],
|
||||
@@ -334,9 +334,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/linux-x64": {
|
||||
"version": "0.25.8",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.8.tgz",
|
||||
"integrity": "sha512-ASFQhgY4ElXh3nDcOMTkQero4b1lgubskNlhIfJrsH5OKZXDpUAKBlNS0Kx81jwOBp+HCeZqmoJuihTv57/jvQ==",
|
||||
"version": "0.25.9",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.9.tgz",
|
||||
"integrity": "sha512-iSwByxzRe48YVkmpbgoxVzn76BXjlYFXC7NvLYq+b+kDjyyk30J0JY47DIn8z1MO3K0oSl9fZoRmZPQI4Hklzg==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -351,9 +351,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/netbsd-arm64": {
|
||||
"version": "0.25.8",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.8.tgz",
|
||||
"integrity": "sha512-d1KfruIeohqAi6SA+gENMuObDbEjn22olAR7egqnkCD9DGBG0wsEARotkLgXDu6c4ncgWTZJtN5vcgxzWRMzcw==",
|
||||
"version": "0.25.9",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.9.tgz",
|
||||
"integrity": "sha512-9jNJl6FqaUG+COdQMjSCGW4QiMHH88xWbvZ+kRVblZsWrkXlABuGdFJ1E9L7HK+T0Yqd4akKNa/lO0+jDxQD4Q==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -368,9 +368,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/netbsd-x64": {
|
||||
"version": "0.25.8",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.8.tgz",
|
||||
"integrity": "sha512-nVDCkrvx2ua+XQNyfrujIG38+YGyuy2Ru9kKVNyh5jAys6n+l44tTtToqHjino2My8VAY6Lw9H7RI73XFi66Cg==",
|
||||
"version": "0.25.9",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.9.tgz",
|
||||
"integrity": "sha512-RLLdkflmqRG8KanPGOU7Rpg829ZHu8nFy5Pqdi9U01VYtG9Y0zOG6Vr2z4/S+/3zIyOxiK6cCeYNWOFR9QP87g==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -385,9 +385,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/openbsd-arm64": {
|
||||
"version": "0.25.8",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.8.tgz",
|
||||
"integrity": "sha512-j8HgrDuSJFAujkivSMSfPQSAa5Fxbvk4rgNAS5i3K+r8s1X0p1uOO2Hl2xNsGFppOeHOLAVgYwDVlmxhq5h+SQ==",
|
||||
"version": "0.25.9",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.9.tgz",
|
||||
"integrity": "sha512-YaFBlPGeDasft5IIM+CQAhJAqS3St3nJzDEgsgFixcfZeyGPCd6eJBWzke5piZuZ7CtL656eOSYKk4Ls2C0FRQ==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -402,9 +402,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/openbsd-x64": {
|
||||
"version": "0.25.8",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.8.tgz",
|
||||
"integrity": "sha512-1h8MUAwa0VhNCDp6Af0HToI2TJFAn1uqT9Al6DJVzdIBAd21m/G0Yfc77KDM3uF3T/YaOgQq3qTJHPbTOInaIQ==",
|
||||
"version": "0.25.9",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.9.tgz",
|
||||
"integrity": "sha512-1MkgTCuvMGWuqVtAvkpkXFmtL8XhWy+j4jaSO2wxfJtilVCi0ZE37b8uOdMItIHz4I6z1bWWtEX4CJwcKYLcuA==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -419,9 +419,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/openharmony-arm64": {
|
||||
"version": "0.25.8",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.25.8.tgz",
|
||||
"integrity": "sha512-r2nVa5SIK9tSWd0kJd9HCffnDHKchTGikb//9c7HX+r+wHYCpQrSgxhlY6KWV1nFo1l4KFbsMlHk+L6fekLsUg==",
|
||||
"version": "0.25.9",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.25.9.tgz",
|
||||
"integrity": "sha512-4Xd0xNiMVXKh6Fa7HEJQbrpP3m3DDn43jKxMjxLLRjWnRsfxjORYJlXPO4JNcXtOyfajXorRKY9NkOpTHptErg==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -436,9 +436,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/sunos-x64": {
|
||||
"version": "0.25.8",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.8.tgz",
|
||||
"integrity": "sha512-zUlaP2S12YhQ2UzUfcCuMDHQFJyKABkAjvO5YSndMiIkMimPmxA+BYSBikWgsRpvyxuRnow4nS5NPnf9fpv41w==",
|
||||
"version": "0.25.9",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.9.tgz",
|
||||
"integrity": "sha512-WjH4s6hzo00nNezhp3wFIAfmGZ8U7KtrJNlFMRKxiI9mxEK1scOMAaa9i4crUtu+tBr+0IN6JCuAcSBJZfnphw==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -453,9 +453,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/win32-arm64": {
|
||||
"version": "0.25.8",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.8.tgz",
|
||||
"integrity": "sha512-YEGFFWESlPva8hGL+zvj2z/SaK+pH0SwOM0Nc/d+rVnW7GSTFlLBGzZkuSU9kFIGIo8q9X3ucpZhu8PDN5A2sQ==",
|
||||
"version": "0.25.9",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.9.tgz",
|
||||
"integrity": "sha512-mGFrVJHmZiRqmP8xFOc6b84/7xa5y5YvR1x8djzXpJBSv/UsNK6aqec+6JDjConTgvvQefdGhFDAs2DLAds6gQ==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
@@ -470,9 +470,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/win32-ia32": {
|
||||
"version": "0.25.8",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.8.tgz",
|
||||
"integrity": "sha512-hiGgGC6KZ5LZz58OL/+qVVoZiuZlUYlYHNAmczOm7bs2oE1XriPFi5ZHHrS8ACpV5EjySrnoCKmcbQMN+ojnHg==",
|
||||
"version": "0.25.9",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.9.tgz",
|
||||
"integrity": "sha512-b33gLVU2k11nVx1OhX3C8QQP6UHQK4ZtN56oFWvVXvz2VkDoe6fbG8TOgHFxEvqeqohmRnIHe5A1+HADk4OQww==",
|
||||
"cpu": [
|
||||
"ia32"
|
||||
],
|
||||
@@ -487,9 +487,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/win32-x64": {
|
||||
"version": "0.25.8",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.8.tgz",
|
||||
"integrity": "sha512-cn3Yr7+OaaZq1c+2pe+8yxC8E144SReCQjN6/2ynubzYjvyqZjTXfQJpAcQpsdJq3My7XADANiYGHoFC69pLQw==",
|
||||
"version": "0.25.9",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.9.tgz",
|
||||
"integrity": "sha512-PPOl1mi6lpLNQxnGoyAfschAodRFYXJ+9fs6WHXz7CSWKbOqiMZsubC+BQsVKuul+3vKLuwTHsS2c2y9EoKwxQ==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
@@ -904,13 +904,13 @@
|
||||
}
|
||||
},
|
||||
"node_modules/cssnano": {
|
||||
"version": "7.1.0",
|
||||
"resolved": "https://registry.npmjs.org/cssnano/-/cssnano-7.1.0.tgz",
|
||||
"integrity": "sha512-Pu3rlKkd0ZtlCUzBrKL1Z4YmhKppjC1H9jo7u1o4qaKqyhvixFgu5qLyNIAOjSTg9DjVPtUqdROq2EfpVMEe+w==",
|
||||
"version": "7.1.1",
|
||||
"resolved": "https://registry.npmjs.org/cssnano/-/cssnano-7.1.1.tgz",
|
||||
"integrity": "sha512-fm4D8ti0dQmFPeF8DXSAA//btEmqCOgAc/9Oa3C1LW94h5usNrJEfrON7b4FkPZgnDEn6OUs5NdxiJZmAtGOpQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"cssnano-preset-default": "^7.0.8",
|
||||
"cssnano-preset-default": "^7.0.9",
|
||||
"lilconfig": "^3.1.3"
|
||||
},
|
||||
"engines": {
|
||||
@@ -925,15 +925,15 @@
|
||||
}
|
||||
},
|
||||
"node_modules/cssnano-preset-advanced": {
|
||||
"version": "7.0.8",
|
||||
"resolved": "https://registry.npmjs.org/cssnano-preset-advanced/-/cssnano-preset-advanced-7.0.8.tgz",
|
||||
"integrity": "sha512-KYw7gH8xmIzTwHefuM/m3lkMz4jn5EbjxZO2RHVsOGvrXCxSjbc0/f/gELWW9ZIgbQdJMCkijEo76gBYGY4S3Q==",
|
||||
"version": "7.0.9",
|
||||
"resolved": "https://registry.npmjs.org/cssnano-preset-advanced/-/cssnano-preset-advanced-7.0.9.tgz",
|
||||
"integrity": "sha512-nczUlcRbMuupYDIjlYTQ6nqWh2AjV1omdf5OkUEKpOqPuRb8CZp/KgpZjD2eelX/sfFh6V/aybfgu7lVJH7Z/w==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"autoprefixer": "^10.4.21",
|
||||
"browserslist": "^4.25.1",
|
||||
"cssnano-preset-default": "^7.0.8",
|
||||
"cssnano-preset-default": "^7.0.9",
|
||||
"postcss-discard-unused": "^7.0.4",
|
||||
"postcss-merge-idents": "^7.0.1",
|
||||
"postcss-reduce-idents": "^7.0.1",
|
||||
@@ -947,9 +947,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/cssnano-preset-default": {
|
||||
"version": "7.0.8",
|
||||
"resolved": "https://registry.npmjs.org/cssnano-preset-default/-/cssnano-preset-default-7.0.8.tgz",
|
||||
"integrity": "sha512-d+3R2qwrUV3g4LEMOjnndognKirBZISylDZAF/TPeCWVjEwlXS2e4eN4ICkoobRe7pD3H6lltinKVyS1AJhdjQ==",
|
||||
"version": "7.0.9",
|
||||
"resolved": "https://registry.npmjs.org/cssnano-preset-default/-/cssnano-preset-default-7.0.9.tgz",
|
||||
"integrity": "sha512-tCD6AAFgYBOVpMBX41KjbvRh9c2uUjLXRyV7KHSIrwHiq5Z9o0TFfUCoM3TwVrRsRteN3sVXGNvjVNxYzkpTsA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
@@ -958,7 +958,7 @@
|
||||
"cssnano-utils": "^5.0.1",
|
||||
"postcss-calc": "^10.1.1",
|
||||
"postcss-colormin": "^7.0.4",
|
||||
"postcss-convert-values": "^7.0.6",
|
||||
"postcss-convert-values": "^7.0.7",
|
||||
"postcss-discard-comments": "^7.0.4",
|
||||
"postcss-discard-duplicates": "^7.0.2",
|
||||
"postcss-discard-empty": "^7.0.1",
|
||||
@@ -1144,9 +1144,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/esbuild": {
|
||||
"version": "0.25.8",
|
||||
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.8.tgz",
|
||||
"integrity": "sha512-vVC0USHGtMi8+R4Kz8rt6JhEWLxsv9Rnu/lGYbPR8u47B+DCBksq9JarW0zOO7bs37hyOK1l2/oqtbciutL5+Q==",
|
||||
"version": "0.25.9",
|
||||
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.9.tgz",
|
||||
"integrity": "sha512-CRbODhYyQx3qp7ZEwzxOk4JBqmD/seJrzPa/cGjY1VtIn5E09Oi9/dB4JwctnfZ8Q8iT7rioVv5k/FNT/uf54g==",
|
||||
"dev": true,
|
||||
"hasInstallScript": true,
|
||||
"license": "MIT",
|
||||
@@ -1157,32 +1157,32 @@
|
||||
"node": ">=18"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@esbuild/aix-ppc64": "0.25.8",
|
||||
"@esbuild/android-arm": "0.25.8",
|
||||
"@esbuild/android-arm64": "0.25.8",
|
||||
"@esbuild/android-x64": "0.25.8",
|
||||
"@esbuild/darwin-arm64": "0.25.8",
|
||||
"@esbuild/darwin-x64": "0.25.8",
|
||||
"@esbuild/freebsd-arm64": "0.25.8",
|
||||
"@esbuild/freebsd-x64": "0.25.8",
|
||||
"@esbuild/linux-arm": "0.25.8",
|
||||
"@esbuild/linux-arm64": "0.25.8",
|
||||
"@esbuild/linux-ia32": "0.25.8",
|
||||
"@esbuild/linux-loong64": "0.25.8",
|
||||
"@esbuild/linux-mips64el": "0.25.8",
|
||||
"@esbuild/linux-ppc64": "0.25.8",
|
||||
"@esbuild/linux-riscv64": "0.25.8",
|
||||
"@esbuild/linux-s390x": "0.25.8",
|
||||
"@esbuild/linux-x64": "0.25.8",
|
||||
"@esbuild/netbsd-arm64": "0.25.8",
|
||||
"@esbuild/netbsd-x64": "0.25.8",
|
||||
"@esbuild/openbsd-arm64": "0.25.8",
|
||||
"@esbuild/openbsd-x64": "0.25.8",
|
||||
"@esbuild/openharmony-arm64": "0.25.8",
|
||||
"@esbuild/sunos-x64": "0.25.8",
|
||||
"@esbuild/win32-arm64": "0.25.8",
|
||||
"@esbuild/win32-ia32": "0.25.8",
|
||||
"@esbuild/win32-x64": "0.25.8"
|
||||
"@esbuild/aix-ppc64": "0.25.9",
|
||||
"@esbuild/android-arm": "0.25.9",
|
||||
"@esbuild/android-arm64": "0.25.9",
|
||||
"@esbuild/android-x64": "0.25.9",
|
||||
"@esbuild/darwin-arm64": "0.25.9",
|
||||
"@esbuild/darwin-x64": "0.25.9",
|
||||
"@esbuild/freebsd-arm64": "0.25.9",
|
||||
"@esbuild/freebsd-x64": "0.25.9",
|
||||
"@esbuild/linux-arm": "0.25.9",
|
||||
"@esbuild/linux-arm64": "0.25.9",
|
||||
"@esbuild/linux-ia32": "0.25.9",
|
||||
"@esbuild/linux-loong64": "0.25.9",
|
||||
"@esbuild/linux-mips64el": "0.25.9",
|
||||
"@esbuild/linux-ppc64": "0.25.9",
|
||||
"@esbuild/linux-riscv64": "0.25.9",
|
||||
"@esbuild/linux-s390x": "0.25.9",
|
||||
"@esbuild/linux-x64": "0.25.9",
|
||||
"@esbuild/netbsd-arm64": "0.25.9",
|
||||
"@esbuild/netbsd-x64": "0.25.9",
|
||||
"@esbuild/openbsd-arm64": "0.25.9",
|
||||
"@esbuild/openbsd-x64": "0.25.9",
|
||||
"@esbuild/openharmony-arm64": "0.25.9",
|
||||
"@esbuild/sunos-x64": "0.25.9",
|
||||
"@esbuild/win32-arm64": "0.25.9",
|
||||
"@esbuild/win32-ia32": "0.25.9",
|
||||
"@esbuild/win32-x64": "0.25.9"
|
||||
}
|
||||
},
|
||||
"node_modules/escalade": {
|
||||
@@ -1719,9 +1719,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/postcss-convert-values": {
|
||||
"version": "7.0.6",
|
||||
"resolved": "https://registry.npmjs.org/postcss-convert-values/-/postcss-convert-values-7.0.6.tgz",
|
||||
"integrity": "sha512-MD/eb39Mr60hvgrqpXsgbiqluawYg/8K4nKsqRsuDX9f+xN1j6awZCUv/5tLH8ak3vYp/EMXwdcnXvfZYiejCQ==",
|
||||
"version": "7.0.7",
|
||||
"resolved": "https://registry.npmjs.org/postcss-convert-values/-/postcss-convert-values-7.0.7.tgz",
|
||||
"integrity": "sha512-HR9DZLN04Xbe6xugRH6lS4ZQH2zm/bFh/ZyRkpedZozhvh+awAfbA0P36InO4fZfDhvYfNJeNvlTf1sjwGbw/A==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
|
||||
10
package.json
10
package.json
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@techaro/anubis",
|
||||
"version": "1.21.3",
|
||||
"version": "1.22.0-pre1",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
@@ -18,9 +18,9 @@
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"devDependencies": {
|
||||
"cssnano": "^7.1.0",
|
||||
"cssnano-preset-advanced": "^7.0.8",
|
||||
"esbuild": "^0.25.8",
|
||||
"cssnano": "^7.1.1",
|
||||
"cssnano-preset-advanced": "^7.0.9",
|
||||
"esbuild": "^0.25.9",
|
||||
"playwright": "^1.52.0",
|
||||
"postcss-cli": "^11.0.1",
|
||||
"postcss-import": "^16.1.1",
|
||||
@@ -31,4 +31,4 @@
|
||||
"@aws-crypto/sha256-js": "^5.2.0",
|
||||
"preact": "^10.27.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -60,6 +60,7 @@ templ base(title string, body templ.Component, impressum *config.Impressum, chal
|
||||
@templ.JSONScript("anubis_version", anubis.Version)
|
||||
@templ.JSONScript("anubis_challenge", challenge)
|
||||
@templ.JSONScript("anubis_base_prefix", anubis.BasePrefix)
|
||||
@templ.JSONScript("anubis_public_url", anubis.PublicUrl)
|
||||
</head>
|
||||
<body id="top">
|
||||
<main>
|
||||
|
||||
66
web/index_templ.go
generated
66
web/index_templ.go
generated
@@ -128,6 +128,10 @@ func base(title string, body templ.Component, impressum *config.Impressum, chall
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = templ.JSONScript("anubis_public_url", anubis.PublicUrl).Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 9, "</head><body id=\"top\"><main><h1 id=\"title\" class=\"centered-div\">")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
@@ -135,7 +139,7 @@ func base(title string, body templ.Component, impressum *config.Impressum, chall
|
||||
var templ_7745c5c3_Var7 string
|
||||
templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(title)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 66, Col: 47}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 67, Col: 47}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -156,7 +160,7 @@ func base(title string, body templ.Component, impressum *config.Impressum, chall
|
||||
var templ_7745c5c3_Var8 string
|
||||
templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(localizer.T("protected_by"))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 71, Col: 36}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 72, Col: 36}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -169,7 +173,7 @@ func base(title string, body templ.Component, impressum *config.Impressum, chall
|
||||
var templ_7745c5c3_Var9 string
|
||||
templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(localizer.T("protected_from"))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 71, Col: 127}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 72, Col: 127}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -182,7 +186,7 @@ func base(title string, body templ.Component, impressum *config.Impressum, chall
|
||||
var templ_7745c5c3_Var10 string
|
||||
templ_7745c5c3_Var10, templ_7745c5c3_Err = templ.JoinStringErrs(localizer.T("made_with"))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 73, Col: 40}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 74, Col: 40}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var10))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -195,7 +199,7 @@ func base(title string, body templ.Component, impressum *config.Impressum, chall
|
||||
var templ_7745c5c3_Var11 string
|
||||
templ_7745c5c3_Var11, templ_7745c5c3_Err = templ.JoinStringErrs(localizer.T("mascot_design"))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 75, Col: 39}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 76, Col: 39}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var11))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -208,7 +212,7 @@ func base(title string, body templ.Component, impressum *config.Impressum, chall
|
||||
var templ_7745c5c3_Var12 string
|
||||
templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinStringErrs(localizer.T("celphase"))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 75, Col: 123}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 76, Col: 123}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var12))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -234,7 +238,7 @@ func base(title string, body templ.Component, impressum *config.Impressum, chall
|
||||
var templ_7745c5c3_Var13 templ.SafeURL
|
||||
templ_7745c5c3_Var13, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(fmt.Sprintf("%simprint", anubis.APIPrefix)))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 79, Col: 78}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 80, Col: 78}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var13))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -252,7 +256,7 @@ func base(title string, body templ.Component, impressum *config.Impressum, chall
|
||||
var templ_7745c5c3_Var14 string
|
||||
templ_7745c5c3_Var14, templ_7745c5c3_Err = templ.JoinStringErrs(localizer.T("version_info"))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 82, Col: 38}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 83, Col: 38}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var14))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -265,7 +269,7 @@ func base(title string, body templ.Component, impressum *config.Impressum, chall
|
||||
var templ_7745c5c3_Var15 string
|
||||
templ_7745c5c3_Var15, templ_7745c5c3_Err = templ.JoinStringErrs(anubis.Version)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 82, Col: 63}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 83, Col: 63}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var15))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -307,7 +311,7 @@ func errorPage(message, mail string, localizer *localization.SimpleLocalizer) te
|
||||
var templ_7745c5c3_Var17 string
|
||||
templ_7745c5c3_Var17, templ_7745c5c3_Err = templ.JoinStringErrs(anubis.BasePrefix + "/.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: 92, Col: 181}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 93, Col: 181}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var17))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -320,7 +324,7 @@ func errorPage(message, mail string, localizer *localization.SimpleLocalizer) te
|
||||
var templ_7745c5c3_Var18 string
|
||||
templ_7745c5c3_Var18, templ_7745c5c3_Err = templ.JoinStringErrs(message)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 93, Col: 14}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 94, Col: 14}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var18))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -338,7 +342,7 @@ func errorPage(message, mail string, localizer *localization.SimpleLocalizer) te
|
||||
var templ_7745c5c3_Var19 string
|
||||
templ_7745c5c3_Var19, templ_7745c5c3_Err = templ.JoinStringErrs(localizer.T("go_home"))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 96, Col: 40}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 97, Col: 40}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var19))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -351,7 +355,7 @@ func errorPage(message, mail string, localizer *localization.SimpleLocalizer) te
|
||||
var templ_7745c5c3_Var20 string
|
||||
templ_7745c5c3_Var20, templ_7745c5c3_Err = templ.JoinStringErrs(localizer.T("contact_webmaster"))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 96, Col: 81}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 97, Col: 81}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var20))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -364,7 +368,7 @@ func errorPage(message, mail string, localizer *localization.SimpleLocalizer) te
|
||||
var templ_7745c5c3_Var21 templ.SafeURL
|
||||
templ_7745c5c3_Var21, templ_7745c5c3_Err = templ.JoinURLErrs("mailto:" + templ.SafeURL(mail))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 97, Col: 45}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 98, Col: 45}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var21))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -377,7 +381,7 @@ func errorPage(message, mail string, localizer *localization.SimpleLocalizer) te
|
||||
var templ_7745c5c3_Var22 string
|
||||
templ_7745c5c3_Var22, templ_7745c5c3_Err = templ.JoinStringErrs(mail)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 98, Col: 11}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 99, Col: 11}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var22))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -395,7 +399,7 @@ func errorPage(message, mail string, localizer *localization.SimpleLocalizer) te
|
||||
var templ_7745c5c3_Var23 string
|
||||
templ_7745c5c3_Var23, templ_7745c5c3_Err = templ.JoinStringErrs(localizer.T("go_home"))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 102, Col: 42}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 103, Col: 42}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var23))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -443,7 +447,7 @@ func StaticHappy(localizer *localization.SimpleLocalizer) templ.Component {
|
||||
templ_7745c5c3_Var25, 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: 113, Col: 18}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 114, Col: 18}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var25))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -456,7 +460,7 @@ func StaticHappy(localizer *localization.SimpleLocalizer) templ.Component {
|
||||
var templ_7745c5c3_Var26 string
|
||||
templ_7745c5c3_Var26, templ_7745c5c3_Err = templ.JoinStringErrs(localizer.T("static_check_endpoint"))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 115, Col: 43}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 116, Col: 43}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var26))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -498,7 +502,7 @@ func bench(localizer *localization.SimpleLocalizer) templ.Component {
|
||||
var templ_7745c5c3_Var28 string
|
||||
templ_7745c5c3_Var28, templ_7745c5c3_Err = templ.JoinStringErrs(localizer.T("time"))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 126, Col: 51}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 127, Col: 51}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var28))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -511,7 +515,7 @@ func bench(localizer *localization.SimpleLocalizer) templ.Component {
|
||||
var templ_7745c5c3_Var29 string
|
||||
templ_7745c5c3_Var29, templ_7745c5c3_Err = templ.JoinStringErrs(localizer.T("iters"))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 127, Col: 50}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 128, Col: 50}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var29))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -524,7 +528,7 @@ func bench(localizer *localization.SimpleLocalizer) templ.Component {
|
||||
var templ_7745c5c3_Var30 string
|
||||
templ_7745c5c3_Var30, templ_7745c5c3_Err = templ.JoinStringErrs(localizer.T("time_a"))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 130, Col: 53}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 131, Col: 53}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var30))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -537,7 +541,7 @@ func bench(localizer *localization.SimpleLocalizer) templ.Component {
|
||||
var templ_7745c5c3_Var31 string
|
||||
templ_7745c5c3_Var31, templ_7745c5c3_Err = templ.JoinStringErrs(localizer.T("iters_a"))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 131, Col: 52}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 132, Col: 52}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var31))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -550,7 +554,7 @@ func bench(localizer *localization.SimpleLocalizer) templ.Component {
|
||||
var templ_7745c5c3_Var32 string
|
||||
templ_7745c5c3_Var32, templ_7745c5c3_Err = templ.JoinStringErrs(localizer.T("time_b"))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 132, Col: 53}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 133, Col: 53}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var32))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -563,7 +567,7 @@ func bench(localizer *localization.SimpleLocalizer) templ.Component {
|
||||
var templ_7745c5c3_Var33 string
|
||||
templ_7745c5c3_Var33, templ_7745c5c3_Err = templ.JoinStringErrs(localizer.T("iters_b"))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 133, Col: 52}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 134, Col: 52}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var33))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -576,7 +580,7 @@ func bench(localizer *localization.SimpleLocalizer) templ.Component {
|
||||
var templ_7745c5c3_Var34 string
|
||||
templ_7745c5c3_Var34, 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: 142, Col: 166}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 143, Col: 166}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var34))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -589,7 +593,7 @@ func bench(localizer *localization.SimpleLocalizer) templ.Component {
|
||||
var templ_7745c5c3_Var35 string
|
||||
templ_7745c5c3_Var35, templ_7745c5c3_Err = templ.JoinStringErrs(localizer.T("loading"))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 143, Col: 66}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 144, Col: 66}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var35))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -602,7 +606,7 @@ func bench(localizer *localization.SimpleLocalizer) templ.Component {
|
||||
var templ_7745c5c3_Var36 string
|
||||
templ_7745c5c3_Var36, 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: 144, Col: 138}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 145, Col: 138}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var36))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -615,7 +619,7 @@ func bench(localizer *localization.SimpleLocalizer) templ.Component {
|
||||
var templ_7745c5c3_Var37 string
|
||||
templ_7745c5c3_Var37, templ_7745c5c3_Err = templ.JoinStringErrs(localizer.T("benchmark_requires_js"))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 147, Col: 45}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 148, Col: 45}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var37))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -628,7 +632,7 @@ func bench(localizer *localization.SimpleLocalizer) templ.Component {
|
||||
var templ_7745c5c3_Var38 string
|
||||
templ_7745c5c3_Var38, templ_7745c5c3_Err = templ.JoinStringErrs(localizer.T("difficulty"))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 153, Col: 88}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 154, Col: 88}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var38))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -641,7 +645,7 @@ func bench(localizer *localization.SimpleLocalizer) templ.Component {
|
||||
var templ_7745c5c3_Var39 string
|
||||
templ_7745c5c3_Var39, templ_7745c5c3_Err = templ.JoinStringErrs(localizer.T("algorithm"))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 157, Col: 87}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 158, Col: 87}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var39))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
@@ -654,7 +658,7 @@ func bench(localizer *localization.SimpleLocalizer) templ.Component {
|
||||
var templ_7745c5c3_Var40 string
|
||||
templ_7745c5c3_Var40, templ_7745c5c3_Err = templ.JoinStringErrs(localizer.T("compare"))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 161, Col: 83}
|
||||
return templ.Error{Err: templ_7745c5c3_Err, FileName: `index.templ`, Line: 162, Col: 83}
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var40))
|
||||
if templ_7745c5c3_Err != nil {
|
||||
|
||||
@@ -4,7 +4,7 @@ export default function process(
|
||||
difficulty = 5,
|
||||
signal = null,
|
||||
progressCallback = null,
|
||||
threads = Math.max(navigator.hardwareConcurrency / 2, 1),
|
||||
threads = Math.trunc(Math.max(navigator.hardwareConcurrency / 2, 1)),
|
||||
) {
|
||||
console.debug("fast algo");
|
||||
|
||||
|
||||
@@ -53,6 +53,17 @@ const loadTranslations = async (lang) => {
|
||||
}
|
||||
};
|
||||
|
||||
const getRedirectUrl = () => {
|
||||
const publicUrl = JSON.parse(
|
||||
document.getElementById("anubis_public_url").textContent,
|
||||
);
|
||||
if (publicUrl && window.location.href.startsWith(publicUrl)) {
|
||||
const urlParams = new URLSearchParams(window.location.search);
|
||||
return urlParams.get('redir');
|
||||
}
|
||||
return window.location.href;
|
||||
}
|
||||
|
||||
let translations = {};
|
||||
let currentLang;
|
||||
|
||||
@@ -205,7 +216,7 @@ const t = (key) => translations[`js_${key}`] || translations[key] || key;
|
||||
container.innerHTML = t('finished_reading');
|
||||
|
||||
function onDetailsExpand() {
|
||||
const redir = window.location.href;
|
||||
const redir = getRedirectUrl();
|
||||
window.location.replace(
|
||||
u(`${basePrefix}/.within.website/x/cmd/anubis/api/pass-challenge`, {
|
||||
id: challenge.id,
|
||||
@@ -220,7 +231,7 @@ const t = (key) => translations[`js_${key}`] || translations[key] || key;
|
||||
container.onclick = onDetailsExpand;
|
||||
setTimeout(onDetailsExpand, 30000);
|
||||
} else {
|
||||
const redir = window.location.href;
|
||||
const redir = getRedirectUrl();
|
||||
window.location.replace(
|
||||
u(`${basePrefix}/.within.website/x/cmd/anubis/api/pass-challenge`, {
|
||||
id: challenge.id,
|
||||
|
||||
@@ -53,6 +53,18 @@ addEventListener('message', async ({ data: eventData }) => {
|
||||
nonce += threads;
|
||||
iterations++;
|
||||
|
||||
/* Truncate the decimal portion of the nonce. This is a bit of an evil bit
|
||||
* hack, but it works reliably enough. The core of why this works is:
|
||||
*
|
||||
* > 13.4 % 1 !== 0
|
||||
* true
|
||||
* > 13 % 1 !== 0
|
||||
* false
|
||||
*/
|
||||
if (nonce % 1 !== 0) {
|
||||
nonce = Math.trunc(nonce);
|
||||
}
|
||||
|
||||
// Send a progress update from the main thread every 1024 iterations.
|
||||
if (isMainThread && (iterations & 1023) === 0) {
|
||||
postMessage(nonce);
|
||||
|
||||
@@ -49,6 +49,18 @@ addEventListener("message", async ({ data: eventData }) => {
|
||||
nonce += threads;
|
||||
iterations++;
|
||||
|
||||
/* Truncate the decimal portion of the nonce. This is a bit of an evil bit
|
||||
* hack, but it works reliably enough. The core of why this works is:
|
||||
*
|
||||
* > 13.4 % 1 !== 0
|
||||
* true
|
||||
* > 13 % 1 !== 0
|
||||
* false
|
||||
*/
|
||||
if (nonce % 1 !== 0) {
|
||||
nonce = Math.trunc(nonce);
|
||||
}
|
||||
|
||||
// Send a progress update from the main thread every 1024 iterations.
|
||||
if (isMainThread && (iterations & 1023) === 0) {
|
||||
postMessage(nonce);
|
||||
|
||||
Reference in New Issue
Block a user