mirror of https://github.com/wulabing/Xray_onekey
Update install.sh (#404)
parent
e4ce0627e6
commit
2c144252eb
10
install.sh
10
install.sh
|
@ -229,14 +229,14 @@ function domain_check() {
|
|||
if [[ ${wgcfv4_status} =~ "on"|"plus" ]] || [[ ${wgcfv6_status} =~ "on"|"plus" ]]; then
|
||||
# 关闭wgcf-warp,以防误判VPS IP情况
|
||||
wg-quick down wgcf >/dev/null 2>&1
|
||||
judge "已关闭 wgcf-warp"
|
||||
print_ok "已关闭 wgcf-warp"
|
||||
fi
|
||||
local_ipv4=$(curl -s4m8 https://ip.gs)
|
||||
local_ipv6=$(curl -s6m8 https://ip.gs)
|
||||
if [[ -z ${local_ipv4} && -n ${local_ipv6} ]]; then
|
||||
# 纯IPv6 VPS,自动添加DNS64服务器以备acme.sh申请证书使用
|
||||
echo -e nameserver 2a01:4f8:c2c:123f::1 > /etc/resolv.conf
|
||||
judge "识别为 IPv6 Only 的 VPS,自动添加 DNS64 服务器"
|
||||
print_ok "识别为 IPv6 Only 的 VPS,自动添加 DNS64 服务器"
|
||||
fi
|
||||
echo -e "域名通过 DNS 解析的 IP 地址:${domain_ip}"
|
||||
echo -e "本机公网 IPv4 地址: ${local_ipv4}"
|
||||
|
@ -407,7 +407,7 @@ function acme() {
|
|||
sleep 2
|
||||
if [[ -n $(type -P wgcf) && -n $(type -P wg-quick) ]]; then
|
||||
wg-quick up wgcf >/dev/null 2>&1
|
||||
judge "已启动 wgcf-warp"
|
||||
print_ok "已启动 wgcf-warp"
|
||||
fi
|
||||
fi
|
||||
else
|
||||
|
@ -415,7 +415,7 @@ function acme() {
|
|||
rm -rf "$HOME/.acme.sh/${domain}_ecc"
|
||||
if [[ -n $(type -P wgcf) && -n $(type -P wg-quick) ]]; then
|
||||
wg-quick up wgcf >/dev/null 2>&1
|
||||
judge "已启动 wgcf-warp"
|
||||
print_ok "已启动 wgcf-warp"
|
||||
fi
|
||||
exit 1
|
||||
fi
|
||||
|
@ -775,4 +775,4 @@ menu() {
|
|||
;;
|
||||
esac
|
||||
}
|
||||
menu "$@"
|
||||
menu "$@"
|
||||
|
|
Loading…
Reference in New Issue