You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 18, 2022. It is now read-only.
:warning: This program is still experimental and (badly written) so there are probably some bugs and vulnerabilities in the bot detection system. :warning:
5
6
6
7
The algorithm is based on the fact that every browser will accept cookie and load the external CSS that you included in your HTML page so in case of a stupid/basic bot it won't simply process the cookie or/and load that external CSS file because it does not process the HTML code.
7
8
8
-
# How to make it work?
9
+
# How to make it work? (minimalistic configuration)
9
10
10
-
1. Copy the `example.toml` to `config.toml` and the `views/bot.template.pug` to `views/bot.pug`.
11
+
1. Copy the `example.toml` to `config.toml`.
11
12
12
-
2. Modify the settings inside the `config.toml`. You don't need to modify every setting, just change the one that you want to be changed. Here is the reference for each setting:
13
-
-`COOKIE_NAME`: The name of the cookie that will be used for checking if the client can handle the cookie.
14
-
-`ENDPOINT_NAME`: The name of the CSS file that will be used for checking if the client can process the HTML code.
15
-
-`JAIL_PATH`: The path to the directory where the banned IP will be stored. Optionally to be used with the [ipfilter](https://caddyserver.com/docs/http.ipfilter) plugin of Caddy.
16
-
-`MAX_RETRY`: The number of retries allowed for the client before getting banned.
17
-
-`PORT`: The port of which the proxy application will listen to.
18
-
-`TARGET`: The URL of the application to proxy/protect.
19
-
-`TIMEOUT_LOAD`: The time before the program consider that the client failed to reach the CSS file.
20
-
-`WHITELIST`: The IP that you want to be whitelisted. Separate each IP with a `,`.
21
-
-`WHITELIST_PAGES`: Pages to whitelist from the blocked page for bots.
13
+
2. Modify the setting `TARGET` in the `config.toml` to the URL where your application is listening to. For example if your application reachable on `http://127.0.0.1:8080` just set `127.0.0.1:8080` in the setting.
22
14
23
-
3. On your main webserver (nginx, apache, caddy,...) you need to pass the IP address of the client to the application (with the `X-Real-IP` header). Here is how to do it on:
15
+
3. Modify the setting `JAIL_PATH` in the `config.toml` to an empty directory that you created for the application.
16
+
17
+
3. On your main webserver (nginx, apache, caddy,...) when you will proxy the `antibot-proxy` application you will also need to pass the IP address of the client to the application (with the `X-Real-IP` header). Here is how to do it on:
> Note: You may consult the documentation of your webserver for further details about proxying an application.
36
+
37
+
# Reference of each setting in `config.toml` for advanced configuration
38
+
39
+
-`COOKIE_NAME`: The name of the cookie that will be used for checking if the client can handle the cookie.
40
+
-`ENDPOINT_NAME`: The name of the CSS file that will be used for checking if the client can process the HTML code.
41
+
-`JAIL_PATH`: The path to the directory where the banned IP will be stored. Optionally to be used with the [ipfilter](https://caddyserver.com/docs/http.ipfilter) plugin of Caddy.
42
+
-`MAX_RETRY`: The number of retries allowed for the client before getting banned.
43
+
-`PORT`: The port of which the proxy application will listen to.
44
+
-`TARGET`: The URL of the application to proxy/protect.
45
+
-`TIMEOUT_LOAD`: The time before the program consider that the client failed to reach the CSS file.
46
+
-`WHITELIST`: The IP that you want to be whitelisted.
47
+
-`WHITELIST_PAGES`: Pages to whitelist from the blocked page for bots.
48
+
41
49
42
-
# How to configure the ipfilter plugin to handle the banned IPs?
50
+
# How to configure the ipfilter Caddy plugin to handle the banned IPs?
43
51
44
52
You just need to add this block to your `Caddyfile`:
0 commit comments