Add check install opera-proxy

This commit is contained in:
CodeRoK7
2025-07-08 10:57:01 +00:00
parent 73871d0864
commit b159e3caea

View File

@@ -532,19 +532,22 @@ uci set dhcp.cfg01411c.strictorder='1'
uci set dhcp.cfg01411c.filter_aaaa='1' uci set dhcp.cfg01411c.filter_aaaa='1'
uci commit dhcp uci commit dhcp
echo "Install opera-proxy client..." if opkg list-installed | grep -q opera-proxy; then
service stop vpn > /dev/null echo "Opera-proxy already installed..."
rm -f /usr/bin/vpns /etc/init.d/vpn else
echo "Install opera-proxy client..."
service stop vpn > /dev/null
rm -f /usr/bin/vpns /etc/init.d/vpn
url="https://github.com/NitroOxid/openwrt-opera-proxy-bin/releases/download/1.8.0/opera-proxy_1.8.0-1_aarch64_cortex-a53.ipk" url="https://github.com/NitroOxid/openwrt-opera-proxy-bin/releases/download/1.8.0/opera-proxy_1.8.0-1_aarch64_cortex-a53.ipk"
destination_file="/tmp/opera-proxy.ipk" destination_file="/tmp/opera-proxy.ipk"
echo "Downloading opera-proxy..." echo "Downloading opera-proxy..."
wget "$url" -O "$destination_file" || { echo "Failed to download the file"; exit 1; } wget "$url" -O "$destination_file" || { echo "Failed to download the file"; exit 1; }
echo "Installing opera-proxy..." echo "Installing opera-proxy..."
opkg install $destination_file opkg install $destination_file
cat <<EOF > /etc/sing-box/config.json cat <<EOF > /etc/sing-box/config.json
{ {
"log": { "log": {
"disabled": true, "disabled": true,
@@ -568,13 +571,14 @@ cat <<EOF > /etc/sing-box/config.json
"route": { "route": {
"auto_detect_interface": true "auto_detect_interface": true
} }
} }
EOF EOF
echo "Setting sing-box..." echo "Setting sing-box..."
uci set sing-box.main.enabled='1' uci set sing-box.main.enabled='1'
uci set sing-box.main.user='root' uci set sing-box.main.user='root'
uci commit sing-box uci commit sing-box
fi
nameRule="option name 'Block_UDP_443'" nameRule="option name 'Block_UDP_443'"
str=$(grep -i "$nameRule" /etc/config/firewall) str=$(grep -i "$nameRule" /etc/config/firewall)