Skip to content

Commit

Permalink
user-agent="Clash/LEDE"
Browse files Browse the repository at this point in the history
  • Loading branch information
hubbylei committed Sep 5, 2021
1 parent 4afcb1f commit ff2a489
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions root/usr/share/clash/clash.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,14 @@ else
sleep 1

if [ "$subtype" = "clash" ];then
wget -c4 --no-check-certificate --user-agent="Clash/OpenWRT" "$clash_url" -O 2>&1 >1 $CONFIG_YAML
wget -c4 --no-check-certificate --user-agent="Clash/LEDE" "$clash_url" -O 2>&1 >1 $CONFIG_YAML
if [ "$?" -eq "0" ]; then
echo "${config_name}.yaml#$clash_url#$subtype" >>/usr/share/clashbackup/confit_list.conf
fi
fi

if [ "$subtype" = "ssr2clash" ];then
wget -c4 --no-check-certificate --user-agent="Clash/OpenWRT" "https://gfwsb.114514.best/sub?target=clashr&url=$ssr_url" -O 2>&1 >1 $CONFIG_YAML
wget -c4 --no-check-certificate --user-agent="Clash/LEDE" "https://gfwsb.114514.best/sub?target=clashr&url=$ssr_url" -O 2>&1 >1 $CONFIG_YAML
if [ "$?" -eq "0" ]; then
echo "${config_name}.yaml#$ssr_url#$subtype" >>/usr/share/clashbackup/confit_list.conf
CONFIG_YAMLL="/tmp/conf"
Expand Down Expand Up @@ -106,7 +106,7 @@ else
fi

if [ "$subtype" = "v2clash" ];then
wget -c4 --no-check-certificate --user-agent="Clash/OpenWRT" "https://tgbot.lbyczf.com/v2rayn2clash?url=$v2_url" -O 2>&1 >1 $CONFIG_YAML
wget -c4 --no-check-certificate --user-agent="Clash/LEDE" "https://tgbot.lbyczf.com/v2rayn2clash?url=$v2_url" -O 2>&1 >1 $CONFIG_YAML
if [ "$?" -eq "0" ]; then
echo "${config_name}.yaml#$v2_url#$subtype" >>/usr/share/clashbackup/confit_list.conf
fi
Expand Down
2 changes: 1 addition & 1 deletion root/usr/share/clash/rule.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
rule=$(uci get clash.config.rule_url 2>/dev/null)
RULE_YAML="/tmp/Rule"

wget -c4 --no-check-certificate --user-agent="Clash/OpenWRT" "$rule" -O 2>&1 >1 $RULE_YAML
wget -c4 --no-check-certificate --user-agent="Clash/LEDE" "$rule" -O 2>&1 >1 $RULE_YAML

if [ -f "$RULE_YAML" ]; then
status=$(egrep '^ {0,}Rule:' /tmp/Rule)
Expand Down
6 changes: 3 additions & 3 deletions root/usr/share/clash/update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ if [ $type == "clash" ] && [ ! -z $url ];then
elif [ $lang == "zh_cn" ];then
echo "开始更新配置" >$REAL_LOG
fi
wget --no-check-certificate --user-agent="Clash/OpenWRT" $url -O 2>&1 >1 $CONFIG_YAML
wget --no-check-certificate --user-agent="Clash/LEDE" $url -O 2>&1 >1 $CONFIG_YAML

if [ "$?" -eq "0" ]; then
if [ $lang == "en" ] || [ $lang == "auto" ];then
Expand Down Expand Up @@ -48,7 +48,7 @@ if [ $type == "ssr2clash" ] && [ ! -z $url ];then
elif [ $lang == "zh_cn" ];then
echo "开始更新配置" >$REAL_LOG
fi
wget --no-check-certificate --user-agent="Clash/OpenWRT" "https://ssrsub2clashr.herokuapp.com/ssrsub2clash?sub=$url" -O 2>&1 >1 $CONFIG_YAML
wget --no-check-certificate --user-agent="Clash/LEDE" "https://ssrsub2clashr.herokuapp.com/ssrsub2clash?sub=$url" -O 2>&1 >1 $CONFIG_YAML

if [ "$?" -eq "0" ]; then

Expand Down Expand Up @@ -116,7 +116,7 @@ if [ $type == "v2clash" ] && [ ! -z $url ];then
elif [ $lang == "zh_cn" ];then
echo "开始更新配置" >$REAL_LOG
fi
wget --no-check-certificate --user-agent="Clash/OpenWRT" "https://tgbot.lbyczf.com/v2rayn2clash?url=$url" -O 2>&1 >1 $CONFIG_YAML
wget --no-check-certificate --user-agent="Clash/LEDE" "https://tgbot.lbyczf.com/v2rayn2clash?url=$url" -O 2>&1 >1 $CONFIG_YAML

if [ "$?" -eq "0" ]; then
if [ $lang == "en" ] || [ $lang == "auto" ];then
Expand Down
6 changes: 3 additions & 3 deletions root/usr/share/clash/update_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ if [ $type == "clash" ] && [ ! -z $url ];then
elif [ $lang == "zh_cn" ];then
echo "开始更新配置" >$REAL_LOG
fi
wget --no-check-certificate --user-agent="Clash/OpenWRT" $url -O 2>&1 >1 $CONFIG_YAML
wget --no-check-certificate --user-agent="Clash/LEDE" $url -O 2>&1 >1 $CONFIG_YAML
sleep 3
if [ "$?" -eq "0" ]; then
if [ $lang == "en" ] || [ $lang == "auto" ];then
Expand All @@ -49,7 +49,7 @@ if [ $type == "ssr2clash" ] && [ ! -z $url ];then
elif [ $lang == "zh_cn" ];then
echo "开始更新配置" >$REAL_LOG
fi
wget --no-check-certificate --user-agent="Clash/OpenWRT" "https://ssrsub2clashr.herokuapp.com/ssrsub2clash?sub=$url" -O 2>&1 >1 $CONFIG_YAML
wget --no-check-certificate --user-agent="Clash/LEDE" "https://ssrsub2clashr.herokuapp.com/ssrsub2clash?sub=$url" -O 2>&1 >1 $CONFIG_YAML
sleep 3
if [ "$?" -eq "0" ]; then

Expand Down Expand Up @@ -113,7 +113,7 @@ if [ $type == "v2clash" ] && [ ! -z $url ];then
elif [ $lang == "zh_cn" ];then
echo "开始更新配置" >$REAL_LOG
fi
wget --no-check-certificate --user-agent="Clash/OpenWRT" "https://tgbot.lbyczf.com/v2rayn2clash?url=$url" -O 2>&1 >1 $CONFIG_YAML
wget --no-check-certificate --user-agent="Clash/LEDE" "https://tgbot.lbyczf.com/v2rayn2clash?url=$url" -O 2>&1 >1 $CONFIG_YAML
sleep 3
if [ "$?" -eq "0" ]; then
if [ $lang == "en" ] || [ $lang == "auto" ];then
Expand Down

0 comments on commit ff2a489

Please sign in to comment.