mirror of https://github.com/mack-a/v2ray-agent
feat(脚本): 添加VLESS grpc clashmeta配置、修改升级tuic报错
parent
56d4937d99
commit
9cf5391ddf
46
install.sh
46
install.sh
|
@ -1921,6 +1921,7 @@ installTuic() {
|
||||||
read -r -p "是否更新、升级?[y/n]:" reInstallTuicStatus
|
read -r -p "是否更新、升级?[y/n]:" reInstallTuicStatus
|
||||||
if [[ "${reInstallTuicStatus}" == "y" ]]; then
|
if [[ "${reInstallTuicStatus}" == "y" ]]; then
|
||||||
rm -f /etc/v2ray-agent/tuic/tuic
|
rm -f /etc/v2ray-agent/tuic/tuic
|
||||||
|
tuicConfigPath=
|
||||||
installTuic "$1"
|
installTuic "$1"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
@ -3982,6 +3983,20 @@ EOF
|
||||||
|
|
||||||
cat <<EOF >>"/etc/v2ray-agent/subscribe_local/default/${user}"
|
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}
|
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
|
EOF
|
||||||
echoContent yellow " ---> 二维码 VLESS(VLESS+gRPC+TLS)"
|
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}"
|
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 skyBlue "\n================================ Tuic TLS ================================\n"
|
||||||
echoContent yellow "\n --->Tuic相对于Hysteria会更加温 使用体验可能会更流畅。"
|
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=
|
local tuicEmail=
|
||||||
tuicEmail=$(jq -r '.inbounds[0].settings.clients[]|select(.id=="'"${id}"'")|.email' ${configPath}${frontingType}.json | awk -F "[-]" '{print $1}')
|
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
|
if echo ${currentInstallProtocolType} | grep -q 9; then
|
||||||
local tuicResult
|
local tuicResult
|
||||||
|
|
||||||
tuicResult=$(jq -r ".users.\"${uuid}\" += \"${uuid}\"" ${tuicConfigPath}config.json)
|
tuicResult=$(jq -r ".users.\"${uuid}\" += \"${uuid}\"" "${tuicConfigPath}config.json")
|
||||||
echo "${tuicResult}" | jq . >${tuicConfigPath}config.json
|
echo "${tuicResult}" | jq . >"${tuicConfigPath}config.json"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
@ -5149,8 +5164,8 @@ removeUser() {
|
||||||
|
|
||||||
if echo ${currentInstallProtocolType} | grep -q 9; then
|
if echo ${currentInstallProtocolType} | grep -q 9; then
|
||||||
local tuicResult
|
local tuicResult
|
||||||
tuicResult=$(jq -r "del(.users.\"${uuid}\")" ${tuicConfigPath}config.json)
|
tuicResult=$(jq -r "del(.users.\"${uuid}\")" "${tuicConfigPath}config.json")
|
||||||
echo "${tuicResult}" | jq . >${tuicConfigPath}config.json
|
echo "${tuicResult}" | jq . >"${tuicConfigPath}config.json"
|
||||||
fi
|
fi
|
||||||
reloadCore
|
reloadCore
|
||||||
fi
|
fi
|
||||||
|
@ -7008,20 +7023,20 @@ dns:
|
||||||
enhanced-mode: fake-ip
|
enhanced-mode: fake-ip
|
||||||
fake-ip-range: 28.0.0.1/8
|
fake-ip-range: 28.0.0.1/8
|
||||||
fake-ip-filter:
|
fake-ip-filter:
|
||||||
- '*'
|
- '*'
|
||||||
- '+.lan'
|
- '+.lan'
|
||||||
default-nameserver:
|
default-nameserver:
|
||||||
- 223.5.5.5
|
- 223.5.5.5
|
||||||
nameserver:
|
nameserver:
|
||||||
- 'tls://8.8.4.4#DNS_Proxy'
|
- 'tls://8.8.4.4#DNS_Proxy'
|
||||||
- 'tls://1.0.0.1#DNS_Proxy'
|
- 'tls://1.0.0.1#DNS_Proxy'
|
||||||
proxy-server-nameserver:
|
proxy-server-nameserver:
|
||||||
- https://dns.alidns.com/dns-query#h3=true
|
- https://dns.alidns.com/dns-query#h3=true
|
||||||
nameserver-policy:
|
nameserver-policy:
|
||||||
"geosite:cn,private":
|
"geosite:cn,private":
|
||||||
- 223.5.5.5
|
- 223.5.5.5
|
||||||
- 114.114.114.114
|
- 114.114.114.114
|
||||||
- https://dns.alidns.com/dns-query#h3=true
|
- https://dns.alidns.com/dns-query#h3=true
|
||||||
|
|
||||||
proxy-providers:
|
proxy-providers:
|
||||||
provider1:
|
provider1:
|
||||||
|
@ -7793,7 +7808,7 @@ menu() {
|
||||||
cd "$HOME" || exit
|
cd "$HOME" || exit
|
||||||
echoContent red "\n=============================================================="
|
echoContent red "\n=============================================================="
|
||||||
echoContent green "作者:mack-a"
|
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 "Github:https://github.com/mack-a/v2ray-agent"
|
||||||
echoContent green "描述:八合一共存脚本\c"
|
echoContent green "描述:八合一共存脚本\c"
|
||||||
showInstallStatus
|
showInstallStatus
|
||||||
|
@ -7803,6 +7818,7 @@ menu() {
|
||||||
echoContent green "推广请联系TG:@mackaff\n"
|
echoContent green "推广请联系TG:@mackaff\n"
|
||||||
echoContent green "VPS选购攻略:https://www.v2ray-agent.com/archives/1679975663984"
|
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 "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 "=============================================================="
|
echoContent red "=============================================================="
|
||||||
if [[ -n "${coreInstallType}" ]]; then
|
if [[ -n "${coreInstallType}" ]]; then
|
||||||
echoContent yellow "1.重新安装"
|
echoContent yellow "1.重新安装"
|
||||||
|
|
Loading…
Reference in New Issue