mirror of
https://github.com/juewuy/ShellCrash.git
synced 2024-11-16 11:42:18 +08:00
v1.5.8
~同步最新版本meta-alpha内核 ~增加屏蔽QUIC功能(2-7) ~更新部分下载源及sub源 ~修复开机启动偶尔显示不正常的bug ~修复部分报错问题
This commit is contained in:
parent
a44e53aad7
commit
c811031108
17
README.md
17
README.md
|
@ -37,9 +37,11 @@ opkg update && opkg install curl
|
||||||
##### ~Use curl:<br>
|
##### ~Use curl:<br>
|
||||||
|
|
||||||
```Shell
|
```Shell
|
||||||
|
#by fastgit.org
|
||||||
|
export url='https://raw.fastgit.org/juewuy/ShellClash/master' && sh -c "$(curl -kfsSl $url/install.sh)" && source /etc/profile &> /dev/null
|
||||||
#by GitHub
|
#by GitHub
|
||||||
export url='https://raw.githubusercontent.com/juewuy/ShellClash/master' && sh -c "$(curl -kfsSl $url/install.sh)" && source /etc/profile &> /dev/null
|
export url='https://raw.githubusercontent.com/juewuy/ShellClash/master' && sh -c "$(curl -kfsSl $url/install.sh)" && source /etc/profile &> /dev/null
|
||||||
#by jsDelivrCDN
|
#by jsDelivr-CDN
|
||||||
export url='https://cdn.jsdelivr.net/gh/juewuy/ShellClash@master' && sh -c "$(curl -kfsSl $url/install.sh)" && source /etc/profile &> /dev/null
|
export url='https://cdn.jsdelivr.net/gh/juewuy/ShellClash@master' && sh -c "$(curl -kfsSl $url/install.sh)" && source /etc/profile &> /dev/null
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -52,20 +54,13 @@ export url='https://raw.githubusercontent.com/juewuy/ShellClash/master' && wget
|
||||||
export url='https://cdn.jsdelivr.net/gh/juewuy/ShellClash@master' && wget -q --no-check-certificate -O /tmp/install.sh $url/install.sh && sh /tmp/install.sh && source /etc/profile &> /dev/null
|
export url='https://cdn.jsdelivr.net/gh/juewuy/ShellClash@master' && wget -q --no-check-certificate -O /tmp/install.sh $url/install.sh && sh /tmp/install.sh && source /etc/profile &> /dev/null
|
||||||
```
|
```
|
||||||
|
|
||||||
~**Use a low version of wget (prompt not to support https) local installation**:<br> First clone the project to the local under the window (or [click to download the project source code zip package](https://github.com/juewuy/ShellClash/archive/refs/heads/master.zip) to the local and decompress it)
|
~**Use a low version of wget (prompt not to support https) local installation**:<br>
|
||||||
|
|
||||||
```Shell
|
```Shell
|
||||||
sh git clone https://github.com/juewuy/ShellClash.git
|
#by shellclash.ga
|
||||||
|
export url='http://shellclash.ga/' && wget -q -O /tmp/install.sh $url/install.sh && sh /tmp/install.sh && source /etc/profile &> /dev/null
|
||||||
```
|
```
|
||||||
|
|
||||||
Then open /project address/ShellClash/bin/hfs/hfs.exe Click menu-add directory from disk-{find the directory where ShellClash source code is located}-add as real directory Click on the menu-IP address-{choose the actual IP address of your LAN} Click ShellClash-click to copy to clipboard Then use the following command to install in SSH
|
|
||||||
|
|
||||||
```Shell
|
|
||||||
sh export url='Paste the copied address here' && wget -q -O /tmp/install.sh $url/install.sh && sh /tmp/install.sh && source /etc/profile &> /dev/null
|
|
||||||
```
|
|
||||||
|
|
||||||
Later, when updating the version, you need to update the local version library and open the hfs service, and then update in the SSH menu, and then you can build a local server through hfs to realize the function of uploading and updating the yaml configuration file
|
|
||||||
|
|
||||||
~**After installation by non-root users**, please execute the following additional commands to read environment variables:<br>
|
~**After installation by non-root users**, please execute the following additional commands to read environment variables:<br>
|
||||||
|
|
||||||
```Shell
|
```Shell
|
||||||
|
|
|
@ -47,10 +47,14 @@ opkg update && opkg install curl #如已安装请忽略
|
||||||
~**使用curl安装**:<br>
|
~**使用curl安装**:<br>
|
||||||
|
|
||||||
```Shell
|
```Shell
|
||||||
|
#fastgit.org加速
|
||||||
|
export url='https://raw.fastgit.org/juewuy/ShellClash/master' && sh -c "$(curl -kfsSl $url/install.sh)" && source /etc/profile &> /dev/null
|
||||||
#GitHub源
|
#GitHub源
|
||||||
export url='https://raw.githubusercontent.com/juewuy/ShellClash/master' && sh -c "$(curl -kfsSl $url/install.sh)" && source /etc/profile &> /dev/null
|
export url='https://raw.githubusercontent.com/juewuy/ShellClash/master' && sh -c "$(curl -kfsSl $url/install.sh)" && source /etc/profile &> /dev/null
|
||||||
#jsDelivrCDN源
|
#jsDelivrCDN源
|
||||||
export url='https://cdn.jsdelivr.net/gh/juewuy/ShellClash@master' && sh -c "$(curl -kfsSl $url/install.sh)" && source /etc/profile &> /dev/null
|
export url='https://cdn.jsdelivr.net/gh/juewuy/ShellClash@master' && sh -c "$(curl -kfsSl $url/install.sh)" && source /etc/profile &> /dev/null
|
||||||
|
#作者私人源
|
||||||
|
export url='https://shellclash.ga' && sh -c "$(curl -kfsSl $url/install.sh)" && source /etc/profile &> /dev/null
|
||||||
```
|
```
|
||||||
|
|
||||||
~**使用wget安装**:<br>
|
~**使用wget安装**:<br>
|
||||||
|
@ -60,6 +64,8 @@ export url='https://cdn.jsdelivr.net/gh/juewuy/ShellClash@master' && sh -c "$(cu
|
||||||
export url='https://raw.githubusercontent.com/juewuy/ShellClash/master' && wget -q --no-check-certificate -O /tmp/install.sh $url/install.sh && sh /tmp/install.sh && source /etc/profile &> /dev/null
|
export url='https://raw.githubusercontent.com/juewuy/ShellClash/master' && wget -q --no-check-certificate -O /tmp/install.sh $url/install.sh && sh /tmp/install.sh && source /etc/profile &> /dev/null
|
||||||
#jsDelivrCDN源
|
#jsDelivrCDN源
|
||||||
export url='https://cdn.jsdelivr.net/gh/juewuy/ShellClash@master' && wget -q --no-check-certificate -O /tmp/install.sh $url/install.sh && sh /tmp/install.sh && source /etc/profile &> /dev/null
|
export url='https://cdn.jsdelivr.net/gh/juewuy/ShellClash@master' && wget -q --no-check-certificate -O /tmp/install.sh $url/install.sh && sh /tmp/install.sh && source /etc/profile &> /dev/null
|
||||||
|
#作者私人源
|
||||||
|
export url='http://shellclash.ga/' && wget -q -O /tmp/install.sh $url/install.sh && sh /tmp/install.sh && source /etc/profile &> /dev/null
|
||||||
```
|
```
|
||||||
|
|
||||||
~**使用低版本wget(提示不支持https)安装**:<br>
|
~**使用低版本wget(提示不支持https)安装**:<br>
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -1,6 +1,6 @@
|
||||||
clashnet_v=v1.7.6
|
clashnet_v=v1.7.6
|
||||||
clashpre_v=2021.09.15
|
clashpre_v=2021.09.15
|
||||||
clash_v=v1.7.1
|
clash_v=v1.7.1
|
||||||
versionsh=1.5.6fix
|
|
||||||
meta_v=1.10.0
|
|
||||||
GeoIP_v=20220405
|
GeoIP_v=20220405
|
||||||
|
meta_v=alpha
|
||||||
|
versionsh=1.5.7
|
||||||
|
|
|
@ -732,6 +732,7 @@ clashcfg(){
|
||||||
[ -z "$dns_mod" ] && dns_mod=redir_host
|
[ -z "$dns_mod" ] && dns_mod=redir_host
|
||||||
[ -z "$dns_over" ] && dns_over=已开启
|
[ -z "$dns_over" ] && dns_over=已开启
|
||||||
[ -z "$cn_ip_route" ] && cn_ip_route=未开启
|
[ -z "$cn_ip_route" ] && cn_ip_route=未开启
|
||||||
|
[ -z "$quic_rj" ] && quic_rj=未开启
|
||||||
[ -z "$(cat $clashdir/mac)" ] && mac_return=未开启 || mac_return=已启用
|
[ -z "$(cat $clashdir/mac)" ] && mac_return=未开启 || mac_return=已启用
|
||||||
#
|
#
|
||||||
echo -----------------------------------------------
|
echo -----------------------------------------------
|
||||||
|
@ -743,9 +744,10 @@ clashcfg(){
|
||||||
echo -e " 4 只代理常用端口: \033[36m$common_ports\033[0m ————用于过滤P2P流量"
|
echo -e " 4 只代理常用端口: \033[36m$common_ports\033[0m ————用于过滤P2P流量"
|
||||||
echo -e " 5 过滤局域网设备: \033[36m$mac_return\033[0m ————使用黑/白名单进行过滤"
|
echo -e " 5 过滤局域网设备: \033[36m$mac_return\033[0m ————使用黑/白名单进行过滤"
|
||||||
echo -e " 6 设置本机代理服务: \033[36m$local_proxy\033[0m ————使本机流量经过clash内核"
|
echo -e " 6 设置本机代理服务: \033[36m$local_proxy\033[0m ————使本机流量经过clash内核"
|
||||||
|
echo -e " 7 屏蔽QUIC流量: \033[36m$quic_rj\033[0m ————优化视频性能"
|
||||||
[ "$dns_mod" = "fake-ip" ] && \
|
[ "$dns_mod" = "fake-ip" ] && \
|
||||||
echo -e " 7 管理Fake-ip过滤列表" || \
|
echo -e " 8 管理Fake-ip过滤列表" || \
|
||||||
echo -e " 7 CN_IP绕过内核: \033[36m$cn_ip_route\033[0m ————优化性能,不兼容Fake-ip"
|
echo -e " 8 CN_IP绕过内核: \033[36m$cn_ip_route\033[0m ————优化性能,不兼容Fake-ip"
|
||||||
echo -----------------------------------------------
|
echo -----------------------------------------------
|
||||||
echo -e " 0 返回上级菜单 \033[0m"
|
echo -e " 0 返回上级菜单 \033[0m"
|
||||||
echo -----------------------------------------------
|
echo -----------------------------------------------
|
||||||
|
@ -782,7 +784,7 @@ clashcfg(){
|
||||||
|
|
||||||
elif [ "$num" = 4 ]; then
|
elif [ "$num" = 4 ]; then
|
||||||
echo -----------------------------------------------
|
echo -----------------------------------------------
|
||||||
if [ "$common_ports" = "未开启" ] > /dev/null 2>&1; then
|
if [ "$common_ports" = "未开启" ]; then
|
||||||
echo -e "\033[33m已设为仅代理【$multiport】等常用端口!!\033[0m"
|
echo -e "\033[33m已设为仅代理【$multiport】等常用端口!!\033[0m"
|
||||||
common_ports=已开启
|
common_ports=已开启
|
||||||
else
|
else
|
||||||
|
@ -802,6 +804,22 @@ clashcfg(){
|
||||||
clashcfg
|
clashcfg
|
||||||
|
|
||||||
elif [ "$num" = 7 ]; then
|
elif [ "$num" = 7 ]; then
|
||||||
|
echo -----------------------------------------------
|
||||||
|
if [ "$redir_mod" = "混合模式" -o "$redir_mod" = "Tun模式" -o "$tproxy_mod" = "已开启" ];then
|
||||||
|
if [ "$quic_rj" = "未开启" ]; then
|
||||||
|
echo -e "\033[33m已禁止QUCI流量通过clash内核!!\033[0m"
|
||||||
|
quic_rj=已启用
|
||||||
|
else
|
||||||
|
echo -e "\033[33m已取消禁止QUIC协议流量!!\033[0m"
|
||||||
|
quic_rj=未开启
|
||||||
|
fi
|
||||||
|
setconfig quic_rj $quic_rj
|
||||||
|
else
|
||||||
|
echo -e "\033[33m当前模式默认不会代理UDP流量,无需设置!!\033[0m"
|
||||||
|
fi
|
||||||
|
clashcfg
|
||||||
|
|
||||||
|
elif [ "$num" = 8 ]; then
|
||||||
echo -----------------------------------------------
|
echo -----------------------------------------------
|
||||||
if [ "$dns_mod" = "fake-ip" ];then
|
if [ "$dns_mod" = "fake-ip" ];then
|
||||||
fake_ip_filter
|
fake_ip_filter
|
||||||
|
|
|
@ -41,7 +41,7 @@ linkserver(){
|
||||||
echo 当前使用后端为:$server_link
|
echo 当前使用后端为:$server_link
|
||||||
echo 1 api.dler.io (墙洞提供)
|
echo 1 api.dler.io (墙洞提供)
|
||||||
echo 2 sub.shellclash.ga (作者提供)
|
echo 2 sub.shellclash.ga (作者提供)
|
||||||
echo 3 api.wcc.best (sub_web作者提供)
|
echo 3 sub.xeton.dev (SUB作者T大提供)
|
||||||
echo 4 sub.id9.cc (品云提供)
|
echo 4 sub.id9.cc (品云提供)
|
||||||
echo 5 sub.maoxiongnet.com (猫熊提供)
|
echo 5 sub.maoxiongnet.com (猫熊提供)
|
||||||
echo -----------------------------------------------
|
echo -----------------------------------------------
|
||||||
|
@ -749,7 +749,8 @@ setserver(){
|
||||||
echo -e " 2 \033[36m测试版\033[0m&Github源(本机clash服务加速)"
|
echo -e " 2 \033[36m测试版\033[0m&Github源(本机clash服务加速)"
|
||||||
echo -e " 3 \033[36m测试版\033[0m&Jsdelivr-CDN源"
|
echo -e " 3 \033[36m测试版\033[0m&Jsdelivr-CDN源"
|
||||||
echo -e " 4 \033[36m测试版\033[0m&Github源(githubusercontents加速)"
|
echo -e " 4 \033[36m测试版\033[0m&Github源(githubusercontents加速)"
|
||||||
[ -z "$(curl -V 2>/dev/null)" ] && [ -n "$(wget -V 2>&1 | grep BusyBox)" ] && echo -e " 5 \033[33mHttp专用源\033[0m"
|
echo -e " 4 \033[36m测试版\033[0m&Github源(fastgit.org加速)"
|
||||||
|
[ -z "$(curl -V 2>/dev/null)" ] && [ -n "$(wget -V 2>&1 | grep BusyBox)" ] && echo -e " 7 \033[33mHttp专用源\033[0m"
|
||||||
echo -e " 8 自定义源地址(用于本地源或自建源)"
|
echo -e " 8 自定义源地址(用于本地源或自建源)"
|
||||||
echo -e " 9 \033[31m版本回退\033[0m"
|
echo -e " 9 \033[31m版本回退\033[0m"
|
||||||
echo -e " 0 返回上级菜单"
|
echo -e " 0 返回上级菜单"
|
||||||
|
@ -772,6 +773,10 @@ setserver(){
|
||||||
release_url=''
|
release_url=''
|
||||||
saveserver
|
saveserver
|
||||||
elif [ "$num" = 5 ]; then
|
elif [ "$num" = 5 ]; then
|
||||||
|
update_url='https://raw.fastgit.org/juewuy/ShellClash/master'
|
||||||
|
release_url=''
|
||||||
|
saveserver
|
||||||
|
elif [ "$num" = 7 ]; then
|
||||||
update_url='http://shellclash.ga'
|
update_url='http://shellclash.ga'
|
||||||
release_url=''
|
release_url=''
|
||||||
saveserver
|
saveserver
|
||||||
|
|
|
@ -144,7 +144,7 @@ getyaml(){
|
||||||
Server=`sed -n ""$server_link"p"<<EOF
|
Server=`sed -n ""$server_link"p"<<EOF
|
||||||
https://api.dler.io
|
https://api.dler.io
|
||||||
http://sub.shellclash.ga
|
http://sub.shellclash.ga
|
||||||
https://api.wcc.best
|
https://sub.xeton.dev
|
||||||
https://sub.id9.cc
|
https://sub.id9.cc
|
||||||
https://sub.maoxiongnet.com
|
https://sub.maoxiongnet.com
|
||||||
EOF`
|
EOF`
|
||||||
|
@ -172,7 +172,7 @@ EOF`
|
||||||
if [ -z "$Https" ];then
|
if [ -z "$Https" ];then
|
||||||
[ -n "$(echo $Url | grep -o 'vless')" ] && Server='http://sub.shellclash.ga'
|
[ -n "$(echo $Url | grep -o 'vless')" ] && Server='http://sub.shellclash.ga'
|
||||||
Https="$Server/sub?target=clash&insert=true&new_name=true&scv=true&udp=true&exclude=$exclude&include=$include&url=$Url&config=$Config"
|
Https="$Server/sub?target=clash&insert=true&new_name=true&scv=true&udp=true&exclude=$exclude&include=$include&url=$Url&config=$Config"
|
||||||
markhttp=1
|
url_type=true
|
||||||
fi
|
fi
|
||||||
#输出
|
#输出
|
||||||
echo -----------------------------------------------
|
echo -----------------------------------------------
|
||||||
|
@ -185,7 +185,7 @@ EOF`
|
||||||
rm -rf $yamlnew
|
rm -rf $yamlnew
|
||||||
$0 webget $yamlnew $Https
|
$0 webget $yamlnew $Https
|
||||||
if [ "$?" = "1" ];then
|
if [ "$?" = "1" ];then
|
||||||
if [ -z "$markhttp" ];then
|
if [ -z "$url_type" ];then
|
||||||
echo -----------------------------------------------
|
echo -----------------------------------------------
|
||||||
logger "配置文件获取失败!" 31
|
logger "配置文件获取失败!" 31
|
||||||
echo -e "\033[31m请尝试使用【在线生成配置文件】功能!\033[0m"
|
echo -e "\033[31m请尝试使用【在线生成配置文件】功能!\033[0m"
|
||||||
|
@ -255,12 +255,14 @@ EOF`
|
||||||
echo -----------------------------------------------
|
echo -----------------------------------------------
|
||||||
fi
|
fi
|
||||||
#检测并去除无效节点组
|
#检测并去除无效节点组
|
||||||
|
[ -n "$url_type" ] && type xargs >/dev/null 2>&1 && {
|
||||||
cat $yamlnew | grep -A 8 "\-\ name:" | xargs | sed 's/- name: /\n/g' | sed 's/ type: .*proxies: /#/g' | sed 's/ rules:.*//g' | sed 's/- //g' | grep -E '#DIRECT $' | awk -F '#' '{print $1}' > /tmp/clash_proxies_$USER
|
cat $yamlnew | grep -A 8 "\-\ name:" | xargs | sed 's/- name: /\n/g' | sed 's/ type: .*proxies: /#/g' | sed 's/ rules:.*//g' | sed 's/- //g' | grep -E '#DIRECT $' | awk -F '#' '{print $1}' > /tmp/clash_proxies_$USER
|
||||||
while read line ;do
|
while read line ;do
|
||||||
sed -i "/- $line/d" $yamlnew
|
sed -i "/- $line/d" $yamlnew
|
||||||
sed -i "/- name: $line/,/- DIRECT/d" $yamlnew
|
sed -i "/- name: $line/,/- DIRECT/d" $yamlnew
|
||||||
done < /tmp/clash_proxies_$USER
|
done < /tmp/clash_proxies_$USER
|
||||||
rm -rf /tmp/clash_proxies_$USER
|
rm -rf /tmp/clash_proxies_$USER
|
||||||
|
}
|
||||||
#使用核心内置test功能检测
|
#使用核心内置test功能检测
|
||||||
if [ -x $bindir/clash ];then
|
if [ -x $bindir/clash ];then
|
||||||
$bindir/clash -t -d $bindir -f $yamlnew >/dev/null
|
$bindir/clash -t -d $bindir -f $yamlnew >/dev/null
|
||||||
|
@ -292,8 +294,8 @@ modify_yaml(){
|
||||||
external="external-controller: 0.0.0.0:$db_port"
|
external="external-controller: 0.0.0.0:$db_port"
|
||||||
[ -d $clashdir/ui ] && db_ui=ui
|
[ -d $clashdir/ui ] && db_ui=ui
|
||||||
if [ "$redir_mod" = "混合模式" -o "$redir_mod" = "Tun模式" ];then
|
if [ "$redir_mod" = "混合模式" -o "$redir_mod" = "Tun模式" ];then
|
||||||
[ "$clashcore" = "clash.meta" ] && stack=gvisor || stack=system
|
#[ "$clashcore" = "clash.meta" ] && stack=gvisor || stack=system
|
||||||
tun="tun: {enable: true, stack: $stack}"
|
tun="tun: {enable: true, stack: system}"
|
||||||
else
|
else
|
||||||
tun='tun: {enable: false}'
|
tun='tun: {enable: false}'
|
||||||
fi
|
fi
|
||||||
|
@ -446,6 +448,11 @@ start_redir(){
|
||||||
iptables -t nat -I PREROUTING -p tcp -d 8.8.4.4 -j clash
|
iptables -t nat -I PREROUTING -p tcp -d 8.8.4.4 -j clash
|
||||||
#Docker特殊处理
|
#Docker特殊处理
|
||||||
[ "$local_proxy" = "已开启" ] && iptables -t nat -I PREROUTING -s 172.16.0.0/12 -j clash
|
[ "$local_proxy" = "已开启" ] && iptables -t nat -I PREROUTING -s 172.16.0.0/12 -j clash
|
||||||
|
#禁用QUIC
|
||||||
|
if [ "$quic_rj" = 已启用 ] && [ "$redir_mod" = "混合模式" -o "$redir_mod" = "Tun模式" -o "$tproxy_mod" = "已开启" ];then
|
||||||
|
[ "$dns_mod" = "redir_host" -a "$cn_ip_route" = "已开启" ] && set_cn_ip='-m set ! --match-set cn_ip dst'
|
||||||
|
iptables -I INPUT -p udp --dport 443 -m comment --comment "ShellClash QUIC REJECT" $set_cn_ip -j REJECT >/dev/null 2>&1
|
||||||
|
fi
|
||||||
#设置ipv6转发
|
#设置ipv6转发
|
||||||
ip6_nat=$(ip6tables -t nat -L 2>&1 | grep -o 'Chain')
|
ip6_nat=$(ip6tables -t nat -L 2>&1 | grep -o 'Chain')
|
||||||
if [ -n "$ip6_nat" -a "$ipv6_support" = "已开启" ];then
|
if [ -n "$ip6_nat" -a "$ipv6_support" = "已开启" ];then
|
||||||
|
@ -613,6 +620,8 @@ stop_iptables(){
|
||||||
iptables -t mangle -D PREROUTING -p udp -j clash 2> /dev/null
|
iptables -t mangle -D PREROUTING -p udp -j clash 2> /dev/null
|
||||||
iptables -t mangle -F clash 2> /dev/null
|
iptables -t mangle -F clash 2> /dev/null
|
||||||
iptables -t mangle -X clash 2> /dev/null
|
iptables -t mangle -X clash 2> /dev/null
|
||||||
|
iptables -D INPUT -p udp --dport 443 -m comment --comment "ShellClash QUIC REJECT" -j REJECT >/dev/null 2>&1
|
||||||
|
iptables -D INPUT -p udp --dport 443 -m comment --comment "ShellClash QUIC REJECT" -m set ! --match-set cn_ip dst -j REJECT >/dev/null 2>&1
|
||||||
#重置ipv6规则
|
#重置ipv6规则
|
||||||
ip6tables -D INPUT -p tcp --dport $mix_port -j ACCEPT 2> /dev/null
|
ip6tables -D INPUT -p tcp --dport $mix_port -j ACCEPT 2> /dev/null
|
||||||
ip6tables -D INPUT -p tcp --dport $db_port -j ACCEPT 2> /dev/null
|
ip6tables -D INPUT -p tcp --dport $db_port -j ACCEPT 2> /dev/null
|
||||||
|
@ -674,11 +683,12 @@ web_restore(){
|
||||||
done
|
done
|
||||||
#发送数据
|
#发送数据
|
||||||
num=$(cat $clashdir/web_save | wc -l)
|
num=$(cat $clashdir/web_save | wc -l)
|
||||||
for i in `seq $num`;
|
i=1
|
||||||
do
|
while [ "$i" -le "$num" ];do
|
||||||
group_name=$(awk -F ',' 'NR=="'${i}'" {print $1}' $clashdir/web_save | sed 's/ /%20/g')
|
group_name=$(awk -F ',' 'NR=="'${i}'" {print $1}' $clashdir/web_save | sed 's/ /%20/g')
|
||||||
now_name=$(awk -F ',' 'NR=="'${i}'" {print $2}' $clashdir/web_save)
|
now_name=$(awk -F ',' 'NR=="'${i}'" {print $2}' $clashdir/web_save)
|
||||||
put_save http://localhost:${db_port}/proxies/${group_name} "{\"name\":\"${now_name}\"}"
|
put_save http://localhost:${db_port}/proxies/${group_name} "{\"name\":\"${now_name}\"}"
|
||||||
|
i=$((i+1))
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
#启动相关
|
#启动相关
|
||||||
|
@ -715,7 +725,7 @@ bfstart(){
|
||||||
else
|
else
|
||||||
logger "未找到clash核心,正在下载!" 33
|
logger "未找到clash核心,正在下载!" 33
|
||||||
if [ -z "$clashcore" ];then
|
if [ -z "$clashcore" ];then
|
||||||
[ "$redir_mod" = "混合模式" -o "$redir_mod" = "Tun模式" ] && clashcore=clash.meta || clashcore=clash
|
[ "$redir_mod" = "混合模式" -o "$redir_mod" = "Tun模式" ] && clashcore=clashpre || clashcore=clash
|
||||||
fi
|
fi
|
||||||
[ -z "$cpucore" ] && source $clashdir/getdate.sh && getcpucore
|
[ -z "$cpucore" ] && source $clashdir/getdate.sh && getcpucore
|
||||||
[ -z "$cpucore" ] && logger 找不到设备的CPU信息,请手动指定处理器架构类型! 31 && setcpucore
|
[ -z "$cpucore" ] && logger 找不到设备的CPU信息,请手动指定处理器架构类型! 31 && setcpucore
|
||||||
|
|
Loading…
Reference in New Issue
Block a user