File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : C Build and Test Binaries
2+
3+ on :
4+ push :
5+ branches : [ main ]
6+ workflow_dispatch :
7+
8+ jobs :
9+ build :
10+ runs-on : ubuntu-24.04
11+
12+ steps :
13+ - uses : actions/checkout@v4
14+ # with:
15+ # repository: sever-sever/fastnetmon-vyos
16+
17+ - name : make binaries
18+ run : make
19+
20+ - name : ls binary
21+ run : |
22+ set -eux
23+ ls build/
24+
25+ # Requires to add cap NET_ADMIN to check firewall and iproute2
26+ - name : Run test in privileged container
27+ run : |
28+ docker run --rm --cap-add=NET_ADMIN \
29+ -v "${PWD}:/code" \
30+ -w /code \
31+ ubuntu:24.04 bash -c '
32+ set -eux
33+ apt update && apt install -y iproute2 nftables
34+ dpkg -l | grep -e "nft" -e "iproute"
35+ ./build/iproute_decision 192.0.2.1 inbound 5555 ban
36+ ./build/iproute_decision 2001:db8::1 inbound 5555 ban
37+ ./build/nft_decision 192.0.2.1 inbound 5555 ban
38+ ./build/nft_decision 2001:db8::1 inbound 5555 ban
39+ ip route
40+ ip -6 route
41+ nft list ruleset
42+ '
You can’t perform that action at this time.
0 commit comments