Skip to content

Commit a5c512d

Browse files
committed
chore(manifest/xesite): enable Thoth for testing in prod
Signed-off-by: Xe Iaso <me@xeiaso.net>
1 parent 015f4ed commit a5c512d

6 files changed

Lines changed: 86 additions & 55 deletions

File tree

manifest/xesite/1password.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,10 @@ metadata:
44
name: xesite
55
spec:
66
itemPath: "vaults/lc5zo4zjz3if3mkeuhufjmgmui/items/ry2arlgm66sbms3po5s5tbuace"
7+
---
8+
apiVersion: onepassword.com/v1
9+
kind: OnePasswordItem
10+
metadata:
11+
name: xesite-anubis
12+
spec:
13+
itemPath: "vaults/lc5zo4zjz3if3mkeuhufjmgmui/items/pwguumqcmtxvqbeb7y4gj7l36i"

manifest/xesite/anubis/botPolicies.yaml

Lines changed: 74 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -11,41 +11,79 @@
1111
## /usr/share/docs/anubis/data or in the tarball you extracted Anubis from.
1212

1313
bots:
14-
# Pathological bots to deny
15-
- # This correlates to data/bots/ai-robots-txt.yaml in the source tree
16-
import: (data)/bots/ai-robots-txt.yaml
17-
- import: (data)/bots/cloudflare-workers.yaml
18-
- import: (data)/bots/headless-browsers.yaml
19-
- import: (data)/bots/us-ai-scraper.yaml
20-
21-
# Search engines to allow
22-
- import: (data)/crawlers/googlebot.yaml
23-
- import: (data)/crawlers/bingbot.yaml
24-
- import: (data)/crawlers/duckduckbot.yaml
25-
- import: (data)/crawlers/qwantbot.yaml
26-
- import: (data)/crawlers/internet-archive.yaml
27-
- import: (data)/crawlers/kagibot.yaml
28-
- import: (data)/crawlers/marginalia.yaml
29-
- import: (data)/crawlers/mojeekbot.yaml
30-
31-
# Allow common "keeping the internet working" routes (well-known, favicon, robots.txt)
32-
- import: (data)/common/keep-internet-working.yaml
33-
- import: /xe/cfg/anubis/xesite-rss-feeds.yaml
34-
35-
# # Punish any bot with "bot" in the user-agent string
36-
# # This is known to have a high false-positive rate, use at your own risk
37-
# - name: generic-bot-catchall
38-
# user_agent_regex: (?i:bot|crawler)
39-
# action: CHALLENGE
40-
# challenge:
41-
# difficulty: 16 # impossible
42-
# report_as: 4 # lie to the operator
43-
# algorithm: slow # intentionally waste CPU cycles and time
44-
45-
# Generic catchall rule
46-
- name: generic-browser
47-
user_agent_regex: >-
48-
Mozilla|Opera
49-
action: CHALLENGE
14+
# Pathological bots to deny
15+
- # This correlates to data/bots/ai-robots-txt.yaml in the source tree
16+
import: (data)/bots/ai-robots-txt.yaml
17+
- import: (data)/bots/cloudflare-workers.yaml
18+
- import: (data)/bots/headless-browsers.yaml
19+
- import: (data)/bots/us-ai-scraper.yaml
20+
21+
# Search engines to allow
22+
- import: (data)/crawlers/googlebot.yaml
23+
- import: (data)/crawlers/bingbot.yaml
24+
- import: (data)/crawlers/duckduckbot.yaml
25+
- import: (data)/crawlers/qwantbot.yaml
26+
- import: (data)/crawlers/internet-archive.yaml
27+
- import: (data)/crawlers/kagibot.yaml
28+
- import: (data)/crawlers/marginalia.yaml
29+
- import: (data)/crawlers/mojeekbot.yaml
30+
31+
# Allow common "keeping the internet working" routes (well-known, favicon, robots.txt)
32+
- import: (data)/common/keep-internet-working.yaml
33+
- import: /xe/cfg/anubis/xesite-rss-feeds.yaml
34+
35+
# Requires a subscription to Thoth to use, see
36+
# TODO(Xe): docs link
37+
#
38+
# Throw blanket challenges for specific countries known to host abusive scrapers
39+
# that do not respond to abuse complaints
40+
- name: challenge-aggressive-scrapers
41+
geoip:
42+
counties:
43+
- BR
44+
- CN
45+
action: WEIGH
46+
weight:
47+
adjust: 30
48+
49+
# Requires a subscription to Thoth to use, see
50+
# TODO(Xe): docs link
51+
#
52+
# Deny traffic from the worst offenders hosting AI scrapers.
53+
- name: deny-aggressive-asns-without-functional-abuse-contact
54+
asns:
55+
match:
56+
- 13335 # Cloudflare
57+
- 136907 # Huawei Cloud
58+
- 45102 # Alibaba Cloud
59+
action: WEIGH
60+
weight:
61+
adjust: 30
62+
63+
- name: residential-proxy
64+
asns:
65+
match:
66+
- 7018
67+
action: WEIGH
68+
weight:
69+
adjust: 10
70+
71+
# # Punish any bot with "bot" in the user-agent string
72+
# # This is known to have a high false-positive rate, use at your own risk
73+
# - name: generic-bot-catchall
74+
# user_agent_regex: (?i:bot|crawler)
75+
# action: CHALLENGE
76+
# challenge:
77+
# difficulty: 16 # impossible
78+
# report_as: 4 # lie to the operator
79+
# algorithm: slow # intentionally waste CPU cycles and time
80+
81+
# Generic catchall rule
82+
- name: generic-browser
83+
user_agent_regex: >-
84+
Mozilla|Opera
85+
action: WEIGH
86+
weight:
87+
adjust: 5
5088

5189
dnsbl: false

manifest/xesite/cache-pvc.yaml

Lines changed: 0 additions & 13 deletions
This file was deleted.

manifest/xesite/deployment.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@ spec:
1212
app.kubernetes.io/name: xesite
1313
spec:
1414
volumes:
15-
- name: cache
16-
persistentVolumeClaim:
17-
claimName: xesite-cache
1815
- name: data
1916
emptyDir: {}
2017
- name: anubis
@@ -70,7 +67,7 @@ spec:
7067
initialDelaySeconds: 30
7168
periodSeconds: 30
7269
- name: anubis
73-
image: ghcr.io/techarohq/anubis:latest
70+
image: reg.xeiaso.net/techaro/anubis:thoth
7471
imagePullPolicy: Always
7572
env:
7673
- name: "BIND"
@@ -109,3 +106,6 @@ spec:
109106
- ALL
110107
seccompProfile:
111108
type: RuntimeDefault
109+
envFrom:
110+
- secretRef:
111+
name: xesite-anubis

manifest/xesite/ingress.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@ spec:
3232
service:
3333
name: xesite
3434
port:
35-
number: 80
35+
name: anubis

manifest/xesite/kustomization.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
resources:
22
- 1password.yaml
3-
- cache-pvc.yaml
43
- deployment.yaml
54
- ingress.yaml
65
- machineproxy.yaml

0 commit comments

Comments
 (0)