luci-app-clash: merge upstream source

This commit is contained in:
CN_SZTL 2020-01-03 13:17:12 +08:00
parent 4417ff1cac
commit 061bf20c61
No known key found for this signature in database
GPG Key ID: 6850B6345C862176

View File

@ -142,14 +142,20 @@ servers_set()
custom=", ws-headers: { Host: $custom }"
fi
if [ ! "$tls" ] && [ "$type" = "vmess" ]; then
tlss=""
elif [ "$tls" ] && [ "$type" = "vmess" ]; then
tlss=", tls: $tls"
elif [ "$tls" ] && [ "$type" = "http" ]; then
tls_hs=", tls: $tls"
elif [ "$tls" ] && [ "$type" = "socks5" ]; then
tls_hs=", tls: $tls"
if [ "$tls" = "false" ] && [ "$type" = "vmess" ]; then
tls=", tls: $tls"
elif [ "$tls" = "true" ] && [ "$type" = "vmess" ]; then
tls=", tls: $tls"
elif [ "$tls" = "false" ] && [ "$type" = "http" ];then
tls=", tls: $tls"
elif [ "$tls" = "false" ] && [ "$type" = "socks5" ]; then
tls=", tls: $tls"
elif [ "$tls" = "true" ] && [ "$type" = "http" ]; then
tls=", tls: $tls"
elif [ "$tls" = "true" ] && [ "$type" = "socks5" ]; then
tls=", tls: $tls"
elif [ -z "$tls" ] && [ "$type" != "ss" ]; then
tls=""
fi
@ -161,12 +167,23 @@ servers_set()
fi
fi
if [ "$skip_cert_verify" = "true" ] && [ "$type" != "ss" ]; then
if [ "$skip_cert_verify" = "true" ] && [ "$type" = "vmess" ]; then
skip_cert_verifys=", skip-cert-verify: $skip_cert_verify"
elif [ ! "$skip_cert_verify" ]; then
elif [ "$skip_cert_verify" = "false" ] && [ "$type" = "vmess" ]; then
skip_cert_verifys=", skip-cert-verify: $skip_cert_verify"
elif [ "$skip_cert_verify" = "true" ] && [ "$type" = "http" ]; then
skip_cert_verifys=", skip-cert-verify: $skip_cert_verify"
elif [ "$skip_cert_verify" = "true" ] && [ "$type" = "socks5" ]; then
skip_cert_verifys=", skip-cert-verify: $skip_cert_verify"
elif [ "$skip_cert_verify" = "false" ] && [ "$type" = "http" ]; then
skip_cert_verifys=", skip-cert-verify: $skip_cert_verify"
elif [ "$skip_cert_verify" = "false" ] && [ "$type" = "socks5" ]; then
skip_cert_verifys=", skip-cert-verify: $skip_cert_verify"
elif [ -z "$skip_cert_verify" ]; then
skip_cert_verifys=""
fi
if [ "$type" = "ss" ] && [ "$obfs" = " " ]; then
echo "- { name: \"$name\", type: $type, server: $server, port: $port, cipher: $cipher, password: "$password"$udpp }" >>$SERVER_FILE
@ -230,11 +247,11 @@ EOF
fi
if [ "$type" = "vmess" ]; then
echo "- { name: \"$name\", type: $type, server: $server, port: $port, uuid: $uuid, alterId: $alterId, cipher: $securitys$obfs_vmesss$path$custom$tlss$skip_cert_verifys }" >>$SERVER_FILE
echo "- { name: \"$name\", type: $type, server: $server, port: $port, uuid: $uuid, alterId: $alterId, cipher: $securitys$obfs_vmesss$path$custom$tls$skip_cert_verifys }" >>$SERVER_FILE
fi
if [ "$type" = "socks5" ] || [ "$type" = "http" ]; then
echo "- { name: \"$name\", type: $type, server: $server, port: $port, username: $auth_name, password: $auth_pass$skip_cert_verify$tls_hs }" >>$SERVER_FILE
echo "- { name: \"$name\", type: $type, server: $server, port: $port, username: $auth_name, password: $auth_pass$skip_cert_verifys$tls }" >>$SERVER_FILE
fi
if [ "$type" = "ssr" ]; then