From a6867cc0347ff7a0453eb50955a3af201c39c879 Mon Sep 17 00:00:00 2001 From: kissshot <4530897+kkkgo@users.noreply.github.com> Date: Sat, 25 May 2024 16:17:12 +0800 Subject: [PATCH] Update ppg.sh --- FILES/usr/bin/ppg.sh | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/FILES/usr/bin/ppg.sh b/FILES/usr/bin/ppg.sh index 292f2aa..1b26dee 100644 --- a/FILES/usr/bin/ppg.sh +++ b/FILES/usr/bin/ppg.sh @@ -244,23 +244,23 @@ load_clash() { if ps | grep -v "grep" | grep "/etc/config/sing-box"; then log "[OK] SNIFF OK." succ else - if [ -f /www/sniffdns ]; then - # if [ -z "$dns_ip" ]; then - # dns_ip="1.0.0.1" - # fi - # if [ -z "$dns_port" ]; then - # dns_port="53" - # fi - # sed "s/dns_ip/$dns_ip/g" /etc/config/sing-box/sniff.json >/tmp/sniff.json - # sed -i "s/dns_port/$dns_port/g" /tmp/sniff.json - # if ps | grep -v "grep" | grep "d /etc/config/clash"; then - # /usr/bin/sing-box run -c /tmp/sniff.json >/dev/tty0 2>&1 & - # fi - # else - if ps | grep -v "grep" | grep "d /etc/config/clash"; then - /usr/bin/sing-box run -c /etc/config/sing-box/sniff.json >/dev/tty0 2>&1 & - fi + # if [ -f /www/sniffdns ]; then + # if [ -z "$dns_ip" ]; then + # dns_ip="1.0.0.1" + # fi + # if [ -z "$dns_port" ]; then + # dns_port="53" + # fi + # sed "s/dns_ip/$dns_ip/g" /etc/config/sing-box/sniff.json >/tmp/sniff.json + # sed -i "s/dns_port/$dns_port/g" /tmp/sniff.json + # if ps | grep -v "grep" | grep "d /etc/config/clash"; then + # /usr/bin/sing-box run -c /tmp/sniff.json >/dev/tty0 2>&1 & + # fi + # else + if ps | grep -v "grep" | grep "d /etc/config/clash"; then + /usr/bin/sing-box run -c /etc/config/sing-box/sniff.json >/dev/tty0 2>&1 & fi + # fi fi fi if [ ! -f /etc/watch ]; then