mirror of https://github.com/mack-a/v2ray-agent
feat(脚本): 添加VLESS grpc clashmeta配置、修改升级tuic报错
parent
56d4937d99
commit
9cf5391ddf
28
install.sh
28
install.sh
|
@ -1921,6 +1921,7 @@ installTuic() {
|
|||
read -r -p "是否更新、升级?[y/n]:" reInstallTuicStatus
|
||||
if [[ "${reInstallTuicStatus}" == "y" ]]; then
|
||||
rm -f /etc/v2ray-agent/tuic/tuic
|
||||
tuicConfigPath=
|
||||
installTuic "$1"
|
||||
fi
|
||||
fi
|
||||
|
@ -3982,6 +3983,20 @@ EOF
|
|||
|
||||
cat <<EOF >>"/etc/v2ray-agent/subscribe_local/default/${user}"
|
||||
vless://${id}@${add}:${currentDefaultPort}?encryption=none&security=tls&type=grpc&host=${currentHost}&path=${currentPath}grpc&serviceName=${currentPath}grpc&fp=chrome&alpn=h2&sni=${currentHost}#${email}
|
||||
EOF
|
||||
cat <<EOF >>"/etc/v2ray-agent/subscribe_local/clashMeta/${user}"
|
||||
- name: "${email}"
|
||||
type: vless
|
||||
server: ${add}
|
||||
port: ${currentDefaultPort}
|
||||
uuid: ${id}
|
||||
udp: true
|
||||
tls: true
|
||||
network: grpc
|
||||
client-fingerprint: chrome
|
||||
servername: ${currentHost}
|
||||
grpc-opts:
|
||||
grpc-service-name: ${currentPath}grpc
|
||||
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${currentDefaultPort}%3Fencryption%3Dnone%26security%3Dtls%26type%3Dgrpc%26host%3D${currentHost}%26serviceName%3D${currentPath}grpc%26fp%3Dchrome%26path%3D${currentPath}grpc%26sni%3D${currentHost}%26alpn%3Dh2%23${email}"
|
||||
|
@ -4400,7 +4415,7 @@ showAccounts() {
|
|||
echoContent skyBlue "\n================================ Tuic TLS ================================\n"
|
||||
echoContent yellow "\n --->Tuic相对于Hysteria会更加温 使用体验可能会更流畅。"
|
||||
|
||||
jq -r .users[] ${tuicConfigPath}config.json | while read -r id; do
|
||||
jq -r .users[] "${tuicConfigPath}config.json" | while read -r id; do
|
||||
local tuicEmail=
|
||||
tuicEmail=$(jq -r '.inbounds[0].settings.clients[]|select(.id=="'"${id}"'")|.email' ${configPath}${frontingType}.json | awk -F "[-]" '{print $1}')
|
||||
|
||||
|
@ -4944,8 +4959,8 @@ addUserXray() {
|
|||
if echo ${currentInstallProtocolType} | grep -q 9; then
|
||||
local tuicResult
|
||||
|
||||
tuicResult=$(jq -r ".users.\"${uuid}\" += \"${uuid}\"" ${tuicConfigPath}config.json)
|
||||
echo "${tuicResult}" | jq . >${tuicConfigPath}config.json
|
||||
tuicResult=$(jq -r ".users.\"${uuid}\" += \"${uuid}\"" "${tuicConfigPath}config.json")
|
||||
echo "${tuicResult}" | jq . >"${tuicConfigPath}config.json"
|
||||
fi
|
||||
done
|
||||
|
||||
|
@ -5149,8 +5164,8 @@ removeUser() {
|
|||
|
||||
if echo ${currentInstallProtocolType} | grep -q 9; then
|
||||
local tuicResult
|
||||
tuicResult=$(jq -r "del(.users.\"${uuid}\")" ${tuicConfigPath}config.json)
|
||||
echo "${tuicResult}" | jq . >${tuicConfigPath}config.json
|
||||
tuicResult=$(jq -r "del(.users.\"${uuid}\")" "${tuicConfigPath}config.json")
|
||||
echo "${tuicResult}" | jq . >"${tuicConfigPath}config.json"
|
||||
fi
|
||||
reloadCore
|
||||
fi
|
||||
|
@ -7793,7 +7808,7 @@ menu() {
|
|||
cd "$HOME" || exit
|
||||
echoContent red "\n=============================================================="
|
||||
echoContent green "作者:mack-a"
|
||||
echoContent green "当前版本:v2.9.24"
|
||||
echoContent green "当前版本:v2.9.25"
|
||||
echoContent green "Github:https://github.com/mack-a/v2ray-agent"
|
||||
echoContent green "描述:八合一共存脚本\c"
|
||||
showInstallStatus
|
||||
|
@ -7803,6 +7818,7 @@ menu() {
|
|||
echoContent green "推广请联系TG:@mackaff\n"
|
||||
echoContent green "VPS选购攻略:https://www.v2ray-agent.com/archives/1679975663984"
|
||||
echoContent green "RN低价套餐,年付最低10美元:https://www.v2ray-agent.com/archives/racknerdtao-can-zheng-li-nian-fu-10mei-yuan"
|
||||
echoContent green "搬瓦工最新终极套餐v2,推荐购买:https://www.v2ray-agent.com/archives/2023nian-ban-wa-gong-ji-fang-tui-jian#heading-3"
|
||||
echoContent red "=============================================================="
|
||||
if [[ -n "${coreInstallType}" ]]; then
|
||||
echoContent yellow "1.重新安装"
|
||||
|
|
Loading…
Reference in New Issue