Skip to content

Commit

Permalink
Merge pull request vernesong#234 from thank243/master
Browse files Browse the repository at this point in the history
修复开启仅内网更新代理失效
  • Loading branch information
vernesong authored Mar 13, 2020
2 parents d863e4f + db166a6 commit 1c8ac25
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
echo "开始获取使用中的第三方规则名称..." >$START_LOG
RUlE_SOURCE=$(uci get openclash.config.rule_source 2>/dev/null)
HTTP_PORT=$(uci get openclash.config.http_port 2>/dev/null)
PROXY_ADDR="127.0.0.1"
PROXY_ADDR=$(uci get network.lan.ipaddr 2>/dev/null |awk -F '/' '{print $1}' 2>/dev/null)

if [ -s "/tmp/openclash.auth" ]; then
PROXY_AUTH=$(cat /tmp/openclash.auth |awk -F '- ' '{print $2}' |sed -n '1p' 2>/dev/null)
fi
Expand Down Expand Up @@ -64,4 +65,4 @@
sleep 10
echo "" >$START_LOG
fi
sed ':label;N;s/\n//;b label' /etc/openclash/lhie1.yaml
sed ':label;N;s/\n//;b label' /etc/openclash/lhie1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ LOG_FILE="/tmp/openclash.log"
LAST_OPVER="/tmp/openclash_last_version"
LAST_VER=$(sed -n 1p "$LAST_OPVER" 2>/dev/null |sed "s/^v//g")
HTTP_PORT=$(uci get openclash.config.http_port 2>/dev/null)
PROXY_ADDR="127.0.0.1"
PROXY_ADDR=$(uci get network.lan.ipaddr 2>/dev/null |awk -F '/' '{print $1}' 2>/dev/null)
if [ -s "/tmp/openclash.auth" ]; then
PROXY_AUTH=$(cat /tmp/openclash.auth |awk -F '- ' '{print $2}' |sed -n '1p' 2>/dev/null)
fi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ LAST_OPVER="/tmp/openclash_last_version"
OP_CV=$(sed -n 1p /etc/openclash/openclash_version 2>/dev/null |awk -F '-' '{print $1}' |awk -F '.' '{print $2$3}')
OP_LV=$(sed -n 1p $LAST_OPVER 2>/dev/null |awk -F '-' '{print $1}' |awk -F '.' '{print $2$3}')
HTTP_PORT=$(uci get openclash.config.http_port 2>/dev/null)
PROXY_ADDR="127.0.0.1"
PROXY_ADDR=$(uci get network.lan.ipaddr 2>/dev/null |awk -F '/' '{print $1}' 2>/dev/null)

if [ -s "/tmp/openclash.auth" ]; then
PROXY_AUTH=$(cat /tmp/openclash.auth |awk -F '- ' '{print $2}' |sed -n '1p' 2>/dev/null)
fi
Expand Down Expand Up @@ -32,4 +33,4 @@ elif [ "$OP_CV" -ge "$OP_LV" ]; then
echo "CheckTime:$CKTIME" >>$LAST_OPVER
elif [ "$OP_CV" -lt "$OP_LV" ]; then
return 2
fi
fi

0 comments on commit 1c8ac25

Please sign in to comment.