feat(脚本): 修改查看账号email的错误显示,优化检查ipv6

pull/534/merge
mack-a 2021-11-08 11:14:27 +08:00
parent 26f9ba66ae
commit b646dd3191
1 changed files with 24 additions and 22 deletions

View File

@ -2462,22 +2462,22 @@ EOF
echoContent skyBlue "----------------------------------------------------------------------------------"
echoContent yellow " ---> 通用格式(VLESS+TCP+TLS/xtls-rprx-splice)"
echoContent green " vless://${id}@${host}:${port}?encryption=none&security=xtls&type=tcp&host=${host}&headerType=none&sni=${host}&flow=xtls-rprx-splice#${email}\n"
echoContent green " vless://${id}@${host}:${port}?encryption=none&security=xtls&type=tcp&host=${host}&headerType=none&sni=${host}&flow=xtls-rprx-splice#${email/direct/splice}\n"
echoContent yellow " ---> 格式化明文(VLESS+TCP+TLS/xtls-rprx-splice)"
echoContent green " 协议类型VLESS地址${host},端口:${port}用户ID${id}安全xtls传输方式tcpflowxtls-rprx-splice账户名:${email}\n"
echoContent green " 协议类型VLESS地址${host},端口:${port}用户ID${id}安全xtls传输方式tcpflowxtls-rprx-splice账户名:${email/direct/splice}\n"
cat <<EOF >>"/etc/v2ray-agent/subscribe_tmp/${subAccount}"
vless://${id}@${host}:${port}?encryption=none&security=xtls&type=tcp&host=${host}&headerType=none&sni=${host}&flow=xtls-rprx-splice#${email}
vless://${id}@${host}:${port}?encryption=none&security=xtls&type=tcp&host=${host}&headerType=none&sni=${host}&flow=xtls-rprx-splice#${email/direct/splice}
EOF
echoContent yellow " ---> 二维码 VLESS(VLESS+TCP+TLS/xtls-rprx-splice)"
echoContent green " https://api.qrserver.com/v1/create-qr-code/?size=400x400&data=vless%3A%2F%2F${id}%40${host}%3A${port}%3Fencryption%3Dnone%26security%3Dxtls%26type%3Dtcp%26${host}%3D${host}%26headerType%3Dnone%26sni%3D${host}%26flow%3Dxtls-rprx-splice%23${email}\n"
echoContent green " https://api.qrserver.com/v1/create-qr-code/?size=400x400&data=vless%3A%2F%2F${id}%40${host}%3A${port}%3Fencryption%3Dnone%26security%3Dxtls%26type%3Dtcp%26${host}%3D${host}%26headerType%3Dnone%26sni%3D${host}%26flow%3Dxtls-rprx-splice%23${email/direct/splice}\n"
elif [[ "${coreInstallType}" == 2 || "${coreInstallType}" == "3" ]]; then
echoContent yellow " ---> 通用格式(VLESS+TCP+TLS)"
echoContent green " vless://${id}@${host}:${port}?security=tls&encryption=none&host=${host}&headerType=none&type=tcp#${email}\n"
echoContent yellow " ---> 格式化明文(VLESS+TCP+TLS/xtls-rprx-splice)"
echoContent green " 协议类型VLESS地址${host},端口:${port}用户ID${id}安全tls传输方式tcp账户名:${email}\n"
echoContent green " 协议类型VLESS地址${host},端口:${port}用户ID${id}安全tls传输方式tcp账户名:${email/direct/splice}\n"
cat <<EOF >>"/etc/v2ray-agent/subscribe_tmp/${subAccount}"
vless://${id}@${host}:${port}?security=tls&encryption=none&host=${host}&headerType=none&type=tcp#${email}
@ -2501,15 +2501,15 @@ EOF
echoContent skyBlue "----------------------------------------------------------------------------------"
echoContent yellow " ---> 通用格式(Trojan+TCP+TLS/xtls-rprx-splice)"
echoContent green " trojan://${id}@${host}:${port}?encryption=none&security=xtls&type=tcp&host=${host}&headerType=none&sni=${host}&flow=xtls-rprx-splice#${email}\n"
echoContent green " trojan://${id}@${host}:${port}?encryption=none&security=xtls&type=tcp&host=${host}&headerType=none&sni=${host}&flow=xtls-rprx-splice#${email/direct/splice}\n"
echoContent yellow " ---> 格式化明文(Trojan+TCP+TLS/xtls-rprx-splice)"
echoContent green " 协议类型VLESS地址${host},端口:${port}用户ID${id}安全xtls传输方式tcpflowxtls-rprx-splice账户名:${email}\n"
echoContent green " 协议类型VLESS地址${host},端口:${port}用户ID${id}安全xtls传输方式tcpflowxtls-rprx-splice账户名:${email/direct/splice}\n"
cat <<EOF >>"/etc/v2ray-agent/subscribe_tmp/${subAccount}"
trojan://${id}@${host}:${port}?encryption=none&security=xtls&type=tcp&host=${host}&headerType=none&sni=${host}&flow=xtls-rprx-splice#${email}
trojan://${id}@${host}:${port}?encryption=none&security=xtls&type=tcp&host=${host}&headerType=none&sni=${host}&flow=xtls-rprx-splice#${email/direct/splice}
EOF
echoContent yellow " ---> 二维码 Trojan(Trojan+TCP+TLS/xtls-rprx-splice)"
echoContent green " https://api.qrserver.com/v1/create-qr-code/?size=400x400&data=trojan%3A%2F%2F${id}%40${host}%3A${port}%3Fencryption%3Dnone%26security%3Dxtls%26type%3Dtcp%26${host}%3D${host}%26headerType%3Dnone%26sni%3D${host}%26flow%3Dxtls-rprx-splice%23${email}\n"
echoContent green " https://api.qrserver.com/v1/create-qr-code/?size=400x400&data=trojan%3A%2F%2F${id}%40${host}%3A${port}%3Fencryption%3Dnone%26security%3Dxtls%26type%3Dtcp%26${host}%3D${host}%26headerType%3Dnone%26sni%3D${host}%26flow%3Dxtls-rprx-splice%23${email/direct/splice}\n"
elif [[ "${type}" == "vmessws" ]]; then
qrCodeBase64Default=$(echo -n "{\"port\":${port},\"ps\":\"${email}\",\"tls\":\"tls\",\"id\":\"${id}\",\"aid\":0,\"v\":2,\"host\":\"${host}\",\"type\":\"none\",\"path\":\"/${path}\",\"net\":\"ws\",\"add\":\"${add}\",\"allowInsecure\":0,\"method\":\"none\",\"peer\":\"${host}\",\"sni\":\"${host}\"}" | base64 -w 0)
@ -3280,7 +3280,9 @@ aliasInstall() {
# 检查ipv6、ipv4
checkIPv6() {
pingIPv6=$(ping6 -c 1 www.google.com | sed '2{s/[^(]*(//;s/).*//;q;}' | tail -n +2)
# pingIPv6=$(ping6 -c 1 www.google.com | sed '2{s/[^(]*(//;s/).*//;q;}' | tail -n +2)
pingIPv6=$(ping6 -c 1 www.google.com | sed -n '1p' | sed 's/.*(//g;s/).*//g')
if [[ -z "${pingIPv6}" ]]; then
echoContent red " ---> 不支持ipv6"
exit 0
@ -4273,7 +4275,7 @@ menu() {
cd "$HOME" || exit
echoContent red "\n=============================================================="
echoContent green "作者mack-a"
echoContent green "当前版本v2.5.37"
echoContent green "当前版本v2.5.38"
echoContent green "Githubhttps://github.com/mack-a/v2ray-agent"
echoContent green "描述:八合一共存脚本\c"
showInstallStatus