From b2fc7e651391c17e49019f6438aba663b28f379d Mon Sep 17 00:00:00 2001 From: itdoginfo Date: Tue, 24 Oct 2023 14:16:38 +0300 Subject: [PATCH] Added checks: xray packages, IPv6, route table for sing-box and tun2socks --- getdomains-check.sh | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/getdomains-check.sh b/getdomains-check.sh index 5694b5e..2d4dc02 100755 --- a/getdomains-check.sh +++ b/getdomains-check.sh @@ -54,6 +54,15 @@ else fi fi +# Chek xray package +if opkg list-installed | grep -q xray-core; then + checkpoint_false "Xray-core package detected" +fi + +if opkg list-installed | grep -q luci-app-xray; then + checkpoint_false "luci-app-xray package detected. Not compatible. For delete: opkg remove luci-app-xray --force-removal-of-dependent-packages" +fi + # Check dnsmasq DNSMASQ_RUN=$(service dnsmasq status | grep -c 'running') if [ $DNSMASQ_RUN -eq 1 ]; then @@ -78,6 +87,12 @@ if curl -Is https://community.antifilter.download/ | grep -q 200; then fi fi +# Check IPv6 + +if curl -6 -s https://ifconfig.io | egrep -q "(::)?[0-9a-fA-F]{1,4}(::?[0-9a-fA-F]{1,4}){1,7}(::)?"; then + checkpoint_false "IPv6 detected. This script does not currently work with IPv6" +fi + # Tunnels WIREGUARD=$(opkg list-installed | grep -c wireguard-tools ) if [ $WIREGUARD -eq 1 ]; then @@ -162,6 +177,13 @@ fi if opkg list-installed | grep -q sing-box; then checkpoint_true "Sing-box package" + # Check route table + if ip route show table vpn | grep -q "default dev tun0 scope link"; then + checkpoint_true "Route table Sing-box" + else + checkpoint_false "Route table Sing-box. Try service network restart. Details: https://cli.co/n7xAbc1" + fi + IP_EXTERNAL=$(curl -s ifconfig.me) IFCONFIG=$(nslookup -type=a ifconfig.me | awk '/^Address: / {print $2}') @@ -182,6 +204,13 @@ fi if which tun2socks | grep -q tun2socks; then checkpoint_true "tun2socks package" + # Check route table + if ip route show table vpn | grep -q "default dev tun0 scope link"; then + checkpoint_true "Route table tun2socks" + else + checkpoint_false "Route table tun2socks. Try service network restart. Details: https://cli.co/n7xAbc1" + fi + IP_EXTERNAL=$(curl -s ifconfig.me) IFCONFIG=$(nslookup -type=a ifconfig.me | awk '/^Address: / {print $2}') @@ -464,4 +493,4 @@ fi # Info echo -e "\nTelegram channel: https://t.me/itdoginfo" -echo "Telegram chat: https://t.me/itdogchat" +echo "Telegram chat: https://t.me/itdogchat" \ No newline at end of file