From 80ed70809a12748a3f73d42eef28391fad365313 Mon Sep 17 00:00:00 2001 From: mack-a <57424792+mack-a@users.noreply.github.com> Date: Fri, 25 Jun 2021 14:36:57 +0800 Subject: [PATCH 01/11] =?UTF-8?q?feat(=E8=84=9A=E6=9C=AC):=20xray=E5=AE=89?= =?UTF-8?q?=E8=A3=85=E6=97=B6=E7=A7=BB=E9=99=A4trojan-go(trojan)=E6=94=B9?= =?UTF-8?q?=E4=B8=BAxray(trojan)=EF=BC=88=E6=97=A0trojan-ws=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install.sh | 116 +++++++++++++++++++++++++++++++++-------------------- 1 file changed, 72 insertions(+), 44 deletions(-) diff --git a/install.sh b/install.sh index ff14e5c..67d18e1 100644 --- a/install.sh +++ b/install.sh @@ -1964,19 +1964,6 @@ EOF EOF fi - # 取消BT - # cat </etc/v2ray-agent/xray/conf/10_bt_outbounds.json - #{ - # "outbounds": [ - # { - # "protocol": "blackhole", - # "settings": {}, - # "tag": "blocked" - # } - # ] - #} - #EOF - # dns cat </etc/v2ray-agent/xray/conf/11_dns.json { @@ -1987,15 +1974,52 @@ EOF } } EOF + # VLESS_TCP_TLS/XTLS # 回落nginx local fallbacksList='{"dest":31300,"xver":0},{"alpn":"h2","dest":31302,"xver":0}' - if echo "${selectCustomInstallType}" | grep -q 4 || [[ "$1" == "all" ]]; then - # 回落trojan-go - fallbacksList='{"dest":31296,"xver":0},{"alpn":"h2","dest":31302,"xver":0}' + # trojan + if [[ -n $(echo "${selectCustomInstallType}" | grep 4) || "$1" == "all" ]]; then +# fallbacksList=${fallbacksList}',{"path":"/'${customPath}'tcp","dest":31298,"xver":1}' + fallbacksList='{"dest":31296,"xver":1},{"alpn":"h2","dest":31302,"xver":0}' + cat </etc/v2ray-agent/xray/conf/04_trojan_TCP_inbounds.json +{ +"inbounds":[ + { + "port": 31296, + "listen": "127.0.0.1", + "protocol": "trojan", + "tag":"trojanTCP", + "settings": { + "clients": [ + { + "password": "${uuid}", + "email": "${domain}_trojan_tcp" + } + ], + "fallbacks":[ + {"dest":"31300"} + ] + }, + "streamSettings": { + "network": "tcp", + "security": "none", + "tcpSettings": { + "acceptProxyProtocol": true + } + } + } + ] +} +EOF fi +# if echo "${selectCustomInstallType}" | grep -q 4 || [[ "$1" == "all" ]]; then +# # 回落trojan-go +# fallbacksList='{"dest":31296,"xver":0},{"alpn":"h2","dest":31302,"xver":0}' +# fi + # VLESS_WS_TLS if echo "${selectCustomInstallType}" | grep -q 1 || [[ "$1" == "all" ]]; then fallbacksList=${fallbacksList}',{"path":"/'${customPath}'ws","dest":31297,"xver":1}' @@ -2071,6 +2095,7 @@ EOF EOF fi + # VMess_WS if echo "${selectCustomInstallType}" | grep -q 3 || [[ "$1" == "all" ]]; then fallbacksList=${fallbacksList}',{"path":"/'${customPath}'vws","dest":31299,"xver":1}' @@ -2631,7 +2656,7 @@ unInstall() { fi handleV2Ray stop - handleTrojanGo stop +# handleTrojanGo stop rm -rf /root/.acme.sh echoContent green " ---> 删除acme.sh完成" rm -rf /etc/systemd/system/v2ray.service @@ -3671,18 +3696,18 @@ customV2RayInstall() { installV2RayService 9 initV2RayConfig custom 10 cleanUp xrayDel - if echo ${selectCustomInstallType} | grep -q 4; then - installTrojanGo 11 - installTrojanService 12 - initTrojanGoConfig 13 - handleTrojanGo stop - handleTrojanGo start - else - # 这里需要删除trojan的服务 - handleTrojanGo stop - rm -rf /etc/v2ray-agent/trojan/* - rm -rf /etc/systemd/system/trojan-go.service - fi +# if echo ${selectCustomInstallType} | grep -q 4; then +# installTrojanGo 11 +# installTrojanService 12 +# initTrojanGoConfig 13 +# handleTrojanGo stop +# handleTrojanGo start +# else +# # 这里需要删除trojan的服务 +# handleTrojanGo stop +# rm -rf /etc/v2ray-agent/trojan/* +# rm -rf /etc/systemd/system/trojan-go.service +# fi installCronTLS 14 handleV2Ray stop handleV2Ray start @@ -3734,17 +3759,20 @@ customXrayInstall() { initXrayConfig custom 10 cleanUp v2rayDel if echo "${selectCustomInstallType}" | grep -q 4; then - installTrojanGo 11 - installTrojanService 12 - initTrojanGoConfig 13 - handleTrojanGo stop - handleTrojanGo start +# installTrojanGo 11 +# installTrojanService 12 +# initTrojanGoConfig 13 +# handleTrojanGo stop +# handleTrojanGo start + echo else # 这里需要删除trojan的服务 - handleTrojanGo stop - rm -rf /etc/v2ray-agent/trojan/* - rm -rf /etc/systemd/system/trojan-go.service +# handleTrojanGo stop +# rm -rf /etc/v2ray-agent/trojan/* +# rm -rf /etc/systemd/system/trojan-go.service + echo fi + installCronTLS 14 handleXray stop handleXray start @@ -3849,12 +3877,12 @@ xrayCoreInstall() { handleV2Ray stop installXray 7 installXrayService 8 - installTrojanGo 9 - installTrojanService 10 +# installTrojanGo 9 +# installTrojanService 10 customCDNIP 11 initXrayConfig all 12 cleanUp v2rayDel - initTrojanGoConfig 13 +# initTrojanGoConfig 13 installCronTLS 14 nginxBlog 15 updateRedirectNginxConf @@ -3863,9 +3891,9 @@ xrayCoreInstall() { handleXray start handleNginx start - handleTrojanGo stop - sleep 1 - handleTrojanGo start +# handleTrojanGo stop +# sleep 1 +# handleTrojanGo start # 生成账号 checkGFWStatue 16 showAccounts 17 @@ -3954,7 +3982,7 @@ menu() { cd "$HOME" || exit echoContent red "\n==============================================================" echoContent green "作者:mack-a" - echoContent green "当前版本:v2.5.9" + echoContent green "当前版本:v2.5.10" echoContent green "Github:https://github.com/mack-a/v2ray-agent" echoContent green "描述:八合一共存脚本\c" showInstallStatus From 117ec366254a156a83d07c2a40ca17b6c73a9b3b Mon Sep 17 00:00:00 2001 From: mack-a <57424792+mack-a@users.noreply.github.com> Date: Fri, 25 Jun 2021 14:43:27 +0800 Subject: [PATCH 02/11] =?UTF-8?q?feat(=E8=84=9A=E6=9C=AC):=20=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E6=8F=8F=E8=BF=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install.sh b/install.sh index 67d18e1..b2b6eb9 100644 --- a/install.sh +++ b/install.sh @@ -3988,6 +3988,7 @@ menu() { showInstallStatus echoContent red "\n==============================================================" echoContent red "VMess+TLS+TCP(http+tls),将在未来几个版本脚本中移除" + echoContent red "此版本正在将trojan-go(trojan)替换为Xray-core(trojan)" echoContent red "==============================================================" if [[ -n "${coreInstallType}" ]]; then echoContent yellow "1.重新安装" From 46f82d6e2f335b9901815c8edd0ea400c6a7d71f Mon Sep 17 00:00:00 2001 From: mack-a <57424792+mack-a@users.noreply.github.com> Date: Fri, 25 Jun 2021 15:57:37 +0800 Subject: [PATCH 03/11] =?UTF-8?q?feat(=E8=84=9A=E6=9C=AC):=20=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E7=94=A8=E6=88=B7/=E7=A7=BB=E9=99=A4=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E7=A7=BB=E9=99=A4trojan-go=E3=80=81ipv6=E5=88=86?= =?UTF-8?q?=E6=B5=81=E4=BB=BB=E6=84=8F=E9=97=A8=E8=A7=A3=E9=94=81=E7=A7=BB?= =?UTF-8?q?=E9=99=A4=E4=B8=8D=E6=94=AF=E6=8C=81trojan=E7=9A=84=E6=8F=90?= =?UTF-8?q?=E7=A4=BA=E3=80=81=E6=B3=A8=E9=87=8Atrojan-go=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install.sh | 319 ++++++++++++++++++++++++++++++++--------------------- 1 file changed, 192 insertions(+), 127 deletions(-) diff --git a/install.sh b/install.sh index b2b6eb9..6ef32c5 100644 --- a/install.sh +++ b/install.sh @@ -331,7 +331,7 @@ showInstallStatus() { fi if echo ${currentInstallProtocolType} | grep -q 4; then - echoContent yellow "Trojan+TCP/WS[TLS] \c" + echoContent yellow "Trojan+TCP[TLS] \c" fi if echo ${currentInstallProtocolType} | grep -q 5; then @@ -1285,50 +1285,50 @@ updateXray() { fi } # 更新Trojan-Go -updateTrojanGo() { - echoContent skyBlue "\n进度 $1/${totalProgress} : 更新Trojan-Go" - if [[ ! -d "/etc/v2ray-agent/trojan/" ]]; then - echoContent red " ---> 没有检测到安装目录,请执行脚本安装内容" - menu - exit 0 - fi - if find /etc/v2ray-agent/trojan/ | grep -q "trojan-go"; then - version=$(curl -s https://api.github.com/repos/p4gefau1t/trojan-go/releases | jq -r .[0].tag_name) - echoContent green " ---> Trojan-Go版本:${version}" - if [[ -n $(wget --help | grep show-progress) ]]; then - wget -c -q --show-progress -P /etc/v2ray-agent/trojan/ "https://github.com/p4gefau1t/trojan-go/releases/download/${version}/${trojanGoCPUVendor}.zip" - else - wget -c -P /etc/v2ray-agent/trojan/ "https://github.com/p4gefau1t/trojan-go/releases/download/${version}/${trojanGoCPUVendor}.zip" >/dev/null 2>&1 - fi - unzip -o /etc/v2ray-agent/trojan/${trojanGoCPUVendor}.zip -d /etc/v2ray-agent/trojan >/dev/null - rm -rf /etc/v2ray-agent/trojan/${trojanGoCPUVendor}.zip - handleTrojanGo stop - handleTrojanGo start - else - echoContent green " ---> 当前Trojan-Go版本:$(/etc/v2ray-agent/trojan/trojan-go --version | awk '{print $2}' | head -1)" - if [[ -n $(/etc/v2ray-agent/trojan/trojan-go --version) ]]; then - version=$(curl -s https://api.github.com/repos/p4gefau1t/trojan-go/releases | jq -r .[0].tag_name) - if [[ "${version}" == "$(/etc/v2ray-agent/trojan/trojan-go --version | awk '{print $2}' | head -1)" ]]; then - read -r -p "当前版本与最新版相同,是否重新安装?[y/n]:" reInstalTrojanGoStatus - if [[ "${reInstalTrojanGoStatus}" == "y" ]]; then - handleTrojanGo stop - rm -rf /etc/v2ray-agent/trojan/trojan-go - updateTrojanGo 1 - else - echoContent green " ---> 放弃重新安装" - fi - else - read -r -p "最新版本为:${version},是否更新?[y/n]:" installTrojanGoStatus - if [[ "${installTrojanGoStatus}" == "y" ]]; then - rm -rf /etc/v2ray-agent/trojan/trojan-go - updateTrojanGo 1 - else - echoContent green " ---> 放弃更新" - fi - fi - fi - fi -} +#updateTrojanGo() { +# echoContent skyBlue "\n进度 $1/${totalProgress} : 更新Trojan-Go" +# if [[ ! -d "/etc/v2ray-agent/trojan/" ]]; then +# echoContent red " ---> 没有检测到安装目录,请执行脚本安装内容" +# menu +# exit 0 +# fi +# if find /etc/v2ray-agent/trojan/ | grep -q "trojan-go"; then +# version=$(curl -s https://api.github.com/repos/p4gefau1t/trojan-go/releases | jq -r .[0].tag_name) +# echoContent green " ---> Trojan-Go版本:${version}" +# if [[ -n $(wget --help | grep show-progress) ]]; then +# wget -c -q --show-progress -P /etc/v2ray-agent/trojan/ "https://github.com/p4gefau1t/trojan-go/releases/download/${version}/${trojanGoCPUVendor}.zip" +# else +# wget -c -P /etc/v2ray-agent/trojan/ "https://github.com/p4gefau1t/trojan-go/releases/download/${version}/${trojanGoCPUVendor}.zip" >/dev/null 2>&1 +# fi +# unzip -o /etc/v2ray-agent/trojan/${trojanGoCPUVendor}.zip -d /etc/v2ray-agent/trojan >/dev/null +# rm -rf /etc/v2ray-agent/trojan/${trojanGoCPUVendor}.zip +# handleTrojanGo stop +# handleTrojanGo start +# else +# echoContent green " ---> 当前Trojan-Go版本:$(/etc/v2ray-agent/trojan/trojan-go --version | awk '{print $2}' | head -1)" +# if [[ -n $(/etc/v2ray-agent/trojan/trojan-go --version) ]]; then +# version=$(curl -s https://api.github.com/repos/p4gefau1t/trojan-go/releases | jq -r .[0].tag_name) +# if [[ "${version}" == "$(/etc/v2ray-agent/trojan/trojan-go --version | awk '{print $2}' | head -1)" ]]; then +# read -r -p "当前版本与最新版相同,是否重新安装?[y/n]:" reInstalTrojanGoStatus +# if [[ "${reInstalTrojanGoStatus}" == "y" ]]; then +# handleTrojanGo stop +# rm -rf /etc/v2ray-agent/trojan/trojan-go +# updateTrojanGo 1 +# else +# echoContent green " ---> 放弃重新安装" +# fi +# else +# read -r -p "最新版本为:${version},是否更新?[y/n]:" installTrojanGoStatus +# if [[ "${installTrojanGoStatus}" == "y" ]]; then +# rm -rf /etc/v2ray-agent/trojan/trojan-go +# updateTrojanGo 1 +# else +# echoContent green " ---> 放弃更新" +# fi +# fi +# fi +# fi +#} # 验证整个服务是否可用 checkGFWStatue() { @@ -1640,9 +1640,44 @@ EOF # 回落nginx local fallbacksList='{"dest":31300,"xver":0},{"alpn":"h2","dest":31302,"xver":0}' - if echo "${selectCustomInstallType}" | grep -q 4 || [[ "$1" == "all" ]]; then - # 回落trojan-go - fallbacksList='{"dest":31296,"xver":0},{"alpn":"h2","dest":31302,"xver":0}' +# if echo "${selectCustomInstallType}" | grep -q 4 || [[ "$1" == "all" ]]; then +# # 回落trojan-go +# fallbacksList='{"dest":31296,"xver":1},{"alpn":"h2","dest":31302,"xver":0}' +# fi + +if [[ -n $(echo "${selectCustomInstallType}" | grep 4) || "$1" == "all" ]]; then +# fallbacksList=${fallbacksList}',{"path":"/'${customPath}'tcp","dest":31298,"xver":1}' + fallbacksList='{"dest":31296,"xver":1},{"alpn":"h2","dest":31302,"xver":0}' +cat </etc/v2ray-agent/v2ray/conf/04_trojan_TCP_inbounds.json +{ +"inbounds":[ + { + "port": 31296, + "listen": "127.0.0.1", + "protocol": "trojan", + "tag":"trojanTCP", + "settings": { + "clients": [ + { + "password": "${uuid}", + "email": "${domain}_trojan_tcp" + } + ], + "fallbacks":[ + {"dest":"31300"} + ] + }, + "streamSettings": { + "network": "tcp", + "security": "none", + "tcpSettings": { + "acceptProxyProtocol": true + } + } + } + ] +} +EOF fi # VLESS_WS_TLS @@ -2511,40 +2546,52 @@ showAccounts() { fi fi - # trojan-go - if [[ -d "/etc/v2ray-agent/" ]] && [[ -d "/etc/v2ray-agent/trojan/" ]] && [[ -f "/etc/v2ray-agent/trojan/config_full.json" ]]; then - show=1 - # local trojanUUID=`cat /etc/v2ray-agent/trojan/config_full.json |jq .password[0]|awk -F '["]' '{print $2}'` - local trojanGoPath - trojanGoPath=$(jq -r .websocket.path /etc/v2ray-agent/trojan/config_full.json) - local trojanGoAdd - trojanGoAdd=$(jq .websocket.add /etc/v2ray-agent/trojan/config_full.json | awk -F '["]' '{print $2}') + # trojan tcp + if echo ${currentInstallProtocolType} | grep -q 4 || [[ -z "${currentInstallProtocolType}" ]]; then echoContent skyBlue "\n================================== Trojan TLS ==================================\n" - # cat /etc/v2ray-agent/trojan/config_full.json | jq .password - jq -r -c '.password[]' /etc/v2ray-agent/trojan/config_full.json | while read -r user; do - trojanUUID=${user} - if [[ -n "${trojanUUID}" ]]; then - echoContent skyBlue " ---> 帐号:${currentHost}_trojan_${trojanUUID}\n" - echo - defaultBase64Code trojan trojan ${trojanUUID} ${currentHost} - fi - done - - echoContent skyBlue "\n================================ Trojan WS TLS ================================\n" - if [[ -z ${trojanGoAdd} ]]; then - trojanGoAdd=${currentHost} - fi - - jq -r -c '.password[]' /etc/v2ray-agent/trojan/config_full.json | while read -r user; do - trojanUUID=${user} - if [[ -n "${trojanUUID}" ]]; then - echoContent skyBlue " ---> 帐号:${trojanGoAdd}_trojan_ws_${trojanUUID}" - echo - defaultBase64Code trojangows trojan ${trojanUUID} ${currentHost} ${trojanGoPath} ${trojanGoAdd} - fi - + 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} done fi + + +# # trojan-go +# if [[ -d "/etc/v2ray-agent/" ]] && [[ -d "/etc/v2ray-agent/trojan/" ]] && [[ -f "/etc/v2ray-agent/trojan/config_full.json" ]]; then +# show=1 +# # local trojanUUID=`cat /etc/v2ray-agent/trojan/config_full.json |jq .password[0]|awk -F '["]' '{print $2}'` +# local trojanGoPath +# trojanGoPath=$(jq -r .websocket.path /etc/v2ray-agent/trojan/config_full.json) +# local trojanGoAdd +# trojanGoAdd=$(jq .websocket.add /etc/v2ray-agent/trojan/config_full.json | awk -F '["]' '{print $2}') +# echoContent skyBlue "\n================================== Trojan TLS ==================================\n" +# # cat /etc/v2ray-agent/trojan/config_full.json | jq .password +# jq -r -c '.password[]' /etc/v2ray-agent/trojan/config_full.json | while read -r user; do +# trojanUUID=${user} +# if [[ -n "${trojanUUID}" ]]; then +# echoContent skyBlue " ---> 帐号:${currentHost}_trojan_${trojanUUID}\n" +# echo +# defaultBase64Code trojan trojan ${trojanUUID} ${currentHost} +# fi +# done +# +# echoContent skyBlue "\n================================ Trojan WS TLS ================================\n" +# if [[ -z ${trojanGoAdd} ]]; then +# trojanGoAdd=${currentHost} +# fi +# +# jq -r -c '.password[]' /etc/v2ray-agent/trojan/config_full.json | while read -r user; do +# trojanUUID=${user} +# if [[ -n "${trojanUUID}" ]]; then +# echoContent skyBlue " ---> 帐号:${trojanGoAdd}_trojan_ws_${trojanUUID}" +# echo +# defaultBase64Code trojangows trojan ${trojanUUID} ${currentHost} ${trojanGoPath} ${trojanGoAdd} +# fi +# +# done +# fi + if [[ -z ${show} ]]; then echoContent red " ---> 未安装" fi @@ -2721,25 +2768,24 @@ updateV2RayCDN() { fi # trojan - if [[ -d "/etc/v2ray-agent/trojan" ]] && [[ -f "/etc/v2ray-agent/trojan/config_full.json" ]]; then - add=$(jq -r .websocket.add /etc/v2ray-agent/trojan/config_full.json) - if [[ -n ${add} ]]; then - sed -i "s/${add}/${setDomain}/g" $(grep "${add}" -rl /etc/v2ray-agent/trojan/config_full.json) - fi - fi +# if [[ -d "/etc/v2ray-agent/trojan" ]] && [[ -f "/etc/v2ray-agent/trojan/config_full.json" ]]; then +# add=$(jq -r .websocket.add /etc/v2ray-agent/trojan/config_full.json) +# if [[ -n ${add} ]]; then +# sed -i "s/${add}/${setDomain}/g" $(grep "${add}" -rl /etc/v2ray-agent/trojan/config_full.json) +# fi +# fi - if [[ -d "/etc/v2ray-agent/trojan" ]] && [[ -f "/etc/v2ray-agent/trojan/config_full.json" ]] && [[ $(jq -r .websocket.add /etc/v2ray-agent/trojan/config_full.json) == ${setDomain} ]]; then - echoContent green "\n ---> Trojan CDN修改成功" - handleTrojanGo stop - handleTrojanGo start - elif [[ -d "/etc/v2ray-agent/trojan" ]] && [[ -f "/etc/v2ray-agent/trojan/config_full.json" ]]; then - echoContent red " ---> 修改Trojan CDN失败" - fi +# if [[ -d "/etc/v2ray-agent/trojan" ]] && [[ -f "/etc/v2ray-agent/trojan/config_full.json" ]] && [[ $(jq -r .websocket.add /etc/v2ray-agent/trojan/config_full.json) == ${setDomain} ]]; then +# echoContent green "\n ---> Trojan CDN修改成功" +# handleTrojanGo stop +# handleTrojanGo start +# elif [[ -d "/etc/v2ray-agent/trojan" ]] && [[ -f "/etc/v2ray-agent/trojan/config_full.json" ]]; then +# echoContent red " ---> 修改Trojan CDN失败" +# fi fi else echoContent red " ---> 未安装可用类型" fi - menu } # manageUser 用户管理 @@ -2899,21 +2945,33 @@ addUser() { fi if echo ${currentInstallProtocolType} | grep -q 5; then - local vmessUsers="${users//\"flow\":\"xtls-rprx-direct\"\,/}" + local vlessGRPCUsers="${users//\"flow\":\"xtls-rprx-direct\"\,/}" + vlessGRPCUsers="${vlessGRPCUsers//\,\"alterId\":0/}" local vlessGRPCResult - vlessGRPCResult=$(jq -r '.inbounds[0].settings.clients += ['${vmessUsers}']' ${configPath}06_VLESS_gRPC_inbounds.json) + vlessGRPCResult=$(jq -r '.inbounds[0].settings.clients += ['${vlessGRPCUsers}']' ${configPath}06_VLESS_gRPC_inbounds.json) echo "${vlessGRPCResult}" | jq . >${configPath}06_VLESS_gRPC_inbounds.json fi if echo ${currentInstallProtocolType} | grep -q 4; then - local trojanResult - trojanResult=$(jq -r '.password += ['${trojanGoUsers}']' ${configPath}../../trojan/config_full.json) - echo "${trojanResult}" | jq . >${configPath}../../trojan/config_full.json - handleTrojanGo stop - handleTrojanGo start + local trojanUsers="${users//\"flow\":\"xtls-rprx-direct\"\,/}" + trojanUsers="${trojanUsers//id/password}" + trojanUsers="${trojanUsers//\,\"alterId\":0/}" + + + local trojanTCPResult + trojanTCPResult=$(jq -r '.inbounds[0].settings.clients += ['${trojanUsers}']' ${configPath}04_trojan_TCP_inbounds.json) + echo "${trojanTCPResult}" | jq . >${configPath}04_trojan_TCP_inbounds.json fi +# if echo ${currentInstallProtocolType} | grep -q 4; then +# local trojanResult +# trojanResult=$(jq -r '.password += ['${trojanGoUsers}']' ${configPath}../../trojan/config_full.json) +# echo "${trojanResult}" | jq . >${configPath}../../trojan/config_full.json +# handleTrojanGo stop +# handleTrojanGo start +# fi + reloadCore echoContent green " ---> 添加完成" showAccounts 1 @@ -2960,12 +3018,17 @@ removeUser() { fi if echo ${currentInstallProtocolType} | grep -q 4; then - local trojanResult - trojanResult=$(jq -r 'del(.password['${delUserIndex}'])' ${configPath}../../trojan/config_full.json) - echo "${trojanResult}" | jq . >${configPath}../../trojan/config_full.json - handleTrojanGo stop - handleTrojanGo start + local trojanTCPResult + trojanTCPResult=$(jq -r 'del(.inbounds[0].settings.clients['${delUserIndex}'])' ${configPath}04_trojan_TCP_inbounds.json) + echo "${trojanTCPResult}" | jq . >${configPath}04_trojan_TCP_inbounds.json fi +# if echo ${currentInstallProtocolType} | grep -q 4; then +# local trojanResult +# trojanResult=$(jq -r 'del(.password['${delUserIndex}'])' ${configPath}../../trojan/config_full.json) +# echo "${trojanResult}" | jq . >${configPath}../../trojan/config_full.json +# handleTrojanGo stop +# handleTrojanGo start +# fi reloadCore fi } @@ -3387,7 +3450,7 @@ EOF fi reloadCore echoContent green " ---> 添加Netflix出战解锁成功" - echoContent yellow " ---> 不支持trojan的相关节点" +# echoContent yellow " ---> 不支持trojan的相关节点" exit 0 fi echoContent red " ---> ip不可为空" @@ -3513,7 +3576,7 @@ EOF echo "${routing}" | jq . >${configPath}09_routing.json reloadCore echoContent green " ---> 添加落地机入站解锁Netflix成功" - echoContent yellow " ---> trojan的相关节点不支持此操作" +# echoContent yellow " ---> trojan的相关节点不支持此操作" exit 0 fi echoContent red " ---> ip不可为空" @@ -3666,7 +3729,8 @@ customV2RayInstall() { echoContent yellow "1.VLESS+TLS+WS[CDN]" echoContent yellow "2.VMess+TLS+TCP" echoContent yellow "3.VMess+TLS+WS[CDN]" - echoContent yellow "4.Trojan、Trojan+WS[CDN]" +# echoContent yellow "4.Trojan、Trojan+WS[CDN]" + echoContent yellow "4.Trojan" echoContent yellow "5.VLESS+TLS+gRPC[CDN]" read -r -p "请选择[多选],[例如:123]:" selectCustomInstallType echoContent skyBlue "--------------------------------------------------------------" @@ -3728,7 +3792,8 @@ customXrayInstall() { echoContent yellow "1.VLESS+TLS+WS[CDN]" echoContent yellow "2.VMess+TLS+TCP" echoContent yellow "3.VMess+TLS+WS[CDN]" - echoContent yellow "4.Trojan、Trojan+WS[CDN]" + # echoContent yellow "4.Trojan、Trojan+WS[CDN]" + echoContent yellow "4.Trojan" echoContent yellow "5.VLESS+TLS+gRPC[CDN]" read -r -p "请选择[多选],[例如:123]:" selectCustomInstallType echoContent skyBlue "--------------------------------------------------------------" @@ -3840,12 +3905,12 @@ v2rayCoreInstall() { # 安装V2Ray installV2Ray 7 installV2RayService 8 - installTrojanGo 9 - installTrojanService 10 +# installTrojanGo 9 +# installTrojanService 10 customCDNIP 11 initV2RayConfig all 12 cleanUp xrayDel - initTrojanGoConfig 13 +# initTrojanGoConfig 13 installCronTLS 14 nginxBlog 15 updateRedirectNginxConf @@ -3853,9 +3918,9 @@ v2rayCoreInstall() { sleep 2 handleV2Ray start handleNginx start - handleTrojanGo stop - sleep 1 - handleTrojanGo start +# handleTrojanGo stop +# sleep 1 +# handleTrojanGo start # 生成账号 checkGFWStatue 16 showAccounts 17 @@ -3982,7 +4047,7 @@ menu() { cd "$HOME" || exit echoContent red "\n==============================================================" echoContent green "作者:mack-a" - echoContent green "当前版本:v2.5.10" + echoContent green "当前版本:v2.5.10-dev_remove_trojan-go" echoContent green "Github:https://github.com/mack-a/v2ray-agent" echoContent green "描述:八合一共存脚本\c" showInstallStatus @@ -4008,12 +4073,12 @@ menu() { echoContent yellow "10.添加新端口" echoContent skyBlue "-------------------------版本管理-----------------------------" echoContent yellow "11.core管理" - echoContent yellow "12.更新Trojan-Go" - echoContent yellow "13.更新脚本" - echoContent yellow "14.安装BBR、DD脚本" +# echoContent yellow "12.更新Trojan-Go" + echoContent yellow "12.更新脚本" + echoContent yellow "13.安装BBR、DD脚本" echoContent skyBlue "-------------------------脚本管理-----------------------------" - echoContent yellow "15.查看日志" - echoContent yellow "16.卸载脚本" + echoContent yellow "14.查看日志" + echoContent yellow "15.卸载脚本" echoContent red "==============================================================" mkdirTools aliasInstall @@ -4052,19 +4117,19 @@ menu() { 11) coreVersionManageMenu 1 ;; +# 12) +# updateTrojanGo 1 +# ;; 12) - updateTrojanGo 1 - ;; - 13) updateV2RayAgent 1 ;; - 14) + 13) bbrInstall ;; - 15) + 14) checkLog 1 ;; - 16) + 15) unInstall 1 ;; esac From b1f996b8640afbb1c3a62c7b7dbdadaf565de920 Mon Sep 17 00:00:00 2001 From: mack-a <57424792+mack-a@users.noreply.github.com> Date: Fri, 25 Jun 2021 16:42:42 +0800 Subject: [PATCH 04/11] =?UTF-8?q?feat(=E8=84=9A=E6=9C=AC):=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E5=85=A8=E9=83=A8=E5=AE=89=E8=A3=85=E6=9F=A5=E7=9C=8B?= =?UTF-8?q?=E5=B8=90=E5=8F=B7=E6=97=B6=E4=B8=8D=E5=B1=95=E7=A4=BAtrojan?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/install.sh b/install.sh index 6ef32c5..58e30c5 100644 --- a/install.sh +++ b/install.sh @@ -229,15 +229,18 @@ readInstallProtocolType() { if echo ${row} | grep -q VMess_WS_inbounds; then currentInstallProtocolType=${currentInstallProtocolType}'3' fi + if echo ${row} | grep -q trojan_TCP_inbounds; then + currentInstallProtocolType=${currentInstallProtocolType}'4' + fi if echo ${row} | grep -q VLESS_gRPC_inbounds; then currentInstallProtocolType=${currentInstallProtocolType}'5' fi done < <(ls ${configPath} | grep inbounds.json | awk -F "[.]" '{print $1}') - if [[ -f "/etc/v2ray-agent/trojan/trojan-go" ]] && [[ -f "/etc/v2ray-agent/trojan/config_full.json" ]]; then - currentInstallProtocolType=${currentInstallProtocolType}'4' - fi +# if [[ -f "/etc/v2ray-agent/trojan/trojan-go" ]] && [[ -f "/etc/v2ray-agent/trojan/config_full.json" ]]; then +# currentInstallProtocolType=${currentInstallProtocolType}'4' +# fi } # 检查文件目录以及path路径 @@ -4047,7 +4050,7 @@ menu() { cd "$HOME" || exit echoContent red "\n==============================================================" echoContent green "作者:mack-a" - echoContent green "当前版本:v2.5.10-dev_remove_trojan-go" + echoContent green "当前版本:v2.5.10-dev_remove_trojan-go_1" echoContent green "Github:https://github.com/mack-a/v2ray-agent" echoContent green "描述:八合一共存脚本\c" showInstallStatus From f82ac78ec3fb2fe4c6f75acb8c7db03f8c771444 Mon Sep 17 00:00:00 2001 From: mack-a <57424792+mack-a@users.noreply.github.com> Date: Mon, 28 Jun 2021 00:08:48 +0800 Subject: [PATCH 05/11] =?UTF-8?q?feat(=E8=84=9A=E6=9C=AC):=20=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E6=9B=B4=E5=A4=9A=E5=85=BC=E5=AE=B9=E6=80=A7=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install.sh | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/install.sh b/install.sh index 58e30c5..2c4481c 100644 --- a/install.sh +++ b/install.sh @@ -744,7 +744,7 @@ checkIP() { exit 0 fi else - read -r -p "IP查询失败,是否重试[y/n]?" retryStatus + read -r -p "IP查询失败,请检查域名解析是否正确,是否重试[y/n]?" retryStatus if [[ "${retryStatus}" == "y" ]]; then checkIP else @@ -1698,7 +1698,7 @@ EOF "clients": [ { "id": "${uuid}", - "email": "${domain}_vless_ws" + "email": "${domain}_VLESS_WS" } ], "decryption": "none" @@ -1807,7 +1807,7 @@ EOF { "id": "${uuid}", "add": "${add}", - "email": "${domain}_vless_grpc" + "email": "${domain}_VLESS_gRPC" } ], "decryption": "none" @@ -2020,7 +2020,7 @@ EOF # trojan if [[ -n $(echo "${selectCustomInstallType}" | grep 4) || "$1" == "all" ]]; then # fallbacksList=${fallbacksList}',{"path":"/'${customPath}'tcp","dest":31298,"xver":1}' - fallbacksList='{"dest":31296,"xver":1},{"alpn":"h2","dest":31302,"xver":0}' + fallbacksList='{"dest":31296,"xver":1},{"dest":30301,"xver":1},{"alpn":"h2","dest":31302,"xver":0}' cat </etc/v2ray-agent/xray/conf/04_trojan_TCP_inbounds.json { "inbounds":[ @@ -2073,7 +2073,7 @@ EOF "clients": [ { "id": "${uuid}", - "email": "${domain}_vless_ws" + "email": "${domain}_VLESS_WS" } ], "decryption": "none" @@ -2183,7 +2183,7 @@ EOF { "id": "${uuid}", "add": "${add}", - "email": "${domain}_vless_grpc" + "email": "${domain}_VLESS_gRPC" } ], "decryption": "none" @@ -2390,11 +2390,11 @@ EOF elif [[ "${type}" == "vmesstcp" ]]; then - qrCodeBase64Default=$(echo -n '{"port":"'${port}'","ps":'${ps}',"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}'"}' | sed 's#/#\\\/#g' | base64) + qrCodeBase64Default=$(echo -n '{"alpn":"http1.1","port":"'${port}'","ps":'${ps}',"tls":"tls","id":'"${id}"',"aid":"0","v":"2","host":"'${host}'","type":"http","path":"/'${path}'","net":"tcp","add":"'${add}'","allowInsecure":0,"method":"post","peer":"'${host}'","obfs":"http","obfsParam":"'${host}'"}' | sed 's#/#\\\/#g' | base64) qrCodeBase64Default=$(echo ${qrCodeBase64Default} | sed 's/ //g') echoContent yellow " ---> 通用json(VMess+TCP+TLS)" - echoContent green ' {"port":"'${port}'","ps":'${ps}',"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 green ' {"alpn":"http1.1","port":"'${port}'","ps":'${ps}',"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" @@ -2433,7 +2433,7 @@ EOF echoContent green " vless://${VLESSID}@${add}:${port}?encryption=none&security=tls&type=grpc&host=${host}&serviceName=${path}&alpn=h2#${VLESSEmail}\n" echoContent yellow " ---> 格式化明文(VLESS+gRPC+TLS)" - echoContent green " 协议类型:VLESS,地址:${add},伪装域名/SNI:${host},端口:${port},用户ID:${VLESSID},安全:tls,传输方式:gRPC,serviceName:${path},账户名:${VLESSEmail}\n" + echoContent green " 协议类型:VLESS,地址:${add},伪装域名/SNI:${host},端口:${port},用户ID:${VLESSID},安全:tls,传输方式:gRPC,alpn:h2,serviceName:${path},账户名:${VLESSEmail}\n" cat <>"/etc/v2ray-agent/subscribe_tmp/${subAccount}" vless://${VLESSID}@${add}:${port}?encryption=none&security=tls&type=grpc&host=${host}&path=${path}&serviceName=${path}&alpn=h2#${VLESSEmail} @@ -2444,7 +2444,7 @@ EOF elif [[ "${type}" == "trojan" ]]; then # URLEncode echoContent yellow " ---> Trojan(TLS)" - echoContent green " trojan://${id}@${host}:${port}?peer=${host}&sni=${host}#${host}_trojan\n" + echoContent green " trojan://${id}@${host}:${port}?peer=${host}&sni=${host}&alpn=http1.1#${host}_trojan\n" cat <>"/etc/v2ray-agent/subscribe_tmp/${subAccount}" trojan://${id}@${host}:${port}?peer=${host}&sni=${host}#${host}_trojan From 2183fd2d876ae1f77207640d4c459920e48f0a7d Mon Sep 17 00:00:00 2001 From: mack-a <57424792+mack-a@users.noreply.github.com> Date: Mon, 28 Jun 2021 14:55:43 +0800 Subject: [PATCH 06/11] =?UTF-8?q?feat(=E8=84=9A=E6=9C=AC):=20=E7=A7=BB?= =?UTF-8?q?=E9=99=A4VMess=20tcp=20http=E4=BC=AA=E8=A3=85=E3=80=81=E5=88=86?= =?UTF-8?q?=E4=BA=AB=E9=93=BE=E6=8E=A5=E5=A2=9E=E5=8A=A0alpn=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=85=BC=E5=AE=B9=E6=80=A7=E3=80=81README=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E6=8E=A8=E8=8D=90=E5=AE=A2=E6=88=B7=E7=AB=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 10 +++ install.sh | 192 ++++++++++++++++++++++++++++------------------------- 2 files changed, 113 insertions(+), 89 deletions(-) diff --git a/README.md b/README.md index c8ea2c6..182e9a3 100644 --- a/README.md +++ b/README.md @@ -109,6 +109,16 @@ [支持通过虚拟币向我捐赠](https://github.com/mack-a/v2ray-agent/blob/master/documents/donation.md) +## 客户端推荐 +- Android +[AnXray](https://github.com/XTLS/AnXray/releases)[推荐使用最新版本] + +- iOS +Shadowrocket + +- win/Mac/Linux +[Qv2ray](https://github.com/Qv2ray/Qv2ray/actions)[推荐action版本] + ## 安装脚本 - 支持快捷方式启动,安装完毕后,shell输入【**vasma**】即可打开脚本,脚本执行路径[**/etc/v2ray-agent/install.sh**] diff --git a/install.sh b/install.sh index 2c4481c..7f4d0f5 100644 --- a/install.sh +++ b/install.sh @@ -1718,45 +1718,45 @@ EOF fi # VMess_TCP - if echo "${selectCustomInstallType}" | grep -q 2 || [[ "$1" == "all" ]]; then - fallbacksList=${fallbacksList}',{"path":"/'${customPath}'tcp","dest":31298,"xver":1}' - cat </etc/v2ray-agent/v2ray/conf/04_VMess_TCP_inbounds.json -{ -"inbounds":[ -{ - "port": 31298, - "listen": "127.0.0.1", - "protocol": "vmess", - "tag":"VMessTCP", - "settings": { - "clients": [ - { - "id": "${uuid}", - "alterId": 0, - "email": "${domain}_vmess_tcp" - } - ] - }, - "streamSettings": { - "network": "tcp", - "security": "none", - "tcpSettings": { - "acceptProxyProtocol": true, - "header": { - "type": "http", - "request": { - "path": [ - "/${customPath}tcp" - ] - } - } - } - } -} -] -} -EOF - fi +# if echo "${selectCustomInstallType}" | grep -q 2 || [[ "$1" == "all" ]]; then +# fallbacksList=${fallbacksList}',{"path":"/'${customPath}'tcp","dest":31298,"xver":1}' +# cat </etc/v2ray-agent/v2ray/conf/04_VMess_TCP_inbounds.json +#{ +#"inbounds":[ +#{ +# "port": 31298, +# "listen": "127.0.0.1", +# "protocol": "vmess", +# "tag":"VMessTCP", +# "settings": { +# "clients": [ +# { +# "id": "${uuid}", +# "alterId": 0, +# "email": "${domain}_vmess_tcp" +# } +# ] +# }, +# "streamSettings": { +# "network": "tcp", +# "security": "none", +# "tcpSettings": { +# "acceptProxyProtocol": true, +# "header": { +# "type": "http", +# "request": { +# "path": [ +# "/${customPath}tcp" +# ] +# } +# } +# } +# } +#} +#] +#} +#EOF +# fi # VMess_WS if echo "${selectCustomInstallType}" | grep -q 3 || [[ "$1" == "all" ]]; then @@ -1851,8 +1851,8 @@ EOF "security": "tls", "tlsSettings": { "alpn": [ - "h2", - "http/1.1" + "http/1.1", + "h2" ], "certificates": [ { @@ -2020,7 +2020,7 @@ EOF # trojan if [[ -n $(echo "${selectCustomInstallType}" | grep 4) || "$1" == "all" ]]; then # fallbacksList=${fallbacksList}',{"path":"/'${customPath}'tcp","dest":31298,"xver":1}' - fallbacksList='{"dest":31296,"xver":1},{"dest":30301,"xver":1},{"alpn":"h2","dest":31302,"xver":0}' + fallbacksList='{"dest":31296,"xver":1},{"alpn":"h2","dest":31302,"xver":0}' cat </etc/v2ray-agent/xray/conf/04_trojan_TCP_inbounds.json { "inbounds":[ @@ -2092,46 +2092,46 @@ EOF EOF fi - # VMess_TCP - if [[ -n $(echo ${selectCustomInstallType} | grep 2) || "$1" == "all" ]]; then - fallbacksList=${fallbacksList}',{"path":"/'${customPath}'tcp","dest":31298,"xver":1}' - cat </etc/v2ray-agent/xray/conf/04_VMess_TCP_inbounds.json -{ -"inbounds":[ -{ - "port": 31298, - "listen": "127.0.0.1", - "protocol": "vmess", - "tag":"VMessTCP", - "settings": { - "clients": [ - { - "id": "${uuid}", - "alterId": 0, - "email": "${domain}_vmess_tcp" - } - ] - }, - "streamSettings": { - "network": "tcp", - "security": "none", - "tcpSettings": { - "acceptProxyProtocol": true, - "header": { - "type": "http", - "request": { - "path": [ - "/${customPath}tcp" - ] - } - } - } - } -} -] -} -EOF - fi +# # VMess_TCP +# if [[ -n $(echo ${selectCustomInstallType} | grep 2) || "$1" == "all" ]]; then +# fallbacksList=${fallbacksList}',{"path":"/'${customPath}'tcp","dest":31298,"xver":1}' +# cat </etc/v2ray-agent/xray/conf/04_VMess_TCP_inbounds.json +#{ +#"inbounds":[ +#{ +# "port": 31298, +# "listen": "127.0.0.1", +# "protocol": "vmess", +# "tag":"VMessTCP", +# "settings": { +# "clients": [ +# { +# "id": "${uuid}", +# "alterId": 0, +# "email": "${domain}_vmess_tcp" +# } +# ] +# }, +# "streamSettings": { +# "network": "tcp", +# "security": "none", +# "tcpSettings": { +# "acceptProxyProtocol": true, +# "header": { +# "type": "http", +# "request": { +# "path": [ +# "/${customPath}tcp" +# ] +# } +# } +# } +# } +#} +#] +#} +#EOF +# fi # VMess_WS @@ -2228,8 +2228,8 @@ EOF "xtlsSettings": { "minVersion": "1.2", "alpn": [ - "h2", - "http/1.1" + "http/1.1", + "h2" ], "certificates": [ { @@ -2390,11 +2390,25 @@ EOF elif [[ "${type}" == "vmesstcp" ]]; then - qrCodeBase64Default=$(echo -n '{"alpn":"http1.1","port":"'${port}'","ps":'${ps}',"tls":"tls","id":'"${id}"',"aid":"0","v":"2","host":"'${host}'","type":"http","path":"/'${path}'","net":"tcp","add":"'${add}'","allowInsecure":0,"method":"post","peer":"'${host}'","obfs":"http","obfsParam":"'${host}'"}' | sed 's#/#\\\/#g' | base64) +# echoContent yellow " ---> 通用格式[新版,推荐]" +# +# echoContent green " vmess://tcp+tls:2e6257c5-1402-41a6-a96d-1e0bdad78159-0@vu3.s83h.xyz:443/?type=http&tlsServerName=vu3.s83h.xyz#vu3.s83h.xyz_vmess_tcp" +# echoContent green " vmess://tcp+tls:${id//\"/}-0@${add}:${port}/?type=http&path=/${path}&tlsServerName=${host}&alpn=http1.1#${ps//\"/}\n" +# +# echoContent yellow " ---> 格式化明文(vmess+http+tls)" +# echoContent green "协议类型:vmess,地址:${host},端口:${port},用户ID:${id},安全:tls,传输方式:http,账户名:${ps}\n" +# cat <>"/etc/v2ray-agent/subscribe_tmp/${subAccount}" +#vmess://http+tls:${id}-0@${add}:${port}/?path=/${path}&tlsServerName=${host}&alpn=http1.1#${ps} +#EOF +# echoContent yellow " ---> 二维码 vmess(http+tls)" +# echoContent green " https://api.qrserver.com/v1/create-qr-code/?size=400x400&data=vmess%3A%2F%2Fhttp%2Btls%3A${id}-0%40add%3A${port}%2F%3Fpath%3D%2F${path}%26tlsServerName%3D${host}%26alpn%3Dhttp1.1%23%24%7B${ps}%7D\n" + + echoContent red path:${path} + qrCodeBase64Default=$(echo -n '{"add":"'${add}'","aid":"0","host":"'${host}'","id":'"${id}"',"net":"tcp","path":"/'${path}'","port":"'${port}'","ps":'${ps}',"scy":"none","sni":"'${host}'","tls":"tls","v":"2","type":"http","allowInsecure":0,"peer":"'${host}'","obfs":"http","obfsParam":"'${host}'"}' | base64) qrCodeBase64Default=$(echo ${qrCodeBase64Default} | sed 's/ //g') echoContent yellow " ---> 通用json(VMess+TCP+TLS)" - echoContent green ' {"alpn":"http1.1","port":"'${port}'","ps":'${ps}',"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 green ' {"port":"'${port}'","ps":'${ps}',"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" @@ -2439,7 +2453,7 @@ EOF vless://${VLESSID}@${add}:${port}?encryption=none&security=tls&type=grpc&host=${host}&path=${path}&serviceName=${path}&alpn=h2#${VLESSEmail} EOF echoContent yellow " ---> 二维码 VLESS(VLESS+gRPC+TLS)" - echoContent green " https://api.qrserver.com/v1/create-qr-code/?size=400x400&data=vless%3A%2F%2F${VLESSID}%40${add}%3A${port}%3Fencryption%3Dnone%26security%3Dtls%26type%3Dgrpc%26host%3D${host}%26path%3D${path}%23${VLESSEmail}" + echoContent green " https://api.qrserver.com/v1/create-qr-code/?size=400x400&data=vless%3A%2F%2F${VLESSID}%40${add}%3A${port}%3Fencryption%3Dnone%26security%3Dtls%26type%3Dgrpc%26host%3D${host}%26serviceName%3D${path}%26path%3D${path}%26alpn%3Dh2%23${VLESSEmail}" elif [[ "${type}" == "trojan" ]]; then # URLEncode @@ -2447,10 +2461,10 @@ EOF echoContent green " trojan://${id}@${host}:${port}?peer=${host}&sni=${host}&alpn=http1.1#${host}_trojan\n" cat <>"/etc/v2ray-agent/subscribe_tmp/${subAccount}" -trojan://${id}@${host}:${port}?peer=${host}&sni=${host}#${host}_trojan +trojan://${id}@${host}:${port}?peer=${host}&sni=${host}&alpn=http1.1#${host}_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}%23${host}_trojan\n" + 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" elif [[ "${type}" == "trojangows" ]]; then # URLEncode From 40e296d94eca1c6fe8d78ca30c479506fe61a963 Mon Sep 17 00:00:00 2001 From: mack-a <57424792+mack-a@users.noreply.github.com> Date: Mon, 28 Jun 2021 14:57:07 +0800 Subject: [PATCH 07/11] feat(readme): update --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 182e9a3..be0438e 100644 --- a/README.md +++ b/README.md @@ -111,12 +111,15 @@ ## 客户端推荐 - Android + [AnXray](https://github.com/XTLS/AnXray/releases)[推荐使用最新版本] - iOS + Shadowrocket - win/Mac/Linux + [Qv2ray](https://github.com/Qv2ray/Qv2ray/actions)[推荐action版本] ## 安装脚本 From 52e41a5d0634393c50710aacf4f628d392a353b9 Mon Sep 17 00:00:00 2001 From: mack-a <57424792+mack-a@users.noreply.github.com> Date: Mon, 28 Jun 2021 14:59:15 +0800 Subject: [PATCH 08/11] feat(readme): update --- README.md | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index be0438e..34c9ab8 100644 --- a/README.md +++ b/README.md @@ -111,17 +111,11 @@ ## 客户端推荐 - Android - -[AnXray](https://github.com/XTLS/AnXray/releases)[推荐使用最新版本] - -- iOS - -Shadowrocket - -- win/Mac/Linux - -[Qv2ray](https://github.com/Qv2ray/Qv2ray/actions)[推荐action版本] - + - [AnXray](https://github.com/XTLS/AnXray/releases) + +- windows/Mac/Linux + - [Qv2ray](https://github.com/Qv2ray/Qv2ray/actions)[推荐action版本] + ## 安装脚本 - 支持快捷方式启动,安装完毕后,shell输入【**vasma**】即可打开脚本,脚本执行路径[**/etc/v2ray-agent/install.sh**] From 1fda44868d66e52b33856120c3cebc739030c1d7 Mon Sep 17 00:00:00 2001 From: mack-a <57424792+mack-a@users.noreply.github.com> Date: Mon, 28 Jun 2021 15:00:50 +0800 Subject: [PATCH 09/11] feat(readme): update --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 34c9ab8..ea96d24 100644 --- a/README.md +++ b/README.md @@ -112,6 +112,9 @@ ## 客户端推荐 - Android - [AnXray](https://github.com/XTLS/AnXray/releases) + +- iOS + - Shadowrocket - windows/Mac/Linux - [Qv2ray](https://github.com/Qv2ray/Qv2ray/actions)[推荐action版本] From d78bc952d510d1c43f130c18d0e3a987a6d5be54 Mon Sep 17 00:00:00 2001 From: mack-a <57424792+mack-a@users.noreply.github.com> Date: Mon, 28 Jun 2021 15:01:33 +0800 Subject: [PATCH 10/11] feat(readme): update --- README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index ea96d24..3d671c7 100644 --- a/README.md +++ b/README.md @@ -111,11 +111,9 @@ ## 客户端推荐 - Android - - [AnXray](https://github.com/XTLS/AnXray/releases) - + - [AnXray](https://github.com/XTLS/AnXray/releases) - iOS - Shadowrocket - - windows/Mac/Linux - [Qv2ray](https://github.com/Qv2ray/Qv2ray/actions)[推荐action版本] From 7f862bdb9436d189277df642df2aee2cd4691e12 Mon Sep 17 00:00:00 2001 From: mack-a <57424792+mack-a@users.noreply.github.com> Date: Mon, 28 Jun 2021 15:19:34 +0800 Subject: [PATCH 11/11] feat(version): update --- install.sh | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/install.sh b/install.sh index 7f4d0f5..29f9ddc 100644 --- a/install.sh +++ b/install.sh @@ -3807,7 +3807,7 @@ customXrayInstall() { echoContent yellow "VLESS前置,默认安装0,如果只需要安装0,则只选择0即可" echoContent yellow "0.VLESS+TLS/XTLS+TCP" echoContent yellow "1.VLESS+TLS+WS[CDN]" - echoContent yellow "2.VMess+TLS+TCP" +# echoContent yellow "2.VMess+TLS+TCP" echoContent yellow "3.VMess+TLS+WS[CDN]" # echoContent yellow "4.Trojan、Trojan+WS[CDN]" echoContent yellow "4.Trojan" @@ -4064,14 +4064,11 @@ menu() { cd "$HOME" || exit echoContent red "\n==============================================================" echoContent green "作者:mack-a" - echoContent green "当前版本:v2.5.10-dev_remove_trojan-go_1" + echoContent green "当前版本:v2.5.10" echoContent green "Github:https://github.com/mack-a/v2ray-agent" echoContent green "描述:八合一共存脚本\c" showInstallStatus echoContent red "\n==============================================================" - echoContent red "VMess+TLS+TCP(http+tls),将在未来几个版本脚本中移除" - echoContent red "此版本正在将trojan-go(trojan)替换为Xray-core(trojan)" - echoContent red "==============================================================" if [[ -n "${coreInstallType}" ]]; then echoContent yellow "1.重新安装" else