Initial vault setup
This commit is contained in:
@@ -0,0 +1,117 @@
|
||||
---
|
||||
title: Private Captcha
|
||||
created: 2026-06-07
|
||||
updated: 2026-06-07
|
||||
type: app
|
||||
tags: [catalogue, development, captcha, security, anti-bot, privacy]
|
||||
confidence: high
|
||||
contested: false
|
||||
sources: [https://selfh.st/apps/?tag=Development, https://github.com/PrivateCaptcha/PrivateCaptcha]
|
||||
---
|
||||
|
||||
# 💻 Private Captcha
|
||||
|
||||
> **CAPTCHA self-hosted qui respecte la vie privée** — protection anti-bot sans tracking, sans Google reCAPTCHA, sans challenge visuel pénible, et sans envoyer les IPs de vos utilisateurs à un tiers.
|
||||
|
||||
## 📋 Informations Générales
|
||||
|
||||
| Champ | Valeur |
|
||||
| :--- | :--- |
|
||||
| **Site web** | [privatecaptcha.com](https://privatecaptcha.com/) |
|
||||
| **GitHub** | [PrivateCaptcha/PrivateCaptcha](https://github.com/PrivateCaptcha/PrivateCaptcha) |
|
||||
| **License** | AGPL-3.0 (serveur) + MIT (SDK) |
|
||||
| **Langage** | Go (serveur) + JS/HTML (widget) |
|
||||
| **Étoiles GitHub** | 175 ⭐ |
|
||||
| **Catégorie** | Development, Security / Anti-Bot |
|
||||
| **Référence** | [selfh.st Development](https://selfh.st/apps/?tag=Development) |
|
||||
|
||||
## 📝 Description
|
||||
|
||||
**Private Captcha** est un **service de CAPTCHA self-hosted** conçu comme une **alternative respectueuse de la vie privée à Google reCAPTCHA et hCaptcha**. Le constat est simple : reCAPTCHA v3 trace vos utilisateurs, hCaptcha résout des tâches d'entraînement pour le data-labeling, et les deux envoient les IPs, User-Agents et comportements à des serveurs tiers.
|
||||
|
||||
Private Captcha fonctionne sur un **modèle de « proof-of-work » + analyse comportementale légère** : le widget JS calcule un puzzle cryptographique côté client (preuve de travail), envoie le résultat au serveur Private Captcha, qui décide en quelques millisecondes si la requête est humaine ou bot. **Aucun pixel de tracking, aucun cookie tiers, aucun fingerprinting persistant**. Compatible RGPD nativement.
|
||||
|
||||
L'intégration est **quasi-identique à hCaptcha** : un `<script>` à charger, un attribut `data-sitekey`, un endpoint `POST /api/v1/verify` côté backend, et c'est fait. Les SDK sont disponibles pour Go, JavaScript/TypeScript, PHP, Python, Ruby, .NET — la migration depuis hCaptcha se fait en quelques minutes.
|
||||
|
||||
**Cas d'usage** : protéger un formulaire d'inscription, un endpoint de login, une page de contact, un formulaire de commentaires, un endpoint API sensible. Particulièrement adapté aux sites **RGPD-stricts**, aux admins self-hosted, et à tous ceux qui ne veulent **plus voir Google sur leur site**.
|
||||
|
||||
## 🚀 Installation
|
||||
|
||||
### Via Docker (recommandé)
|
||||
|
||||
```yaml
|
||||
# docker-compose.yml
|
||||
version: '3.8'
|
||||
services:
|
||||
private-captcha:
|
||||
image: ghcr.io/privatecaptcha/privatecaptcha:latest
|
||||
container_name: private-captcha
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "8080:8080"
|
||||
environment:
|
||||
PC_ALLOWED_ORIGINS: "https://example.com,https://app.example.com"
|
||||
PC_DIFFICULTY: "4" # ajustable, plus haut = plus dur pour les bots
|
||||
PC_ADMIN_EMAIL: "admin@example.com"
|
||||
PC_ADMIN_PASSWORD: ***changeme***
|
||||
PC_TLS: "false" # Traefik gère le HTTPS
|
||||
volumes:
|
||||
- pc_data:/data
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.pc.rule=Host(`captcha.example.com`)"
|
||||
- "traefik.http.routers.pc.entrypoints=websecure"
|
||||
- "traefik.http.routers.pc.tls.certresolver=letsencrypt"
|
||||
|
||||
volumes:
|
||||
pc_data:
|
||||
```
|
||||
|
||||
### Installation manuelle
|
||||
|
||||
```bash
|
||||
git clone https://github.com/PrivateCaptcha/PrivateCaptcha.git
|
||||
cd PrivateCaptcha
|
||||
go build -o privatecaptcha ./cmd/server
|
||||
./privatecaptcha --config config.yaml
|
||||
```
|
||||
|
||||
## ⚙️ Configuration
|
||||
|
||||
1. **Origine autorisée** : déclarer chaque domaine (`PC_ALLOWED_ORIGINS`) qui appellera le widget — sécurité CORS stricte.
|
||||
2. **Difficulté** : `PC_DIFFICULTY=4` par défaut, monter à 5-6 si vous voyez passer trop de bots, baisser à 3 si les utilisateurs légitimes se plaignent de lenteur.
|
||||
3. **Intégration HTML** : `<script src="https://captcha.example.com/widget.js" async defer></script>` + `<div class="pc-captcha" data-sitekey="v2|abc123"></div>`.
|
||||
4. **Vérification backend** : `POST https://captcha.example.com/api/v1/verify` avec la solution et la **secret key** côté serveur.
|
||||
5. **Rate limiting** : configurer un rate-limit (Traefik middleware) sur `/api/v1/verify` pour éviter l'abus.
|
||||
|
||||
## 🔗 Alternatives
|
||||
|
||||
- **hCaptcha** — Référence privacy-friendly, gratuit, mais envoie des données à Intuition Machines (data labeling).
|
||||
- **Altcha** — Open source, sans tracking, alternative européenne, format différent (proof-of-work).
|
||||
- **Google reCAPTCHA** — Le plus utilisé, mais tracking massif, RGPD-hostile, et tendance à breaker.
|
||||
- **Cloudflare Turnstile** — Excellent, gratuit, mais lié à l'écosystème Cloudflare.
|
||||
- **Friendly Captcha** — Européen, GDPR-friendly, payant pour self-host (modèle SaaS).
|
||||
|
||||
## 🔒 Sécurité
|
||||
|
||||
- 🔐 **HTTPS obligatoire** via [[app-traefik]] : le widget et l'API de vérification doivent passer en TLS.
|
||||
- 🔒 **Secret key côté serveur uniquement** : ne jamais exposer la clé secrète dans le HTML/JS client.
|
||||
- 🛡️ **Rotation régulière** de la sitekey/secret en cas de fuite.
|
||||
- 🛡️ **`PC_ALLOWED_ORIGINS` strict** : un attaquant qui connaît votre sitekey ne peut pas rejouer depuis un autre domaine.
|
||||
- 🛡️ **Defense in depth** : un CAPTCHA n'est qu'une couche — toujours avoir un **rate-limit**, une **validation côté serveur**, et une **surveillance** des IPs suspectes.
|
||||
- 🛡️ **Logs** : ne pas logger les solutions CAPTCHA en clair (équivalent d'un mot de passe à court terme).
|
||||
|
||||
## 📚 Ressources
|
||||
|
||||
- [Site officiel](https://privatecaptcha.com/)
|
||||
- [Documentation](https://privatecaptcha.com/docs)
|
||||
- [GitHub PrivateCaptcha/PrivateCaptcha](https://github.com/PrivateCaptcha/PrivateCaptcha)
|
||||
- [Selfh.st — Development](https://selfh.st/apps/?tag=Development)
|
||||
- [Comparaison hCaptcha vs Private Captcha](https://privatecaptcha.com/blog/hcaptcha-alternative)
|
||||
|
||||
## 🔗 Pages Liées
|
||||
|
||||
- [[cat-development]] — Catégorie Development
|
||||
- [[app-traefik]] — Reverse proxy HTTPS
|
||||
- [[securisation-home-lab]] — Bonnes pratiques de sécurité anti-bot
|
||||
- [[recettes-docker-compose]] — Templates Docker Compose
|
||||
Reference in New Issue
Block a user