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
Copy file name to clipboardExpand all lines: docs/macos-host.md
+52-12Lines changed: 52 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,10 @@
1
1
# Contribute to this plugin from a MacOS host
2
2
3
-
You can test the Linux behavior of this project using **Vagrant** (you have to install this on your host to continue).
3
+
You can test the Linux behavior of this project using **Vagrant**.
4
+
5
+
## One time setup
6
+
7
+
### Run the VM and initialize it
4
8
5
9
```bash
6
10
vagrant up
@@ -10,18 +14,26 @@ sudo systemctl restart docker
10
14
```
11
15
12
16
You have to log out and log back for permission to be updated:
17
+
13
18
```bash
14
19
exit
15
-
vagrant shh
20
+
vagrant ssh
16
21
```
22
+
### Enabled Docker IPV6 support inside the Linux VM
23
+
24
+
follow [this guide](https://docs.docker.com/config/daemon/ipv6/). (Note that you'll have to create the file `/etc/docker/daemon.json`).
25
+
26
+
27
+
### Install NodeJS
17
28
18
-
Enabled IPV6 support following [this guide](https://docs.docker.com/config/daemon/ipv6/). (Note that you'll have to create the file `/etc/docker/daemon.json`).
$message = __('As the stream mode is enabled, the cache has just been warmed up, '.($result > 0 ? 'there are now '.$result.' decisions' : 'there is now '.$result.' decision').' in cache.');
21
22
AdminNotice::displaySuccess($message);
22
23
scheduleBlocklistRefresh();
@@ -43,7 +44,7 @@ function adminAdvancedSettings()
$message = __('As the stream mode refresh duration changed, the cache has just been warmed up, '.($result > 0 ? 'there are now '.$result.' decisions' : 'there is now '.$result.' decision').' in cache.');
48
49
AdminNotice::displaySuccess($message);
49
50
scheduleBlocklistRefresh();
@@ -128,7 +129,8 @@ function adminAdvancedSettings()
128
129
if ((bool) get_option('crowdsec_stream_mode')) {
129
130
$bouncer = getBouncerInstance($input); // Reload bouncer instance with the new cache system
130
131
$result = $bouncer->warmBlocklistCacheUp();
131
-
$message = __('As the stream mode is enabled, the cache has just been warmed up, '.($result > 0 ? 'there are now '.$result.' decisions' : 'there is now '.$result.' decision').' in cache.');
132
+
$count = $result['count'];
133
+
$message = __('As the stream mode is enabled, the cache has just been warmed up, '.($count > 0 ? 'there are now '.$count.' decisions' : 'there is now '.$count.' decision').' in cache.');
132
134
AdminNotice::displaySuccess($message);
133
135
scheduleBlocklistRefresh();
134
136
}
@@ -193,43 +195,30 @@ function adminAdvancedSettings()
193
195
return$input;
194
196
}, '<p>Which remediation to apply when CrowdSec advises unhandled remediation.</p>', $choice);
$message .= __(' As the stream mode is enabled, the cache has just been warmed up, '.($result > 0 ? 'there are now '.$result.' decisions' : 'there is now '.$result.' decision').' in cache.');
Copy file name to clipboardExpand all lines: inc/templates/advanced-settings.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -40,7 +40,7 @@ function updateDsnDisplay () {
40
40
submit_button();
41
41
?>
42
42
</form>
43
-
43
+
<p style="font-style:italic">For information, the current browser IP detected by PHP is: <span id="detected_ip_address" style="user-select: all;"><?phpecho$_SERVER['REMOTE_ADDR']; ?></span></p>
Feel free to ask any questions about this plugin, make your suggestions or raise issues on the <a href="https://wordpress.org/support/plugin/crowdsec/">plugin support page</a> or directly on <a href="https://github.com/crowdsecurity/cs-wordpress-bouncer/issues/new">Github</a>.
0 commit comments