-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
35 lines (26 loc) · 775 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
build:
@go build -o bin/packet-capture .
run: build
@bin/packet-capture
run-tcp: build
sudo bin/packet-capture -protocol=tcp -interface=lo -matches 3
run-udp: build
sudo bin/packet-capture -protocol=udp -interface=lo -matches 3
run-netcat-tcp-server:
while true; do nc -vl localhost 12345; done
run-netcat-tcp-client:
for i in `seq 1 4`; do echo 'control-plane.io' | nc -q 1 -v localhost 12345; done
run-netcat-udp-server:
while true; do nc -kvul localhost 12345; done
run-netcat-udp-client:
for i in `seq 1 4`; do echo 'control-plane.io' | nc -q4 -vu localhost 12345; done
test:
go test -v -race ./...
lint:
golangci-lint run ./...
clean:
@rm -rf bin/packet-capture
docker-build:
docker build -f Dockerfile \
--no-cache \
--tag packet-capture:0.0.1 .