From 5297f61f9f02c8cb8786eddcd586e6973e49b3ea Mon Sep 17 00:00:00 2001 From: Jett Chen Date: Thu, 14 Dec 2023 14:14:53 +0800 Subject: [PATCH] add makefile --- Makefile | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..2988e5c --- /dev/null +++ b/Makefile @@ -0,0 +1,18 @@ +tun_num := $(shell ifconfig | awk -F 'utun|[: ]' '/utun[0-9]/ {print $$2}' | tail -n 1) + +check: + @cargo check + +build: + @cargo run build + +daemon: + @RUST_BACKTRACE=1 RUST_LOG=debug cargo run daemon + +start: + @RUST_BACKTRACE=1 RUST_LOG=debug cargo run start + +test-dns: + @sudo route delete 8.8.8.8 + @sudo route add 8.8.8.8 -interface utun$(tun_num) + @dig @8.8.8.8 hackclub.com