-
Notifications
You must be signed in to change notification settings - Fork 17
/
Makefile
55 lines (42 loc) · 1.16 KB
/
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
tun := $(shell ifconfig -l | sed 's/ /\n/g' | grep utun | tail -n 1)
cargo_console := RUST_BACKTRACE=1 RUST_LOG=debug RUSTFLAGS='--cfg tokio_unstable' cargo run --all-features
cargo_norm := RUST_BACKTRACE=1 RUST_LOG=debug cargo run
check:
@cargo check
build:
@cargo run build
daemon-console:
@$(cargo_console) daemon
daemon:
@$(cargo_norm) daemon
start:
@$(cargo_norm) start
stop:
@$(cargo_norm) stop
status:
@$(cargo_norm) server-status
tunnel-config:
@$(cargo_norm) tunnel-config
test-dns:
@sudo route delete 8.8.8.8
@sudo route add 8.8.8.8 -interface $(tun)
@dig @8.8.8.8 hackclub.com
test-https:
@sudo route delete 193.183.0.162
@sudo route add 193.183.0.162 -interface $(tun)
@curl -vv https://search.marginalia.nu
v4_target := 146.190.62.39
test-http:
@sudo route delete ${v4_target}
@sudo route add ${v4_target} -interface $(tun)
@curl -vv ${v4_target}:80
test-ipv4:
@sudo route delete ${v4_target}
@sudo route add ${v4_target} -interface $(tun)
@ping ${v4_target}
v6_target := 2001:4860:4860::8888
test-ipv6:
@sudo route delete ${v6_target}
@sudo route -n add -inet6 ${v6_target} -interface $(tun)
@echo preparing
@sudo ping6 -v ${v6_target}