-
Notifications
You must be signed in to change notification settings - Fork 182
/
Copy pathdebug.sh
65 lines (64 loc) · 1.1 KB
/
debug.sh
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
56
57
58
59
60
61
62
63
64
65
#!/bin/sh
{
echo "# MihomoTProxy Debug Info"
echo "## system"
echo "\`\`\`shell"
cat /etc/openwrt_release
echo "\`\`\`"
echo "## kernel"
echo "\`\`\`"
uname -a
echo "\`\`\`"
echo "## application"
echo "\`\`\`"
opkg list-installed | grep mihomo
echo "\`\`\`"
echo "## config"
echo "\`\`\`"
uci show mihomo
echo "\`\`\`"
echo "## profile"
echo "\`\`\`yaml"
cat /etc/mihomo/run/config.yaml
echo "\`\`\`"
echo "## ip rule"
echo "\`\`\`"
ip rule list
echo "\`\`\`"
echo "## ip route"
echo "\`\`\`"
echo "TPROXY: "
ip route list table 80
echo
echo "TUN: "
ip route list table 81
echo "\`\`\`"
echo "## ip6 rule"
echo "\`\`\`"
ip -6 rule list
echo "\`\`\`"
echo "## ip6 route"
echo "\`\`\`"
echo "TPROXY: "
ip -6 route list table 80
echo
echo "TUN: "
ip -6 route list table 81
echo "\`\`\`"
echo "## nftables"
echo "\`\`\`"
nft list ruleset
echo "\`\`\`"
echo "## service"
echo "\`\`\`json"
service mihomo info
echo "\`\`\`"
echo "## process"
echo "\`\`\`"
ps | grep mihomo
echo "\`\`\`"
echo "## netstat"
echo "\`\`\`"
netstat -nalp | grep mihomo
echo "\`\`\`"
} > debug.md