bots: - import: CUSTOM/policies/meta/base.yaml # Allow android apps that I use - name: allow-android-apps user_agent_regex: Nextcloud-android|DAVx5|ICSx5 action: ALLOW # Allow the Thunderbird Filelink app - name: allow-thunderbird-filelink user_agent_regex: ^Filelink for \*cloud.*$ action: ALLOW # Allow anyone accessing the **authenticated** DAV endpoint. - name: allow-dav path_regex: ^/remote.php/dav/.*$ action: ALLOW # Allow public shares so that I can more easily send them - name: allow-public-shares path_regex: ^/s/.*$ action: ALLOW # Allow clients to load assets to not break public shares - name: allow-assets action: ALLOW expression: any: # Dist files from nextcloud core - 'path.startsWith("/dist/")' # Core Nextcloud files - 'path.startsWith("/js/core")' - 'path.startsWith("/core/css/")' # Viewer app files - 'path.startsWith("/apps/viewer")' # Theme CSS - 'path.startsWith("/apps/theming/")' # Public DAV endpoint - 'path.startsWith("/public.php/dav/files/")' dnsbl: false openGraph: enabled: true considerHost: false ttl: 24h status_codes: CHALLENGE: 200 DENY: 200 thresholds: - name: minimal-suspicion expression: weight <= 0 action: ALLOW - name: mild-suspicion expression: all: - weight > 0 - weight < 10 action: CHALLENGE challenge: # https://anubis.techaro.lol/docs/admin/configuration/challenges/metarefresh algorithm: metarefresh difficulty: 1 report_as: 1 - name: moderate-suspicion expression: all: - weight >= 10 - weight < 20 action: CHALLENGE challenge: # https://anubis.techaro.lol/docs/admin/configuration/challenges/proof-of-work algorithm: fast difficulty: 2 # two leading zeros, very fast for most clients report_as: 2 - name: mild-proof-of-work expression: all: - weight >= 20 - weight < 30 action: CHALLENGE challenge: # https://anubis.techaro.lol/docs/admin/configuration/challenges/proof-of-work algorithm: fast difficulty: 4 report_as: 4 # For clients that are browser like and have gained many points from custom rules - name: extreme-suspicion expression: weight >= 30 action: CHALLENGE challenge: # https://anubis.techaro.lol/docs/admin/configuration/challenges/proof-of-work algorithm: fast difficulty: 6 report_as: 5