v1.2.1-test
~新增在修改加密DNS时,一键下载本地根证书的功能 ~修复导入不包含port信息的配置文件时,文件内容出错的bug
This commit is contained in:
Binary file not shown.
@@ -1,4 +1,4 @@
|
|||||||
clash_v=1.4.2
|
clash_v=1.4.2
|
||||||
clashpre_v=2021.03.10
|
clashpre_v=2021.03.10
|
||||||
GeoIP_v=20210322
|
GeoIP_v=20210322
|
||||||
versionsh=1.2.0
|
versionsh=1.2.1
|
||||||
|
|||||||
@@ -310,7 +310,8 @@ setdns(){
|
|||||||
webget /tmp/ssl_test https://baidu.com echooff rediron skipceroff
|
webget /tmp/ssl_test https://baidu.com echooff rediron skipceroff
|
||||||
if [ "$result" != "200" ];then
|
if [ "$result" != "200" ];then
|
||||||
echo -----------------------------------------------
|
echo -----------------------------------------------
|
||||||
echo -e "\033[31m当前设备未安装openssl服务或者没有根证书,无法启用!\033[0m"
|
echo -e "\033[31m当前设备缺少本地根证书,请先安装证书!\033[0m"
|
||||||
|
setcrt
|
||||||
else
|
else
|
||||||
dns_nameserver='https://223.5.5.5/dns-query, https://doh.pub/dns-query, tls://dns.rubyfish.cn:853'
|
dns_nameserver='https://223.5.5.5/dns-query, https://doh.pub/dns-query, tls://dns.rubyfish.cn:853'
|
||||||
dns_fallback='https://1.0.0.1/dns-query, https://8.8.4.4/dns-query, https://doh.opendns.com/dns-query'
|
dns_fallback='https://1.0.0.1/dns-query, https://8.8.4.4/dns-query, https://doh.opendns.com/dns-query'
|
||||||
|
|||||||
@@ -245,7 +245,7 @@ modify_yaml(){
|
|||||||
b=$(grep -n "^prox" $yaml | head -1 | cut -d ":" -f 1)
|
b=$(grep -n "^prox" $yaml | head -1 | cut -d ":" -f 1)
|
||||||
b=$((b-1))
|
b=$((b-1))
|
||||||
mkdir -p $tmpdir > /dev/null
|
mkdir -p $tmpdir > /dev/null
|
||||||
sed "${a},${b}d" $yaml > $tmpdir/proxy.yaml
|
[ "$b" != "0" ] && sed "${a},${b}d" $yaml > $tmpdir/proxy.yaml
|
||||||
#跳过本地tls证书验证
|
#跳过本地tls证书验证
|
||||||
[ "$skip_cert" = "已开启" ] && sed -i '10,99s/skip-cert-verify: false/skip-cert-verify: true/' $tmpdir/proxy.yaml
|
[ "$skip_cert" = "已开启" ] && sed -i '10,99s/skip-cert-verify: false/skip-cert-verify: true/' $tmpdir/proxy.yaml
|
||||||
#添加配置
|
#添加配置
|
||||||
|
|||||||
Reference in New Issue
Block a user