Skip to content

Commit 21a715f

Browse files
committed
📝 Fix exemple links and documentation for wicketkeeper
1 parent b9a845d commit 21a715f

File tree

4 files changed

+19
-11
lines changed

4 files changed

+19
-11
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ The following captcha providers are supported now:
3939
- [hcaptcha](https://www.hcaptcha.com/)
4040
- [recaptcha](https://www.google.com/recaptcha/about/)
4141
- [turnstile](https://www.cloudflare.com/products/turnstile/)
42+
- [custom/wicketkeeper](https://github.com/a-ve/wicketkeeper)
4243

4344
There are 5 operating modes (CrowdsecMode) for this plugin:
4445

@@ -684,7 +685,7 @@ docker exec crowdsec cscli decisions remove --ip 10.0.0.10 -t captcha
684685

685686
#### 1. Behind another proxy service (ex: clouflare) [examples/behind-proxy/README.md](https://github.com/maxlerebourg/crowdsec-bouncer-traefik-plugin/blob/main/examples/behind-proxy/README.md)
686687

687-
#### 2. With Redis as an external shared cache [examples/redis-cache/README.md](https://github.com/maxlerebourg/crowdsec-bouncer-traefik-plugin/blob/main/examples/redis-cache/README.md)
688+
q#### 2. With Redis as an external shared cache [examples/redis-cache/README.md](https://github.com/maxlerebourg/crowdsec-bouncer-traefik-plugin/blob/main/examples/redis-cache/README.md)
688689

689690
#### 3. Using Trusted IP (ex: LAN OR VPN) that won't get filtered by crowdsec [examples/trusted-ips/README.md](https://github.com/maxlerebourg/crowdsec-bouncer-traefik-plugin/blob/main/examples/trusted-ips/README.md)
690691

@@ -702,6 +703,8 @@ docker exec crowdsec cscli decisions remove --ip 10.0.0.10 -t captcha
702703

703704
#### 10. Using Traefik with Custom Ban HTML Page [examples/custom-ban-page/README.md](https://github.com/maxlerebourg/crowdsec-bouncer-traefik-plugin/blob/main/examples/custom-ban-page/README.md)
704705

706+
#### 11. Using Traefik with Custom Captcha Whiketkeeper[examples/custom-captcha/README.md](https://github.com/maxlerebourg/crowdsec-bouncer-traefik-plugin/blob/main/examples/custom-captcha/README.md)
707+
705708
### Local Mode
706709

707710
Traefik also offers a developer mode that can be used for temporary testing of plugins not hosted on GitHub.

bouncer.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,7 @@ func New(_ context.Context, next http.Handler, config *configuration.Config, nam
252252
config.CaptchaGracePeriodSeconds,
253253
)
254254
if err != nil {
255+
log.Error("CaptchaClient not valid " + err.Error())
255256
return nil, err
256257
}
257258

examples/custom-captcha/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ Minimal API requirement:
3535
```yaml
3636
wicketkeeper:
3737
image: ghcr.io/a-ve/wicketkeeper:latest
38+
user: root
3839
ports:
3940
- "8080:8080"
4041
environment:

examples/custom-captcha/docker-compose.yml

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
services:
22
traefik:
3-
image: "traefik:v3.0.0"
3+
image: "traefik:v3.5.0"
44
container_name: "traefik"
55
restart: unless-stopped
66
command:
@@ -11,15 +11,16 @@ services:
1111
- "--providers.docker=true"
1212
- "--providers.docker.exposedbydefault=false"
1313
- "--entrypoints.web.address=:80"
14+
- "--entrypoints.web.forwardedheaders.trustedips=172.18.0.0/24"
1415

15-
# - "--experimental.plugins.bouncer.modulename=github.com/maxlerebourg/crowdsec-bouncer-traefik-plugin"
16-
# - "--experimental.plugins.bouncer.version=v1.4.5"
17-
- "--experimental.localplugins.bouncer.modulename=github.com/maxlerebourg/crowdsec-bouncer-traefik-plugin"
16+
- "--experimental.plugins.bouncer.modulename=github.com/maxlerebourg/crowdsec-bouncer-traefik-plugin"
17+
- "--experimental.plugins.bouncer.version=v1.4.5"
18+
# - "--experimental.localplugins.bouncer.modulename=github.com/maxlerebourg/crowdsec-bouncer-traefik-plugin"
1819
volumes:
1920
- /var/run/docker.sock:/var/run/docker.sock:ro
2021
- logs-custom-captcha-enabled:/var/log/traefik
2122
- "./captcha.html:/captcha.html"
22-
- ./../../:/plugins-local/src/github.com/maxlerebourg/crowdsec-bouncer-traefik-plugin
23+
# - ./../../:/plugins-local/src/github.com/maxlerebourg/crowdsec-bouncer-traefik-plugin
2324
ports:
2425
- 8000:80
2526
- 8080:8080
@@ -45,10 +46,12 @@ services:
4546

4647
# Choose captcha provider
4748
- "traefik.http.middlewares.crowdsec.plugin.bouncer.captchaProvider=custom"
48-
- "traefik.http.middlewares.crowdsec.plugin.bouncer.captchaCustomJsURL=http://captcha.localhost:8080/fast.js"
49-
- "traefik.http.middlewares.crowdsec.plugin.bouncer.CaptchaCustomValidateURL=http://captcha.localhost:8080/v0/siteverify"
50-
- "traefik.http.middlewares.crowdsec.plugin.bouncer.CaptchaCustomKey=wicketpeeker"
51-
- "traefik.http.middlewares.crowdsec.plugin.bouncer.CaptchaCustomResponse=response"
49+
- "traefik.http.middlewares.crowdsec.plugin.bouncer.captchaCustomJsURL=http://captcha.localhost:8000/fast.js"
50+
# Inside Traefik container the plugin must be able to reach wicketkeeper service so we can go through a Traefik localhost
51+
# domain which would resolve traefik itself and the port for the dashboard
52+
- "traefik.http.middlewares.crowdsec.plugin.bouncer.CaptchaCustomValidateURL=http://wicketkeeper:8080/v0/siteverify"
53+
- "traefik.http.middlewares.crowdsec.plugin.bouncer.CaptchaCustomKey=wicketkeeper"
54+
- "traefik.http.middlewares.crowdsec.plugin.bouncer.CaptchaCustomResponse=wicketkeeper_solution"
5255
# Define captcha grade period seconds
5356
- "traefik.http.middlewares.crowdsec.plugin.bouncer.captchaGracePeriodSeconds=20"
5457
# Define captcha HTML file path
@@ -78,7 +81,7 @@ services:
7881
image: ghcr.io/maxlerebourg/wicketkeeper:latest
7982
container_name: "wicketkeeper"
8083
environment:
81-
- ROOT_URL=http://localhost:8080
84+
- ROOT_URL=http://captcha.localhost:8000
8285
- LISTEN_PORT=8080
8386
- REDIS_ADDR=redis:6379
8487
- DIFFICULTY=4

0 commit comments

Comments
 (0)