Skip to content

Commit

Permalink
Merge pull request #39 from crowdsecurity/ipv6
Browse files Browse the repository at this point in the history
add Ipv6 support
  • Loading branch information
mobula9 authored Jan 23, 2021
2 parents 52a7202 + 84e18c6 commit 456bb89
Show file tree
Hide file tree
Showing 14 changed files with 338 additions and 276 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,6 @@ jobs:
- name: Add a machine to pilot crowdsec state
run: docker exec crowdsec cscli machines add PhpUnitTestMachine --password PhpUnitTestMachinePassword

- name: Install libmemcached
if: matrix.php == '8.0' # required only for php 8 as mentioned here: https://github.com/shivammathur/setup-php/issues/354
run: sudo apt-get install libmemcached-dev -y

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
Expand Down
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,13 @@
"symfony/config": "^5.2",
"symfony/cache": "^5.2",
"monolog/monolog": "^2.1",
"gregwar/captcha": "^1.1"
"gregwar/captcha": "^1.1",
"mlocati/ip-lib": "^1.14"
},
"require-dev": {
"bramus/monolog-colored-line-formatter": "^3.0",
"symfony/var-dumper": "^5.2",
"phpunit/phpunit": "8.5.13",
"clean/phpdoc-md": "^0.19.1"
}
}
}
74 changes: 73 additions & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/contribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ git branch -m <new-name>
git push origin :<old-name> && git push origin <new-name>

# Create PR
gh pr create --fill
gh pr create --fill --web
```

> Note: after the merge, don't forget to delete to branch.
Expand Down
9 changes: 6 additions & 3 deletions scripts/setup-local-crowdsec.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
#!/bin/sh

# Delete existing LAPI database.
[ -e ../var/docker-data/crowdsec.db ] && rm ../var/docker-data/crowdsec.db
[ -e ./var/docker-data/crowdsec.db ] && rm ./var/docker-data/crowdsec.db

# Start containers.
docker-compose up --force-recreate -d crowdsec
docker-compose up --remove-orphans -d redis memcached

# Create a bouncer with cscli and copy expose generated key.
docker-compose exec crowdsec /usr/local/bin/cscli bouncers add bouncer-php-library -o raw > ../.bouncer-key
docker-compose exec crowdsec /usr/local/bin/cscli bouncers add bouncer-php-library -o raw > ./.bouncer-key

# Create a watcher with cscli.
docker-compose exec crowdsec cscli machines add PhpUnitTestMachine --password PhpUnitTestMachinePassword > /dev/null 2>&1
docker-compose exec crowdsec cscli machines add PhpUnitTestMachine --password PhpUnitTestMachinePassword > /dev/null 2>&1

# Ensure composer deps are presents
docker-compose run app composer install
Loading

0 comments on commit 456bb89

Please sign in to comment.