From 076d1d34424763097b1d5242ea966a42d0748376 Mon Sep 17 00:00:00 2001 From: CodeRoK7 <58553260+CodeRoK7@users.noreply.github.com> Date: Tue, 30 Sep 2025 19:38:34 +0000 Subject: [PATCH] Fix install sing-box --- universal_config_new_podkop.sh | 35 +++++++--------------------------- 1 file changed, 7 insertions(+), 28 deletions(-) diff --git a/universal_config_new_podkop.sh b/universal_config_new_podkop.sh index 3dd9832..068e29d 100644 --- a/universal_config_new_podkop.sh +++ b/universal_config_new_podkop.sh @@ -508,6 +508,12 @@ checkPackageAndInstall "unzip" "1" checkPackageAndInstall "opera-proxy" "1" checkPackageAndInstall "zapret" "1" + +INSTALLED_VERSION=$(opkg list-installed | grep "^sing-box") +if [ -z "$INSTALLED_VERSION" ]; then + checkPackageAndInstall "sing-box" "1" +fi + findVersion="1.12.0" if printf '%s\n%s\n' "$findVersion" "$VERSION" | sort -V | tail -n1 | grep -qx -- "$VERSION"; then printf "\033[32;1mInstalled new sing-box. Running scprit...\033[0m\n" @@ -542,7 +548,7 @@ uci set dhcp.@dnsmasq[0].confdir='/tmp/dnsmasq.d' uci commit dhcp DIR="/etc/config" -DIR_BACKUP="/root/backup4" +DIR_BACKUP="/root/backup5" config_files="network firewall doh-proxy @@ -580,33 +586,6 @@ uci set dhcp.cfg01411c.strictorder='1' uci set dhcp.cfg01411c.filter_aaaa='1' uci commit dhcp -cat < /etc/sing-box/config.json -{ - "log": { - "disabled": true, - "level": "error" -}, -"inbounds": [ - { - "type": "tproxy", - "listen": "::", - "listen_port": 1100, - "sniff": false - } -], -"outbounds": [ - { - "type": "http", - "server": "127.0.0.1", - "server_port": 18080 - } -], -"route": { - "auto_detect_interface": true -} -} -EOF - echo "Setting sing-box..." uci set sing-box.main.enabled='1' uci set sing-box.main.user='root'