feat(脚本): 优化订阅展示、修改alpn的http1.1->http/1.1
parent
b1fcbb4add
commit
3fffb9ff4c
140
install.sh
140
install.sh
|
@ -2495,97 +2495,83 @@ defaultBase64Code() {
|
|||
local type=$1
|
||||
local email=$2
|
||||
local id=$3
|
||||
local hostPort=$4
|
||||
local host=
|
||||
local port=
|
||||
if echo "${hostPort}" | grep -q ":"; then
|
||||
host=$(echo "${hostPort}" | awk -F "[:]" '{print $1}')
|
||||
# port=$(echo "${hostPort}" | awk -F "[:]" '{print $2}')
|
||||
else
|
||||
host=${hostPort}
|
||||
# port=443
|
||||
fi
|
||||
|
||||
port=${currentDefaultPort}
|
||||
|
||||
local path=$5
|
||||
local add=$6
|
||||
|
||||
local subAccount
|
||||
subAccount=${currentHost}_$(echo "${id}_currentHost" | md5sum | awk '{print $1}')
|
||||
|
||||
subAccount=$(echo "${email}" | awk -F "[_]" '{print $1}')_$(echo "${id}_currentHost" | md5sum | awk '{print $1}')
|
||||
if [[ "${type}" == "vlesstcp" ]]; then
|
||||
|
||||
if [[ "${coreInstallType}" == "1" ]] && echo "${currentInstallProtocolType}" | grep -q 0; then
|
||||
echoContent yellow " ---> 通用格式(VLESS+TCP+TLS/xtls-rprx-direct)"
|
||||
echoContent green " vless://${id}@${host}:${port}?encryption=none&security=xtls&type=tcp&host=${host}&headerType=none&sni=${host}&flow=xtls-rprx-direct#${email}\n"
|
||||
echoContent green " vless://${id}@${currentHost}:${currentDefaultPort}?encryption=none&security=xtls&type=tcp&host=${currentHost}&headerType=none&sni=${currentHost}&flow=xtls-rprx-direct#${email}\n"
|
||||
|
||||
echoContent yellow " ---> 格式化明文(VLESS+TCP+TLS/xtls-rprx-direct)"
|
||||
echoContent green "协议类型:VLESS,地址:${host},端口:${port},用户ID:${id},安全:xtls,传输方式:tcp,flow:xtls-rprx-direct,账户名:${email}\n"
|
||||
echoContent green "协议类型:VLESS,地址:${currentHost},端口:${currentDefaultPort},用户ID:${id},安全:xtls,传输方式:tcp,flow:xtls-rprx-direct,账户名:${email}\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-direct#${email}
|
||||
vless://${id}@${currentHost}:${currentDefaultPort}?encryption=none&security=xtls&type=tcp&host=${currentHost}&headerType=none&sni=${currentHost}&flow=xtls-rprx-direct#${email}
|
||||
EOF
|
||||
echoContent yellow " ---> 二维码 VLESS(VLESS+TCP+TLS/xtls-rprx-direct)"
|
||||
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-direct%23${email}\n"
|
||||
echoContent green " https://api.qrserver.com/v1/create-qr-code/?size=400x400&data=vless%3A%2F%2F${id}%40${currentHost}%3A${currentDefaultPort}%3Fencryption%3Dnone%26security%3Dxtls%26type%3Dtcp%26${currentHost}%3D${currentHost}%26headerType%3Dnone%26sni%3D${currentHost}%26flow%3Dxtls-rprx-direct%23${email}\n"
|
||||
|
||||
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/direct/splice}\n"
|
||||
echoContent green " vless://${id}@${currentHost}:${currentDefaultPort}?encryption=none&security=xtls&type=tcp&host=${currentHost}&headerType=none&sni=${currentHost}&flow=xtls-rprx-splice#${email/direct/splice}\n"
|
||||
|
||||
echoContent yellow " ---> 格式化明文(VLESS+TCP+TLS/xtls-rprx-splice)"
|
||||
echoContent green " 协议类型:VLESS,地址:${host},端口:${port},用户ID:${id},安全:xtls,传输方式:tcp,flow:xtls-rprx-splice,账户名:${email/direct/splice}\n"
|
||||
echoContent green " 协议类型:VLESS,地址:${currentHost},端口:${currentDefaultPort},用户ID:${id},安全:xtls,传输方式:tcp,flow:xtls-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/direct/splice}
|
||||
vless://${id}@${currentHost}:${currentDefaultPort}?encryption=none&security=xtls&type=tcp&host=${currentHost}&headerType=none&sni=${currentHost}&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/direct/splice}\n"
|
||||
echoContent green " https://api.qrserver.com/v1/create-qr-code/?size=400x400&data=vless%3A%2F%2F${id}%40${currentHost}%3A${currentDefaultPort}%3Fencryption%3Dnone%26security%3Dxtls%26type%3Dtcp%26${currentHost}%3D${currentHost}%26headerType%3Dnone%26sni%3D${currentHost}%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 green " vless://${id}@${currentHost}:${currentDefaultPort}?security=tls&encryption=none&host=${currentHost}&headerType=none&type=tcp#${email}\n"
|
||||
|
||||
echoContent yellow " ---> 格式化明文(VLESS+TCP+TLS/xtls-rprx-splice)"
|
||||
echoContent green " 协议类型:VLESS,地址:${host},端口:${port},用户ID:${id},安全:tls,传输方式:tcp,账户名:${email/direct/splice}\n"
|
||||
echoContent green " 协议类型:VLESS,地址:${currentHost},端口:${currentDefaultPort},用户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}
|
||||
vless://${id}@${currentHost}:${currentDefaultPort}?security=tls&encryption=none&host=${currentHost}&headerType=none&type=tcp#${email}
|
||||
EOF
|
||||
echoContent yellow " ---> 二维码 VLESS(VLESS+TCP+TLS)"
|
||||
echoContent green " https://api.qrserver.com/v1/create-qr-code/?size=400x400&data=vless%3a%2f%2f${id}%40${host}%3a${port}%3fsecurity%3dtls%26encryption%3dnone%26host%3d${host}%26headerType%3dnone%26type%3dtcp%23${email}\n"
|
||||
echoContent green " https://api.qrserver.com/v1/create-qr-code/?size=400x400&data=vless%3a%2f%2f${id}%40${currentHost}%3a${currentDefaultPort}%3fsecurity%3dtls%26encryption%3dnone%26host%3d${currentHost}%26headerType%3dnone%26type%3dtcp%23${email}\n"
|
||||
fi
|
||||
|
||||
elif [[ "${type}" == "trojanTCPXTLS" ]]; then
|
||||
echoContent yellow " ---> 通用格式(Trojan+TCP+TLS/xtls-rprx-direct)"
|
||||
echoContent green " trojan://${id}@${host}:${port}?encryption=none&security=xtls&type=tcp&host=${host}&headerType=none&sni=${host}&flow=xtls-rprx-direct#${email}\n"
|
||||
echoContent green " trojan://${id}@${currentHost}:${currentDefaultPort}?encryption=none&security=xtls&type=tcp&host=${currentHost}&headerType=none&sni=${currentHost}&flow=xtls-rprx-direct#${email}\n"
|
||||
|
||||
echoContent yellow " ---> 格式化明文(Trojan+TCP+TLS/xtls-rprx-direct)"
|
||||
echoContent green "协议类型:Trojan,地址:${host},端口:${port},用户ID:${id},安全:xtls,传输方式:tcp,flow:xtls-rprx-direct,账户名:${email}\n"
|
||||
echoContent green "协议类型:Trojan,地址:${currentHost},端口:${currentDefaultPort},用户ID:${id},安全:xtls,传输方式:tcp,flow:xtls-rprx-direct,账户名:${email}\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-direct#${email}
|
||||
trojan://${id}@${currentHost}:${currentDefaultPort}?encryption=none&security=xtls&type=tcp&host=${currentHost}&headerType=none&sni=${currentHost}&flow=xtls-rprx-direct#${email}
|
||||
EOF
|
||||
echoContent yellow " ---> 二维码 Trojan(Trojan+TCP+TLS/xtls-rprx-direct)"
|
||||
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-direct%23${email}\n"
|
||||
echoContent green " https://api.qrserver.com/v1/create-qr-code/?size=400x400&data=trojan%3A%2F%2F${id}%40${currentHost}%3A${currentDefaultPort}%3Fencryption%3Dnone%26security%3Dxtls%26type%3Dtcp%26${currentHost}%3D${currentHost}%26headerType%3Dnone%26sni%3D${currentHost}%26flow%3Dxtls-rprx-direct%23${email}\n"
|
||||
|
||||
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/direct/splice}\n"
|
||||
echoContent green " trojan://${id}@${currentHost}:${currentDefaultPort}?encryption=none&security=xtls&type=tcp&host=${currentHost}&headerType=none&sni=${currentHost}&flow=xtls-rprx-splice#${email/direct/splice}\n"
|
||||
|
||||
echoContent yellow " ---> 格式化明文(Trojan+TCP+TLS/xtls-rprx-splice)"
|
||||
echoContent green " 协议类型:VLESS,地址:${host},端口:${port},用户ID:${id},安全:xtls,传输方式:tcp,flow:xtls-rprx-splice,账户名:${email/direct/splice}\n"
|
||||
echoContent green " 协议类型:VLESS,地址:${currentHost},端口:${currentDefaultPort},用户ID:${id},安全:xtls,传输方式:tcp,flow:xtls-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/direct/splice}
|
||||
trojan://${id}@${currentHost}:${currentDefaultPort}?encryption=none&security=xtls&type=tcp&host=${currentHost}&headerType=none&sni=${currentHost}&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/direct/splice}\n"
|
||||
echoContent green " https://api.qrserver.com/v1/create-qr-code/?size=400x400&data=trojan%3A%2F%2F${id}%40${currentHost}%3A${currentDefaultPort}%3Fencryption%3Dnone%26security%3Dxtls%26type%3Dtcp%26${currentHost}%3D${currentHost}%26headerType%3Dnone%26sni%3D${currentHost}%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)
|
||||
qrCodeBase64Default=$(echo -n "{\"port\":${currentDefaultPort},\"ps\":\"${email}\",\"tls\":\"tls\",\"id\":\"${id}\",\"aid\":0,\"v\":2,\"host\":\"${currentHost}\",\"type\":\"none\",\"path\":\"/${currentPath}vws\",\"net\":\"ws\",\"add\":\"${currentAdd}\",\"allowInsecure\":0,\"method\":\"none\",\"peer\":\"${currentHost}\",\"sni\":\"${currentHost}\"}" | base64 -w 0)
|
||||
qrCodeBase64Default="${qrCodeBase64Default// /}"
|
||||
|
||||
echoContent yellow " ---> 通用json(VMess+WS+TLS)"
|
||||
echoContent green " {\"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}\"}\n"
|
||||
echoContent green " {\"port\":${currentDefaultPort},\"ps\":\"${email}\",\"tls\":\"tls\",\"id\":\"${id}\",\"aid\":0,\"v\":2,\"host\":\"${currentHost}\",\"type\":\"none\",\"path\":\"${currentPath}vws\",\"net\":\"ws\",\"add\":\"${currentAdd}\",\"allowInsecure\":0,\"method\":\"none\",\"peer\":\"${currentHost}\",\"sni\":\"${currentHost}\"}\n"
|
||||
echoContent yellow " ---> 通用vmess(VMess+WS+TLS)链接"
|
||||
echoContent green " vmess://${qrCodeBase64Default}\n"
|
||||
echoContent yellow " ---> 二维码 vmess(VMess+WS+TLS)"
|
||||
|
@ -2595,74 +2581,73 @@ vmess://${qrCodeBase64Default}
|
|||
EOF
|
||||
echoContent green " https://api.qrserver.com/v1/create-qr-code/?size=400x400&data=vmess://${qrCodeBase64Default}\n"
|
||||
|
||||
elif [[ "${type}" == "vmesstcp" ]]; then
|
||||
|
||||
echoContent red "path:${path}"
|
||||
qrCodeBase64Default=$(echo -n "{\"add\":\"${add}\",\"aid\":0,\"host\":\"${host}\",\"id\":\"${id}\",\"net\":\"tcp\",\"path\":\"${path}\",\"port\":${port},\"ps\":\"${email}\",\"scy\":\"none\",\"sni\":\"${host}\",\"tls\":\"tls\",\"v\":2,\"type\":\"http\",\"allowInsecure\":0,\"peer\":\"${host}\",\"obfs\":\"http\",\"obfsParam\":\"${host}\"}" | base64)
|
||||
qrCodeBase64Default="${qrCodeBase64Default// /}"
|
||||
|
||||
echoContent yellow " ---> 通用json(VMess+TCP+TLS)"
|
||||
echoContent green " {\"port\":'${port}',\"ps\":\"${email}\",\"tls\":\"tls\",\"id\":\"${id}\",\"aid\":0,\"v\":2,\"host\":\"${host}\",\"type\":\"http\",\"path\":\"${path}\",\"net\":\"http\",\"add\":\"${add}\",\"allowInsecure\":0,\"method\":\"post\",\"peer\":\"${host}\",\"obfs\":\"http\",\"obfsParam\":\"${host}\"}\n"
|
||||
echoContent yellow " ---> 通用vmess(VMess+TCP+TLS)链接"
|
||||
echoContent green " vmess://${qrCodeBase64Default}\n"
|
||||
|
||||
cat <<EOF >>"/etc/v2ray-agent/subscribe_tmp/${subAccount}"
|
||||
vmess://${qrCodeBase64Default}
|
||||
EOF
|
||||
echoContent yellow " ---> 二维码 vmess(VMess+TCP+TLS)"
|
||||
echoContent green " https://api.qrserver.com/v1/create-qr-code/?size=400x400&data=vmess://${qrCodeBase64Default}\n"
|
||||
# elif [[ "${type}" == "vmesstcp" ]]; then
|
||||
#
|
||||
# echoContent red "path:${path}"
|
||||
# qrCodeBase64Default=$(echo -n "{\"add\":\"${add}\",\"aid\":0,\"host\":\"${host}\",\"id\":\"${id}\",\"net\":\"tcp\",\"path\":\"${path}\",\"port\":${port},\"ps\":\"${email}\",\"scy\":\"none\",\"sni\":\"${host}\",\"tls\":\"tls\",\"v\":2,\"type\":\"http\",\"allowInsecure\":0,\"peer\":\"${host}\",\"obfs\":\"http\",\"obfsParam\":\"${host}\"}" | base64)
|
||||
# qrCodeBase64Default="${qrCodeBase64Default// /}"
|
||||
#
|
||||
# echoContent yellow " ---> 通用json(VMess+TCP+TLS)"
|
||||
# echoContent green " {\"port\":'${port}',\"ps\":\"${email}\",\"tls\":\"tls\",\"id\":\"${id}\",\"aid\":0,\"v\":2,\"host\":\"${host}\",\"type\":\"http\",\"path\":\"${path}\",\"net\":\"http\",\"add\":\"${add}\",\"allowInsecure\":0,\"method\":\"post\",\"peer\":\"${host}\",\"obfs\":\"http\",\"obfsParam\":\"${host}\"}\n"
|
||||
# echoContent yellow " ---> 通用vmess(VMess+TCP+TLS)链接"
|
||||
# echoContent green " vmess://${qrCodeBase64Default}\n"
|
||||
#
|
||||
# cat <<EOF >>"/etc/v2ray-agent/subscribe_tmp/${subAccount}"
|
||||
#vmess://${qrCodeBase64Default}
|
||||
#EOF
|
||||
# echoContent yellow " ---> 二维码 vmess(VMess+TCP+TLS)"
|
||||
# echoContent green " https://api.qrserver.com/v1/create-qr-code/?size=400x400&data=vmess://${qrCodeBase64Default}\n"
|
||||
|
||||
elif [[ "${type}" == "vlessws" ]]; then
|
||||
|
||||
echoContent yellow " ---> 通用格式(VLESS+WS+TLS)"
|
||||
echoContent green " vless://${id}@${add}:${port}?encryption=none&security=tls&type=ws&host=${host}&sni=${host}&path=%2f${path}#${email}\n"
|
||||
echoContent green " vless://${id}@${currentAdd}:${currentDefaultPort}?encryption=none&security=tls&type=ws&host=${currentHost}&sni=${currentHost}&path=%2f${currentPath}ws#${email}\n"
|
||||
|
||||
echoContent yellow " ---> 格式化明文(VLESS+WS+TLS)"
|
||||
echoContent green " 协议类型:VLESS,地址:${add},伪装域名/SNI:${host},端口:${port},用户ID:${id},安全:tls,传输方式:ws,路径:/${path},账户名:${email}\n"
|
||||
echoContent green " 协议类型:VLESS,地址:${currentAdd},伪装域名/SNI:${currentHost},端口:${currentDefaultPort},用户ID:${id},安全:tls,传输方式:ws,路径:/${currentPath}ws,账户名:${email}\n"
|
||||
|
||||
cat <<EOF >>"/etc/v2ray-agent/subscribe_tmp/${subAccount}"
|
||||
vless://${id}@${add}:${port}?encryption=none&security=tls&type=ws&host=${host}&sni=${host}&path=%2f${path}#${email}
|
||||
vless://${id}@${currentAdd}:${currentDefaultPort}?encryption=none&security=tls&type=ws&host=${currentHost}&sni=${currentHost}&path=%2f${currentPath}ws#${email}
|
||||
EOF
|
||||
|
||||
echoContent yellow " ---> 二维码 VLESS(VLESS+WS+TLS)"
|
||||
echoContent green " https://api.qrserver.com/v1/create-qr-code/?size=400x400&data=vless%3A%2F%2F${id}%40${add}%3A${port}%3Fencryption%3Dnone%26security%3Dtls%26type%3Dws%26host%3D${host}%26sni%3D${host}%26path%3D%252f${path}%23${email}"
|
||||
echoContent green " https://api.qrserver.com/v1/create-qr-code/?size=400x400&data=vless%3A%2F%2F${id}%40${currentAdd}%3A${currentDefaultPort}%3Fencryption%3Dnone%26security%3Dtls%26type%3Dws%26host%3D${currentHost}%26sni%3D${currentHost}%26path%3D%252f${currentPath}ws%23${email}"
|
||||
|
||||
elif [[ "${type}" == "vlessgrpc" ]]; then
|
||||
|
||||
echoContent yellow " ---> 通用格式(VLESS+gRPC+TLS)"
|
||||
echoContent green " vless://${id}@${add}:${port}?encryption=none&security=tls&type=grpc&host=${host}&path=${path}&serviceName=${path}&alpn=h2&sni=${host}#${email}\n"
|
||||
echoContent green " vless://${id}@${currentAdd}:${currentDefaultPort}?encryption=none&security=tls&type=grpc&host=${currentHost}&path=${currentPath}grpc&serviceName=${path}&alpn=h2&sni=${currentHost}#${email}\n"
|
||||
|
||||
echoContent yellow " ---> 格式化明文(VLESS+gRPC+TLS)"
|
||||
echoContent green " 协议类型:VLESS,地址:${add},伪装域名/SNI:${host},端口:${port},用户ID:${id},安全:tls,传输方式:gRPC,alpn:h2,serviceName:${path},账户名:${email}\n"
|
||||
echoContent green " 协议类型:VLESS,地址:${currentAdd},伪装域名/SNI:${currentHost},端口:${currentDefaultPort},用户ID:${id},安全:tls,传输方式:gRPC,alpn:h2,serviceName:${currentPath}grpc,账户名:${email}\n"
|
||||
|
||||
cat <<EOF >>"/etc/v2ray-agent/subscribe_tmp/${subAccount}"
|
||||
vless://${id}@${add}:${port}?encryption=none&security=tls&type=grpc&host=${host}&path=${path}&serviceName=${path}&alpn=h2&sni=${host}#${email}
|
||||
vless://${id}@${currentAdd}:${currentDefaultPort}?encryption=none&security=tls&type=grpc&host=${currentHost}&path=${currentPath}grpc&serviceName=${currentPath}grpc&alpn=h2&sni=${currentHost}#${email}
|
||||
EOF
|
||||
echoContent yellow " ---> 二维码 VLESS(VLESS+gRPC+TLS)"
|
||||
echoContent green " https://api.qrserver.com/v1/create-qr-code/?size=400x400&data=vless%3A%2F%2F${id}%40${add}%3A${port}%3Fencryption%3Dnone%26security%3Dtls%26type%3Dgrpc%26host%3D${host}%26serviceName%3D${path}%26path%3D${path}%26sni%3D${host}%26alpn%3Dh2%23${email}"
|
||||
echoContent green " https://api.qrserver.com/v1/create-qr-code/?size=400x400&data=vless%3A%2F%2F${id}%40${currentAdd}%3A${currentDefaultPort}%3Fencryption%3Dnone%26security%3Dtls%26type%3Dgrpc%26host%3D${currentHost}%26serviceName%3D${currentPath}grpc%26path%3D${currentPath}grpc%26sni%3D${currentHost}%26alpn%3Dh2%23${email}"
|
||||
|
||||
elif [[ "${type}" == "trojan" ]]; then
|
||||
# URLEncode
|
||||
echoContent yellow " ---> Trojan(TLS)"
|
||||
echoContent green " trojan://${id}@${host}:${port}?peer=${host}&sni=${host}&alpn=http1.1#${host}_Trojan\n"
|
||||
echoContent green " trojan://${id}@${currentHost}:${currentDefaultPort}?peer=${currentHost}&sni=${currentHost}&alpn=http/1.1#${currentHost}_Trojan\n"
|
||||
|
||||
cat <<EOF >>"/etc/v2ray-agent/subscribe_tmp/${subAccount}"
|
||||
trojan://${id}@${host}:${port}?peer=${host}&sni=${host}&alpn=http1.1#${host}_Trojan
|
||||
trojan://${id}@${currentHost}:${currentDefaultPort}?peer=${currentHost}&sni=${currentHost}&alpn=http/1.1#${email}_Trojan
|
||||
EOF
|
||||
echoContent yellow " ---> 二维码 Trojan(TLS)"
|
||||
echoContent green " https://api.qrserver.com/v1/create-qr-code/?size=400x400&data=trojan%3a%2f%2f${id}%40${host}%3a${port}%3fpeer%3d${host}%26sni%3d${host}%26alpn%3Dhttp1.1%23${host}_Trojan\n"
|
||||
echoContent green " https://api.qrserver.com/v1/create-qr-code/?size=400x400&data=trojan%3a%2f%2f${id}%40${currentHost}%3a${port}%3fpeer%3d${currentHost}%26sni%3d${currentHost}%26alpn%3Dhttp/1.1%23${email}\n"
|
||||
|
||||
elif [[ "${type}" == "trojangrpc" ]]; then
|
||||
# URLEncode
|
||||
|
||||
echoContent yellow " ---> Trojan gRPC(TLS)"
|
||||
echoContent green " trojan://${id}@${host}:${port}?encryption=none&peer=${host}&security=tls&type=grpc&sni=${host}&alpn=h2&path=${path}&serviceName=${path}#${host}_Trojan_gRPC\n"
|
||||
|
||||
echoContent green " trojan://${id}@${currentAdd}:${currentDefaultPort}?encryption=none&peer=${currentHost}&security=tls&type=grpc&sni=${currentHost}&alpn=h2&path=${currentPath}trojangrpc&serviceName=${currentPath}trojangrpc#${email}\n"
|
||||
cat <<EOF >>"/etc/v2ray-agent/subscribe_tmp/${subAccount}"
|
||||
trojan://${id}@${host}:${port}?encryption=none&peer=${host}&security=tls&type=grpc&sni=${host}&alpn=h2&path=${path}&serviceName=${path}#${host}_Trojan_gRPC
|
||||
trojan://${id}@${currentAdd}:${currentDefaultPort}?encryption=none&peer=${currentHost}&security=tls&type=grpc&sni=${currentHost}&alpn=h2&path=${currentPath}trojangrpc&serviceName=${currentPath}trojangrpc#${email}
|
||||
EOF
|
||||
echoContent yellow " ---> 二维码 Trojan gRPC(TLS)"
|
||||
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%3Dtls%26peer%3d${host}%26type%3Dgrpc%26sni%3d${host}%26path%3D${path}%26alpn%3D=h2%26serviceName%3D${path}%23${host}_Trojan_gRPC\n"
|
||||
echoContent green " https://api.qrserver.com/v1/create-qr-code/?size=400x400&data=trojan%3a%2f%2f${id}%40${currentAdd}%3a${currentDefaultPort}%3Fencryption%3Dnone%26security%3Dtls%26peer%3d${currentHost}%26type%3Dgrpc%26sni%3d${currentHost}%26path%3D${currentPath}trojangrpc%26alpn%3Dh2%26serviceName%3D${currentPath}trojangrpc%23${email}\n"
|
||||
fi
|
||||
|
||||
}
|
||||
|
@ -2681,8 +2666,7 @@ showAccounts() {
|
|||
echoContent skyBlue "===================== Trojan TCP TLS/XTLS-direct/XTLS-splice ======================\n"
|
||||
jq .inbounds[0].settings.clients ${configPath}02_trojan_TCP_inbounds.json | jq -c '.[]' | while read -r user; do
|
||||
echoContent skyBlue "\n ---> 帐号:$(echo "${user}" | jq -r .email)_$(echo "${user}" | jq -r .password)"
|
||||
echo
|
||||
defaultBase64Code trojanTCPXTLS "$(echo "${user}" | jq -r .email)" "$(echo "${user}" | jq -r .password)" "${currentHost}:${currentPort}" "${currentHost}"
|
||||
defaultBase64Code trojanTCPXTLS "$(echo "${user}" | jq -r .email)_$(echo "${user}" | jq -r .password)" "$(echo "${user}" | jq -r .password)"
|
||||
done
|
||||
|
||||
else
|
||||
|
@ -2690,7 +2674,7 @@ showAccounts() {
|
|||
jq .inbounds[0].settings.clients ${configPath}02_VLESS_TCP_inbounds.json | jq -c '.[]' | while read -r user; do
|
||||
echoContent skyBlue "\n ---> 帐号:$(echo "${user}" | jq -r .email)_$(echo "${user}" | jq -r .id)"
|
||||
echo
|
||||
defaultBase64Code vlesstcp "$(echo "${user}" | jq -r .email)" "$(echo "${user}" | jq -r .id)" "${currentHost}:${currentPort}" "${currentHost}"
|
||||
defaultBase64Code vlesstcp "$(echo "${user}" | jq -r .email)_$(echo "${user}" | jq -r .id)" "$(echo "${user}" | jq -r .id)"
|
||||
done
|
||||
fi
|
||||
|
||||
|
@ -2706,7 +2690,7 @@ showAccounts() {
|
|||
# echoContent yellow "Xray的0-RTT path后面会有,不兼容以v2ray为核心的客户端,请手动删除后使用\n"
|
||||
# path="${currentPath}ws"
|
||||
# fi
|
||||
defaultBase64Code vlessws "$(echo "${user}" | jq -r .email)" "$(echo "${user}" | jq -r .id)" "${currentHost}:${currentPort}" "${path}" "${currentAdd}"
|
||||
defaultBase64Code vlessws "$(echo "${user}" | jq -r .email)_$(echo "${user}" | jq -r .id)" "$(echo "${user}" | jq -r .id)"
|
||||
done
|
||||
fi
|
||||
|
||||
|
@ -2720,7 +2704,7 @@ showAccounts() {
|
|||
jq .inbounds[0].settings.clients ${configPath}05_VMess_WS_inbounds.json | jq -c '.[]' | while read -r user; do
|
||||
echoContent skyBlue "\n ---> 帐号:$(echo "${user}" | jq -r .email)_$(echo "${user}" | jq -r .id)"
|
||||
echo
|
||||
defaultBase64Code vmessws "$(echo "${user}" | jq -r .email)" "$(echo "${user}" | jq -r .id)" "${currentHost}:${currentPort}" "${path}" "${currentAdd}"
|
||||
defaultBase64Code vmessws "$(echo "${user}" | jq -r .email)_$(echo "${user}" | jq -r .id)" "$(echo "${user}" | jq -r .id)"
|
||||
done
|
||||
fi
|
||||
|
||||
|
@ -2733,7 +2717,7 @@ showAccounts() {
|
|||
jq .inbounds[0].settings.clients ${configPath}06_VLESS_gRPC_inbounds.json | jq -c '.[]' | while read -r user; do
|
||||
echoContent skyBlue "\n ---> 帐号:$(echo "${user}" | jq -r .email)_$(echo "${user}" | jq -r .id)"
|
||||
echo
|
||||
defaultBase64Code vlessgrpc "$(echo "${user}" | jq -r .email)" "$(echo "${user}" | jq -r .id)" "${currentHost}:${currentPort}" "${serviceName}" "${currentAdd}"
|
||||
defaultBase64Code vlessgrpc "$(echo "${user}" | jq -r .email)_$(echo "${user}" | jq -r .id)" "$(echo "${user}" | jq -r .id)"
|
||||
done
|
||||
fi
|
||||
fi
|
||||
|
@ -2743,8 +2727,8 @@ showAccounts() {
|
|||
echoContent skyBlue "\n================================== Trojan TLS ==================================\n"
|
||||
jq .inbounds[0].settings.clients ${configPath}04_trojan_TCP_inbounds.json | jq -c '.[]' | while read -r user; do
|
||||
echoContent skyBlue "\n ---> 帐号:$(echo "${user}" | jq -r .email)_$(echo "${user}" | jq -r .password)"
|
||||
echo
|
||||
defaultBase64Code trojan trojan "$(echo "${user}" | jq -r .password)" "${currentHost}"
|
||||
|
||||
defaultBase64Code trojan "$(echo "${user}" | jq -r .email)_$(echo "${user}" | jq -r .password)" "$(echo "${user}" | jq -r .password)"
|
||||
done
|
||||
fi
|
||||
|
||||
|
@ -2756,7 +2740,7 @@ showAccounts() {
|
|||
jq .inbounds[0].settings.clients ${configPath}04_trojan_gRPC_inbounds.json | jq -c '.[]' | while read -r user; do
|
||||
echoContent skyBlue "\n ---> 帐号:$(echo "${user}" | jq -r .email)_$(echo "${user}" | jq -r .password)"
|
||||
echo
|
||||
defaultBase64Code trojangrpc "$(echo "${user}" | jq -r .email)" "$(echo "${user}" | jq -r .password)" "${currentHost}:${currentPort}" "${serviceName}" "${currentAdd}"
|
||||
defaultBase64Code trojangrpc "$(echo "${user}" | jq -r .email)_$(echo "${user}" | jq -r .password)" "$(echo "${user}" | jq -r .password)"
|
||||
done
|
||||
fi
|
||||
|
||||
|
@ -4557,7 +4541,7 @@ menu() {
|
|||
cd "$HOME" || exit
|
||||
echoContent red "\n=============================================================="
|
||||
echoContent green "作者:mack-a"
|
||||
echoContent green "当前版本:v2.5.61"
|
||||
echoContent green "当前版本:v2.5.62"
|
||||
echoContent green "Github:https://github.com/mack-a/v2ray-agent"
|
||||
echoContent green "描述:八合一共存脚本\c"
|
||||
showInstallStatus
|
||||
|
|
Loading…
Reference in New Issue