File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 2828case " ${bin_name} " in
2929 " clash" )
3030 clash_mode=$( busybox awk ' !/^ *#/ && /mode: / { print $2;found=1; exit } END{ if(!found) print "rules" }' " ${clash_config} " 2> /dev/null)
31+
3132 clash_enhanced_mode=$( busybox awk ' !/^ *#/ && /enhanced-mode: / { print $2;found=1; exit } END{ if(!found) print "fake-ip" }' " ${clash_config} " 2> /dev/null)
32- [ ${clash_enhanced_mode} = " fake-ip" ] && fake_ip_range=$( busybox awk ' !/^ *#/ && /fake-ip-range:/ { print $2; found=1; exit } END { if (!found) print "198.18.0.1/16" }' " ${clash_config} " 2> /dev/null)
33+
34+ fake_ip_range=$( busybox awk ' !/^ *#/ && /fake-ip-range:/ { print $2; found=1; exit } END { if (!found) print "198.18.0.1/16" }' " ${clash_config} " 2> /dev/null)
35+
3336 clash_dns_port=$( sed -n ' /^dns:/,/^[^ ]/p' " ${clash_config} " | grep -E ' ^[^#]*listen:.*:[0-9]+' | grep -Eo ' [0-9]+' | tail -n 1)
3437 clash_dns_port=${clash_dns_port:- 1053}
38+
3539 if [[ " ${network_mode} " == @ (mixed| tun) ]]; then
3640 tun_device=$( busybox awk ' !/^ *#/ && /device: / { print $2;found=1; exit } END{ if(!found) print "utun" }' " ${clash_config} " 2> /dev/null)
3741 fi
You can’t perform that action at this time.
0 commit comments